2021 Jul 29, 07:54 PM
(This post was last modified: 2021 Aug 10, 09:08 PM by astrogerard.)
Hi Rob,
I did a lot of testing with the shift register setup. Bottom line of all the hours of testing is that the schematic I made some time ago works as expected.
But.... also the original drawing which is in the wiki works with some minor remarks.
First of all, the optional capacitor of 0.1uF is not optional. additionally a series resistor as drawn in my schematic is also advised to include. The values however must be a little adapted. When using a 0.1uF cap it is better to use a 47Ohm resistor. With my oscilloscope I checked the timing on the GPIO ports but when using 0.1uF and a R100 resistor the latch(Pi pin 15) needs a little too much time to go from high to low or vice versa. So a resistor of R47 (or two R100 in parallel) is a safer choice.
With both my drawing and the (slightly modified) wiki drawing I did a lot of testing with external devices like fans, motors, relays and other stuff to try to fail the circuit. With the not-optional cap connected it didn't fail even once. Without the cap the circuit sometimes goes bananas.
When I had the scope connected I do see unexpected signal levels in the sense that when everything is at rest the data, latch and clock signals remain high. You would expect these signals to be low. I'm not sure if this could make the circuit extra sensitive to noise or spikes so additional testing is needed. I will make some changes to the code and see if it is of any influence.
So, what can you do?
1. make sure the psu of the pi is from a decent quality or change the psu and see if it makes any difference. I powered my test Pi3b with a Samsung 5v phone charger. This (dodgy) charger is not suitable to power a Pi but did way better than expected.
2. recheck if the (non) optional capacitor is connected between pin 12 of the hc595 and GND. With preferably a series resistor of about R47 to P15 on the Pi.
3 recheck all the wiring if firmly connected. Be aware that using a breadboard and breadboard wires you will never get a solid/permanent solution. It (usually) works on the bench but in the field I would definitely solder the components on a perfboard.
4. If everything fails first try to simplify the setup to 8 channels by using only one hc595 and one relay board. Disconnect everything else and see it this works without any problem. From there expand the setup.
As we discussed via mail we both are a bit busy this and next month so lets take the time we need and update this thread when you or I have any news on this topic.
--Gerard
I did a lot of testing with the shift register setup. Bottom line of all the hours of testing is that the schematic I made some time ago works as expected.
But.... also the original drawing which is in the wiki works with some minor remarks.
First of all, the optional capacitor of 0.1uF is not optional. additionally a series resistor as drawn in my schematic is also advised to include. The values however must be a little adapted. When using a 0.1uF cap it is better to use a 47Ohm resistor. With my oscilloscope I checked the timing on the GPIO ports but when using 0.1uF and a R100 resistor the latch(Pi pin 15) needs a little too much time to go from high to low or vice versa. So a resistor of R47 (or two R100 in parallel) is a safer choice.
With both my drawing and the (slightly modified) wiki drawing I did a lot of testing with external devices like fans, motors, relays and other stuff to try to fail the circuit. With the not-optional cap connected it didn't fail even once. Without the cap the circuit sometimes goes bananas.
When I had the scope connected I do see unexpected signal levels in the sense that when everything is at rest the data, latch and clock signals remain high. You would expect these signals to be low. I'm not sure if this could make the circuit extra sensitive to noise or spikes so additional testing is needed. I will make some changes to the code and see if it is of any influence.
So, what can you do?
1. make sure the psu of the pi is from a decent quality or change the psu and see if it makes any difference. I powered my test Pi3b with a Samsung 5v phone charger. This (dodgy) charger is not suitable to power a Pi but did way better than expected.
2. recheck if the (non) optional capacitor is connected between pin 12 of the hc595 and GND. With preferably a series resistor of about R47 to P15 on the Pi.
3 recheck all the wiring if firmly connected. Be aware that using a breadboard and breadboard wires you will never get a solid/permanent solution. It (usually) works on the bench but in the field I would definitely solder the components on a perfboard.
4. If everything fails first try to simplify the setup to 8 channels by using only one hc595 and one relay board. Disconnect everything else and see it this works without any problem. From there expand the setup.
As we discussed via mail we both are a bit busy this and next month so lets take the time we need and update this thread when you or I have any news on this topic.
--Gerard