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.)
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.
Thanks in advance.