Circuit keeps working with no input voltage

Hi,

The circuit I'm running (some flashing LEDs using a couple of HC595s) continues to run even after I've physically switched out the voltage source. Currently it's running off of a LM2940 5V regulator, and when the power's off the voltage in the circuit stays put for 15 seconds, then drops down to 3.66V and just stays there for well over a minute (stopped measuring after that). There is not power coming out of the Arduino, but it's sharing ground with the circuit.

Is it because of the regulator, the capacitors surrounding it (which should be emptied quickly, the way I understand it), or something else?

Thanks.

show the electrical diagram, probabily you are using power from arduino's pin

I have 4 ICs, 16 LEDs+switches etc which will take me a day to draw... But I can confirm that the only wires coming out of the Arduino and going to the circuit are:

  1. Ground
  2. Latch, Clock & Data wires for 74HC595 (Arduino pins 2, 3, 4)
  3. Latch, Clock & Data wires for 74HC165 (Arduino pins 5, 6, 7)

Absolutely nothing else is connected to the circuit apart from the above, and the PWR/GND connections mentioned earlier.

In case no other ideas show up I'll draw the schematic, which I was supposed to do anyway.

Post code and a schematic. This thread is pointless without them.

You may well be powering the external circuitry through the data lines.

There is not power coming out of the Arduino, but it's sharing ground with the circuit.

Maybe not from the 5v directly but if you have outputs driven HIGH then they will power external circuitry.


Rob

I drew up the attached schematic, which behaves as expected btw.

The reason I'm using a voltage regulator is because I need the original 6V to drive a few servos.

See replies #4 and #5.

Is the Arduino still powered?


Rob

Yes, the Arduino is powered, but it's sending signals to the shift register, which is not (powered, I mean). How do the LEDs keep blinking then?

See replies #4 and #5.

Your Arduino outputs are probably powering up the external circuit through the ESD protection diodes of the shift registers. To prove one way or another unplug the three wires from the Arduino or have your code set them all to LOW.


Rob

I didn't know this was possible, sorry. Does this mean that the circuit could potentially draw too much current from the Arduino if I power it on & off in the wrong order (i.e. Arduino, then external power when turning on)?

Powering a circuit like this is called parasitic powering and is a very bad thing because it is one way of destroying components.

You should never apply signals to an unpowered chip. It is not the excess current that kills it but the path the current takes through the chip is not designed to take that sort of current.

OK, thanks a lot. So you're confirming what I wrote above: I should first apply power to the circuit, then turn on the Arduino. And when turning off, the opposite, right? Or should I use diodes?

It is best if you apply the power once, so power the chip off the arduino's 5V line, or power the arduino through the 5V line and use a USB lead with the +5V line removed.
Or use the external input power jack with a higher voltage so that the USB power is over ridden. Then power up your circuit before plugging in the USB lead.

That's my problem exactly: I'm developing with Arduino over USB, while planning to make the entire thing autonomous when it's finished (by rebuilding and burning a bootloader on a new chip). But for the time being, I'm supplying the Uno with USB power. At the same time, since the circuit I'm building involves servos, I need 6V. So I add external 6V power and use a 5V regulator to power the chips, so that the Uno doesn't risk getting overloaded. But because I'm a complete newbie to electronics, I'm bound to make mistakes such as these.

If I plug the 6V power directly into the Uno power jack, would that override the USB power entirely? And still keep the Uno happy with 5V?

So I add external 6V power and use a 5V regulator to power the chips,

That will not work with most regulators, you need 6.5V to make it work correctly.
There is no need to do this if you power the chip off the 5V line of the arduino.
The USB can supply up to 500mA so you are not going to overload anything, unless you have failed to reveal something.

If I plug the 6V power directly into the Uno power jack, would that override the USB power entirely? And still keep the Uno happy with 5V?

No 6V is not enough but if you use 7.5V or above then yes the USB power gets switched out automatically by a circuit on the board.

OK thanks. BTW the regulator is a low-drop variety (LM2940) which serves its purpose.