Problem with buzzer not working

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
mouton63
Posts: 17
Joined: Wed Jan 23, 2013 5:38 pm

Problem with buzzer not working

Post by mouton63 »

Hi all (Martin)

I have the following flowcode problem;
When i simulate the attached program, the buzzer ( Port C6) the LED ( Buzzer) works fine.
However when i compile the program the HEX and program the chip i get no output on this port.
This is quite strange as it works fine in flowcode v5 professional simulation, but not when I program the chip.
I have tested this port with my multimeter and it does not change state at all?? :shock:
Any help on this matter would be greatly appreciated.

Regards
Andrew
Attachments
CHANGES.fcf
(48.51 KiB) Downloaded 224 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Problem with buzzer not working

Post by medelec35 »

Does anything work e.g LED's
What is pin 1 connected to or is it left unconnected?
How have you connected your buzzer? Directly between pin of microcontroller and ground or via a transistor?
what type of buzzer is it? If connected directly, maximum current could be exceeded. Buzzer could be inductive, causing damage?
Could the chip be damaged?

Do you have a circuit diagram you can post?

Martin
Martin

mouton63
Posts: 17
Joined: Wed Jan 23, 2013 5:38 pm

Re: Problem with buzzer not working

Post by mouton63 »

Hi Martin,

Everything works fine except the buzzer output, i even tried different (spare) ports but no luck.
Pin 1 is my "reset" & is pulled up via a 10k resistor.
Buzzer is connected directly to output pin & ground.
The buzzer is a miniature 5v Piezo buzzer. (non mechanical)
I tried more than one 16F73... same result.
Schematic have been attached.

Regards;
Andrew
Attachments
FIRE CONTROL PANEL (VEHICLE) - Project.pdf
(55.32 KiB) Downloaded 250 times

mouton63
Posts: 17
Joined: Wed Jan 23, 2013 5:38 pm

Re: Problem with buzzer not working

Post by mouton63 »

Hi Martin,

I have managed to get my program to work in the hardware.
i had to change my circuit by putting in a BS170 that switches the negative to the buzzer.
If you look at my FCF file you will see that i had to change the buzzer LED to active low for the hardware to work.
If i leave the buzzer at active high then the hardware wont work... strange... :shock:
Now if i simulate the software in flowcode it works the opposite way around.
Could this be a bug in the software or am i missing something somewhere?
In active high setting on the buzzer there is no change of state on the pic in the hardware when i measure the pic pin.
However, if i change the state of the buzzer to active low then the pin "comes alive" & works fine... its just inverted...
i have attached my changes for you to view, if you run the software you will see that the buzzer LED stays on but in hardware its off. :?
I would really appreciate your feedback on this one.

Andrew
Attachments
CHANGES.fcf
(48.51 KiB) Downloaded 238 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Problem with buzzer not working

Post by medelec35 »

With FET connected, what happens when you connect B2 to +Vcc?
What is the o/p from C6?

What your saying does not make sense. If the logic was reversed, then in fault mode you would still get an output without FET.
Also with a N type FET a positive gate voltage is required to switch it on and drive buzzer. Im assuming your +ve of buzzer is connectet to +5V and your -ve of buzzer is connected to the drain, and source is connected to 0V?
Can you check the voltage out from C6 with the 1st flowchart you posted, now you have a high resistance device connected to it.
1st try without B2 going to +5V , then try with B2 going to +5V

Can you show how your switch is connected please.
On your circuit diagram you have just a connection shown without switch connected.
Martin

Post Reply