Electrical – Startup Buzzer Sound

74hc595arduinopiezo-buzzeruln2003

I have made a button box, using an Arduino mini pro, which includes LEDs and buzzers. I am using a shift register (74HC595) with a ULN2003 (to use 12v on the LEDs) to decode the SPI.

See the top right in: (sorry about the schematic, but I am quite new to electronics.)

enter image description here

Click for magnified view.

When I power it ON, the buzzers beep (most of the time). But if I do a reset on the Arduino mini pro, using the reset button, then power OFF, and then power ON again, there is no beep.

I have reduced the Arduino code to the minimum to try to figure out why this is occuring. If I do the following, the beep does not stop:

const int SS10 = 10;    
void setup() {
 pinMode(SS10, OUTPUT);
 digitalWrite(SS10, HIGH);                
 SPI.begin();                          
 SPI.setClockDivider(SPI_CLOCK_DIV16);    
}
void loop() {
}

Can it be that on startup, the SPI is using a setting it had on the most recent power off? Can it be inrush current flowing through the buzzers?

Any help would be greatly appreciated.

Here is the schematic on which I based my use of the ULN2003. It is from the datasheet.

enter image description here

Thanks in advance.

Best Answer

enter image description here

Figure 1. The ULN2003 internals.

The first thing to jump out of your schematic in that area is that you haven't connected the COM to your +12 V correctly. Your schematic shows it connected through a switch to ground.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 2. Representing the transistors as switches. (a) The correct wiring. (b) What you have done.

The diodes in the chip are there to prevent the transistors from damage when switching inductive loads. They should be connected to supply positive.

Looking at Figure 1b, your setup, it should be clear that if TEST is closed that current will flow from +12, through the buzzer, through D3 and through TEST to ground. The circuit will be completed and BUZZ will buzz if TEST is closed.