Is current going in reverse through the shift register?

Hello colleagues,

I've connected 5 red LEDs to a generic 595 shift register.

Using a power supply, I gave +5V to the LED resistor, and I grounded the LED cathode.
The LED lights up, but the supply tells me that it's drawing 30mA (that's the limit I predefined). If I raise the limit to 35mA, it will draw 35mA. It's so strange, the resistors are double checked, no short circuit.

I councluded that current is going backwards :confused: Can you help me clarify the situation ?
Once LEDs are attached to the shift register, is it to late to recheck the LED's with a +5V before the resistor, and GND to the cathode ?

Edit

At first i tought only I1 exists, but now i'm thinking there must be an I2, since the currents is much greater then just 5v throught a 200 Ohm resistior (for the sake of simplicity I will not calculate the voltage drop of the red LED)

You need to post a schematic for us to give proper help. But it looks very much to me like there are other paths for the current to flow in your circuit, as well as through the resistor+led you are testing. Those other current paths could damage the chip.

EDIT in response to your edit: yes, I2 is one such path and there could be others also. What you are doing here is breaking one of the maximum limitations set out in the '595 data sheet. No pin should be connected to a voltage higher than the Vcc pin (there may be an allowance of 0.5V, I can't remember). In your circuit, Vcc is not connected, so connecting any other pin to a positive voltage is breaking that limitation. This could damage the chip and cause it to behave in unexpected ways.

PaulRB:
You need to post a schematic for us to give proper help. But it looks very much to me like there are other paths for the current to flow in your circuit, as well as through the resistor+led you are testing. Those other current paths could damage the chip.

Dear PaulRB, hope this pic will be helpful

Thanks for posting that "diagram". It is not a schematic as I requested, but it does confirm my understanding of how the components are connected. See updated reply #1.

Applying any significant voltage/current to an input or output pin on a chip that’s not got its
power supply can damage it, though typically you will cause phantom-powering first, until
something breaks.

Almost all logic chips require all logic inputs and outputs to be within the range GND-0.3V and
Vcc+0.3V at all times, powered up or not.

It would help if you showed all power, ground and interconnections on your 'schematic'. For one thing how do you control the shift register, all the control pins are open. The 5V is not hooked to VCC. More information please!

@PaulRB - Thanks for sharing you view on I1 & I2 with me !

@MarkT - "Almost all logic chips require all logic inputs and outputs to be within the range GND-0.3V and Vcc+0.3V at all times, powered up or not." - wooow, info like this are worth pure gold for a beginner like me. It saved me not only many hours of debugging and struggling to find out the problem, but probably it also saved many IC from being fried ! Thanks MarkT !

@gilshultz – well, the ‘595 was not hooked up to the Arduino.
This was my logic:

  1. Let connect the LEDS, to the 595 respective output pins + GND
  2. Before I insert the lights in the “tank” chassis, and connect the shift register to the Arduino, let’s recheck if the LED’s are working. I will apply 5V before the LED resistor and GND to the cathode.

So this is my conclusion – once LED’s are connected to the 595 register, I will turn them on and off ONLY using an MCU.

Were the other LEDs glowing?

Don't forget you must connect OE to ground, SRCLR to 5V and connect a 0.1uF cap between 5V and ground, close to the chip.

A way to test without the MCU could be to use the wires that will connect the '595 to the Nano. Connect 5V and ground wires, connect the SER wire to 5V and the RCLK to ground. Then touch the SRCLK to 5V, then ground, then 5V repeatedly for a few times. Then connect RCLK to 5V, and your leds should light. You will have shifted in some data by hand!

Hi,

Before I insert the lights in the "tank" chassis, and connect the shift register to the Arduino, let's recheck if the LED's are working. I will apply 5V before the LED resistor and GND to the cathode.

if you are going to connect 5V to the output of the 595, NO...

You will be pulling the output components of the 595 to 5V, which will possibly damage the 595.
That is why your power supply is current limiting, apart from current through the LED you are passing current thought the output pin of the 595.....

Have you got code to test the complete 595 assembly?
If not then write some code to verify your 595 circuit.

What value are your resistors.

Find out now if your project works before you put it in the model.

Thanks.. Tom.. :slight_smile:

I can’t post a regular reply because i’m getting a “The message body was left empty” error :frowning:

@Paul_B – Great question! At one point all LEDs were glowing, which was very weird. Then one LED died, so I decided to stop checking if LEDs were correctly attached using my previously described method. When I saw all 5 LEDs glowing simultaneously, I knew that current had to go back through the 595, and then to the anode of other LEDs.

@TomGeorge – thanks for joining the conversation. “if you are going to connect 5V to the output of the 595, NO…” – that’s what I literally did. MarkT & PaulRB explained to me why that’s a NO NO, and how I should never apply voltage directly to INPUT/OUTPUT pins, especially when the Vcc pin not attached to anything.
@PaulRB – yes yes, I know about the SRCLR & OE. I didn’t use the 0.1uF when I tried my code on the breadboard. Interesting testing method, I will give it a shot !





Painting is next! A laser will be placed in the box on the roof, while 5 LEDs will be on the front plate (Knight rider style). It will be possible to control the vehicle by nRF24 or a HC-05 Bluetooth module. The main part of the vehicle is made of plywood. The white paste is acrylic putty, to hide imperfect joints. The surface is sended (wood sending - if that's the term).

@ ”Have you got code to test the complete 595 assembly?” – I will recheck the 595 replacement on my breadboard, just to make sure it works flawlessly.
What value are your resistors ? – 150 ohms (21mA through red LED, V drop is 1.80V).
I will dispose the 595, recheck the LEDS, and resolder a new 595.

Guys I really appreciate your help! :wink:

Hi,
Models look really good, I make cardboard models of all sorts of stuff.

Can I suggest you solder in an IC socket or a couple of header strips to plug the 595 into.
Less heat stress on the board.

Tom... :slight_smile:
One of my model railway themed models, I have a Nano controlling the welder flashes and the dodgey electrics making the office lights flicker when the weld arcs up.
(Turn the volume down, the kids making noise with the dogs in the background :))

It is worth to have a solderless breadboard to verify designs and ideas.

wood sending - if that's the term

Sanding?

Smajdalf:
It is worth to have a solderless breadboard to verify designs and ideas.

OP mentions using a breadboard in reply #10.

@Tom - thanks for the compliment :slight_smile: The garage on your video looks neat. Great job !
A 595 socket / header strips sounds like a good idea.

@Smajdalf - yes, I tried the design on a soderless breadboard, and it worked perfectly. It will be tricky to run a code, because the 595 will have to shift led's every 100 milliseconds as well as receive date from the Bluetooth / nRF24 module. I already see a bunch of interrupts.

@PaulRB - yes, sanding :slight_smile:

Dacha011:
I already see a bunch of interrupts.

That would be asking for trouble. :astonished:

100ms is glacially slow by microcontroller standards - no need for interrupts for something
this slow. I'd be worrying if it was 100µs, but not 100ms.

::)Ohhh. . . . ok. In that case I will stick to millis**()****.** Hopefully I'll start coding by the end of the week.

Since I'm certain that I will have more questions regarding this project, is there a part of the forum in which I can open a topic and post questions re my project (project guidance) ? I don't want to go off-topic here.