0
\$\begingroup\$

So basically I'm using a 74HC595 shift-register to control 8 LEDs by manually giving the chip pulses with knobs instead of something like an arduino. On the arduino.stackexchange website this question got denied by users because it seemed to be off-topic. It was actually as a test for me to understand what such a thing really does before hooking it up to an arduino.

Anyhow, could someone tell me what I've done wrong in this circuit? Why is it not working? I connected the DS port to a slide switch so I can close both the DS and the SHCP ports to push a 1 in the code. However, nothing is happening when I latch the (hopefully) created code to the outputs.

Could someone give me an explanation?

Tinkercad File

\$\endgroup\$
  • 1
    \$\begingroup\$ You need pull up or pull down resistors on the MR, STCP, SHCP, and DS pins so they have a known value when a button is not pressed. I also don't see how the DS and SHCP pins are connected to together as you seemed to imply. \$\endgroup\$ – HaLailah HaZeh Aug 13 '17 at 18:44
  • \$\begingroup\$ Well, I can close the switch, which is the same as holding the DS button (if there would be one), and then I'll click the SHCP button. I saw someone do this in real life but then used a button instead of a slide switch, but since I have got only one cursor on my pc I need to do it in steps. Thanks for the info. \$\endgroup\$ – Hendriks3D Aug 13 '17 at 18:53
  • \$\begingroup\$ Okay, so for every single knob and the switch, I added a 5K ohm resistor from the button/switch on the side of the shift-register to the gnd of the USB connector. Still nothing. \$\endgroup\$ – Hendriks3D Aug 13 '17 at 19:53
0
\$\begingroup\$

Try this circuit: https://www.tinkercad.com/things/k4OdCknoxLM-shift-register-demo

I got it to work on my computer. Let me know if the link doesn't work.

The main difference compared to your design is that the MR pin has a pull up resistor so that when the button is not pressed, the pin reads 5V, but when it is pressed, the pin reads 0V. This is necessary because MR is active low.

\$\endgroup\$
  • \$\begingroup\$ I got mine to work thanks to your help! There's still one problem left though. Yours has the same problem. Whenever you make six LEDs turn on, the current through the powerpins gets over 50mA which breaks the device in Tinkercad. I'm sure you can fix this by using npn transistors for every LED to make the shift register just a switch for the LEDs and not a power source. That's what I'm planning to do anyways because I'm going to make a digital clock and I'm going to use 4 74HC595's to get 28 LED zones controlled. Each zone has about 20 LEDs so I'll have to use NPN's. \$\endgroup\$ – Hendriks3D Aug 13 '17 at 22:56
  • \$\begingroup\$ @Hendriks3D The real devices are more durable than in Tinkercad. I have turned on all 8 LEDs with smaller value resistors than I used in the simulation and never had a problem. No need to use NPNs for every LED unless you are using especially high power LEDs. \$\endgroup\$ – HaLailah HaZeh Aug 13 '17 at 23:17
  • \$\begingroup\$ I uploaded my version in small now. I am now sure that my clock plan will work. tinkercad.com/things/cN8OlgbA9FZ-test-using-74hc595 \$\endgroup\$ – Hendriks3D Aug 13 '17 at 23:23
  • 1
    \$\begingroup\$ I used the NPN's for a test, but in my clock, the segments of the digits use a maximum of 20 LEDs each. A total of 474 LEDs on a board, a total of 456 LEDs on the shift registers. The NPN's are definitely needed XD. \$\endgroup\$ – Hendriks3D Aug 13 '17 at 23:25

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.