1
\$\begingroup\$

I got a breadboard with some logic on it. Including it's own power suppply. It is connected to my Arduino Mega 2560 to fill a shiftregister with some bits. Whenevery my arduino is in a undefind state i want the shiftregisters to be dissabled to prevent the hardware from hazards. Undefind means when it is turned off. Since the logic has it's own powersupply it could damage some of the hardware which i toggle with the registers. (toggling transistors with a lot of leds on it)

So i added a pull up to the "blank pin" of the shiftregister(2k 10k 18k). But it does not work as expected. In this case it dows nothing(The test leds still are in some kind of undefind state when i turn off the power of the arduino)! If i delete the gnd line between the arduino and the breadboard it works.

So here is some small shematic (Not compplete but the important things):

enter image description here

What am i doing wrong?


Edit. Sorry i am not that good in drawing this schematics... enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ I'm not sure what you mean by "blank" pin, but I think you're talking about the OUTPUT ENABLE pin of the 74HC595. So you pull this low with the arduino, and you want the pull-up to bring it to high while the arduino is off? Have you checked what the voltage is between this pin and your GND rail when the arduino is off? If that pin is high, it should put the outputs in high impedance. Maybe that voltage isn't high like you think it is. I'm not really sure what state arduino pins are in when powered off, but current could be passing through your pull up and back through the arduino... \$\endgroup\$ – krb686 Oct 29 '14 at 15:00
  • \$\begingroup\$ I'm sorry, that's not a schematic, that's a wiring diagram, and nigh on impossible for us to follow. Please create a proper schematic (Fritzing has a schematic mode). \$\endgroup\$ – Majenko Oct 29 '14 at 15:04
  • 2
    \$\begingroup\$ ...and out the arduino GND back to the breadboard GND. Thus by removing the wire from arduino GND to breadboard GND, you effectively open-circuited it and then the pin voltage went high. I imagine that is what is happening, but you should check the voltage between your GND rail and OE pin like I said. \$\endgroup\$ – krb686 Oct 29 '14 at 15:05
  • 1
    \$\begingroup\$ you are right with what you think. I pull it low to enable the ouput. Between the gnd rail and the pin i got no potential if there is no resistor in it. if i put a 2k in it i got 1,6V. at 4k it falls. Going to add a schematics. \$\endgroup\$ – BennX Oct 29 '14 at 15:14
  • \$\begingroup\$ Schematics added \$\endgroup\$ – BennX Oct 29 '14 at 15:16
2
\$\begingroup\$

The "OE" pin doesn't function quite as you think. It doesn't set all the outputs to "off" as you would hope. Instead it sets all the outputs to "high impedance". This is like disconnecting all the wires from the outputs that connect to the transistors, leaving the transistors' bases floating, in an undefined state.

You should connect pull-up or pull-down (depending on the default state you want) resistors to all the outputs so when OE is disabled the transistors get pulled into the correct state.


Update:

After discussion this sounds like the Arduino, when powered off, is interfering with the voltage on the OE pin. The effect is called "back powering" where power flows out of your circuit back into the unpowered circuit, which can damage one or both circuits. The power flows backwards into the IO pin of the Arduino, then up through the ESD diodes to its internal Vcc bus, then through its internals into GND.

By disconnecting the Arduino's ground you're breaking that circuit, so the power doesn't flow.

The simplest fix is probably to fit a small diode in series with the OE pin:

schematic

simulate this circuit – Schematic created using CircuitLab

Another, perhaps better, way would be to switch the OE using an NPN transistor:

schematic

simulate this circuit

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Okay thats a problem since i cant add a pull up to all pnps anymore. (75 in total at 10 registers) Guess i need to switch on the arduino before i switch on the power of the logic... I wonder because i can disable all my pins by pulling the OE to high when everything is working. I Always do this befor i add new data to the registers. When i am done i enable them again. And i can disable all by manually pull the OE up when the arduino is offline... \$\endgroup\$ – BennX Oct 29 '14 at 15:24
  • \$\begingroup\$ Having OE low and MR low (pull MR down with resistor, hold it high with Arduino) will force the outputs all to 0. MR sets the contents of the SR to 0, and OE low outputs all that 0 to the outputs - although that requires a toggle of the STCP pin, so forget that ;) \$\endgroup\$ – Majenko Oct 29 '14 at 15:28
  • \$\begingroup\$ You could have the Arduino control the power to the shift register section (Relay, FETs, whatever is suitable for your currents). \$\endgroup\$ – Majenko Oct 29 '14 at 15:31
  • \$\begingroup\$ That could work as you say with eh MR. Are you sure about the OE? the Datashet says something else if i get this right: cdn-reichelt.de/documents/datenblatt/A240/74HC595%23STM.pdf And i wonder why i can disable all outputs by pulling it up. \$\endgroup\$ – BennX Oct 29 '14 at 15:32
  • \$\begingroup\$ Not a good datasheet - try this one: nxp.com/documents/data_sheet/74HC_HCT595.pdf - look at the truth table - when OE is HIGH: "shift register clear; parallel outputs in high-impedance OFF-state" \$\endgroup\$ – Majenko Oct 29 '14 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.