Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Maximum Number of Zones
#71
(2021 Jun 28, 12:22 PM)astrogerard Wrote: Good, but you should connect it to the upper GND rail, otherwise the hc595 doesn't get power

Personally I would hard-wire it just to elliminate a potential unwanted external factor.

We have to figure out which wires (antennas) pick up these signals. I'm thinking of:
- is it coming through the psu/adapters?  Most adapters have a bad or no EMI filtering. The UPS does surge protection but I doubt if ther is sufficient EMI filtering. You could test this by putting all non essential psu's away (far in front) of the ups.
- The power wires to the Pi are close to the ups, fan and other components. Decoupling (with 0.1 caps) might help
- Although Dan acknowledges the Pi pin initialisation I'm not so sure if the internal pull-up resistors are enabled. To be sure you coud add on pin 11, 12, 14 on the hc595' a resistor of 4k7 or 5k6 to +5v 
- On your foto I can't see my earlier suggestion of the 100 Ohm resistor in series with pin 12 of the hc595. Together with the previous suggestion  (and neatly ordering the spahgetti) I'm really interested in the results. 


--Gerard

So how would you suggest I wire for GND from the SHIFT REGISTERS to the TOP POWER RAIL?  Currently there is a short wire attached to the BOTTOM POWER RAIL GND from each of the SHIFT REGISTERS and a wire connecting the BOTTOM POWER RAIL GND to the TOP POWER RAIL GND.  Are you saying I should replace the short GND wires and replace with longer ones and attach to TOP POWER RAIL GND?

So should I reconnect the PURPLE wire from PIN 13 of SHIFT REGISTER to TOP RAIL GND?

"You could test this by putting all non essential psu's away (far in front) of the ups."  Unfortunately I do not have that option. 

"The power wires to the Pi are close to the ups, fan and other components. Decoupling (with 0.1 caps) might help"   So you want to to connect the 0.1uf to the POSITIVE (+) of the BREADBOARD and the connect the wire coming from the Pi 5v+ to the 0.1uf???

My order for 47uF 25v should arrive today and will install ASAP.

I have 0.1uf capacitors and 10k Ohm resistors will need to order 100 Ohm resistors and the 4k7.

"(and neatly ordering the spahgetti)" any suggestions on how to make the runs shorter?  

"I'm really interested in the results."  Me to.  I really need to get this working.
Reply
#72
Connecting GND to the hc595 should be as short as possible and the best is connecting all hc595 to a common GND.  You could use the bottom rail for it as long as there are no ground loops and everything is decoupled. For decoupling you could connect the top 5v also to the bottom rail and put 2 caps (0.1 + 47uF) on it.

Pin13 to GND is safe to do and you eliminate a (long) wire.

Instead of the 4k7 as a pull-up you could also use a 10k. If pull-up is part of the issue even with 10k you should notice the difference.
edit: since the Pi's pins are configured as output it shouldn't make any difference. You could try it with 10K anyway

If you don't have a 100 resistor you could also use a small coil if you have one.  May be you have some scrap pcb's and could salvage components from there. I have many components in stock but quit often I miss a certain value. In that case I browse through a box with old circuit boards and mostly will find something close to what I'm looking for. May be this works for you too.

Another experiment you could try is connecting the hc595 to +3.3V instead of +5V.  The 3.3V on the Pi is way more stabilized than the +5V so if the issue is related to the +5V supply you should notice quit a difference on 3.3v 

You will get there eventually. :-)

Edit: pull-up
Reply
#73
(2021 Jun 28, 06:05 PM)astrogerard Wrote: Connecting GND to the hc595 should be as short as possible and the best is connecting all hc595 to a common GND.  You could use the bottom rail for it as long as there are no ground loops and everything is decoupled. For decoupling you could connect the top 5v also to the bottom rail and put 2 caps (0.1 + 47uF) on it.
Sorry for all the NOOB questions and asking the same questions more than once.  Confused

Received my 47uF resistors.

I want to verify placement.

Attache one 47uF at each end of the TOP POWER RAIL  Putting the negative lead into the ( - ) and the positive lead into the (+) of the POWER RAIL.  Does it matter which row it is in?  ie Should it be in the very first (+) and (-) or the  (+) and (-) just after the 5v and GND connections from the Pi?

Should I do the same to the bottom rail if I connect the (+) from the TOP to the BOTTOM POWER RAIL as well as add a 0.1 in like fashion.

FYI I swapped out the Pi power supply/charger with a 5v 8 amp power supply hoping that it would resolve the issue at hand but it failed to do so.

I also shortened by half the 5v wires from the BREADBOARD to VCC of the RELAY MODULES.  This also did not have improve the outcome.
Reply
#74
No problem for the "NOOB questions". For me it is quit difficult to handle the issue without having the stuff on my workbench. It could be anything and we have to handle it by the well known processes "trial and error" and/or "elimination".

In general, if you want to stabalize power you need a large and a small cap. The large cap handles ripple of lower frequencies the smaller cap is faster and will handle higher frequencies but with a limit. If the noise or spikes are to large than it is better to use a LC (coil/cpa) or RC (resitor/cap) circuit. Therefore the suggestion of the 100 Ohm resistor in series with a 0.1 uF cap behind the R (on the hc595) side. Several cases of unwanted behaviour of the hc595 can be found on the internet and are solved with this RC circuit.

Swapping the Pi psu was a good test to do. If it makes abolutely no difference than you can eliminate the psu (for now). If it did make a significant difference but didn't solve the problem than the psu could still be something to look at.

I was also wandering if all 4 boards are showing erratic behaviour or is the first board different? The data from the Pi is clocked in on the first hc595 (pin 14) and the overflow bits are exitting on pin 9 which is connected to the next hc595. If the noise/spikes are on the data, clock or latch pins than you could a test with connecting these pins to gnd. Of course the circuit does not work but I 'm curious if you pull the black and brown wire from the Pi and connect them to GND what happens if you do what you do (pull fan?) to generate the issue.

The above might not solve the problem but is merely to identify the entrypoint of where the problem enters your circuit.
Reply
#75
(2021 Jun 29, 12:09 PM)astrogerard Wrote: In general, if you want to stabalize power you need a large and a small cap. The large cap handles ripple of lower frequencies the smaller cap is faster and will handle higher frequencies but with a limit. If the noise or spikes are to large than it is better to use a LC (coil/cpa) or RC (resitor/cap) circuit. Therefore the suggestion of the 100 Ohm resistor in series with a 0.1 uF cap behind the R (on the hc595) side. Several cases of unwanted behaviour of the hc595 can be found on the internet and are solved with this RC circuit.


I was also wandering if all 4 boards are showing erratic behaviour or is the first board different?  The data from the Pi is clocked in on the first hc595 (pin 14) and the overflow bits are exitting on pin 9 which is connected to the next hc595.  If the noise/spikes are on the data, clock or latch pins than you could a test with connecting these pins to gnd. Of course the circuit does not work but I 'm curious if you pull the black and brown wire from the Pi and connect them to GND what happens if you do what you do (pull fan?) to generate the issue.

The above might not solve the problem but is merely to identify the entrypoint of where the problem enters your circuit.


"For me it is quit difficult to handle the issue without having the stuff on my workbench." 

PM me your address and I will be happy to send it to you.  Big Grin  

"If it makes abolutely no difference than you can eliminate the psu (for now)."

No Change in outcome. 

"I was also wandering if all 4 boards are showing erratic behaviour or is the first board different?"

As I unplug and plug in the USB power wart from UPS (GROUNDED ONLY OUTLET)  the triggering appears to start on the FIRST RELAY MODULE. As I continue to unplug and plug in the USB power wart from the UPS the triggering progresses thru to the other RELAY MODULES.  Sometime it triggers one optocoupler sometime it triggers multiple optocouplers.

"Another experiment you could try is connecting the hc595 to +3.3V instead of +5V."

I just say that from one of your earlier post.  Have not tried that yet.  Would I need to reconfigure how the optocoupler(s) are powered?

"Of course the circuit does not work but I 'm curious if you pull the black and brown wire from the Pi and connect them to GND what happens if you do what you do (pull fan?) to generate the issue."

I will give that a try.

You have been very helpful and I value the time you have spent with me on this issue.

Hope to have time later today to install the resistors and capacitors.  

If you are inclined feel free to dumb down where I need to connect what to what.  Undecided  

For example:

"Therefore the suggestion of the 100 Ohm resistor in series with a 0.1 uF cap behind the R (on the hc595) side."

Do I need to solder a 100 Ohm to a 0.1 uf and then where do I make the connections?

"could connect the top 5v also to the bottom rail and put 2 caps (0.1 + 47uF) on it"

Do I put the 0.1 + 47uF in the pin holes of the BREADBOARD or to I solder the 0.1 + 47uF and the attach to the 5v wire connecting the top and bottom power rail.

"To be sure you coud add on pin 11, 12, 14 on the hc595' a resistor of 4k7 or 5k6 to +5v "

Would that go on each of the SHIFT REGISTERS or just the first one? And would that connection be made between each of the pins and the TOP POWER RAIL (+) 5v?
Reply
#76
3.3v instead of 5v is just to try to see if the problem is still there, the led's will be a bit less bright but you will still see them.

For connecting the resistors I made a (very quick) drawing which I will attach. Hopefully you can get the idea. 
Only 1 pull-up resistor is needed (so not on all hc595')

The 0.1 + 47uF should be as close as possible to the circuit and with short as possible wires. I would also put one on the connector plug adapter on where you connect the breadboard wires.

A personal note: Tomorrow I have to undergo a small operation so I might be offline for a few days.

--Gerard


** EDIT **  !!!  Error in attached drawing: Label Pi_14 is wrong, should be Pi_13 !!!


Attached Files Thumbnail(s)
   
Reply
#77
(2021 Jun 29, 07:59 PM)astrogerard Wrote: A personal note: Tomorrow I have to undergo a small operation so I might be offline for a few days.

--Gerard


Gerard I hope all goes well for you tomorrow/today. (Not sure what timezone / part of the world you reside.)  You will be in my thoughts and prayers tonight and tomorrow.  

I will do my best to digest that boss level Idea Exclamation  diagram you provided.

Hopefully I'm not invoiced for all time and guidance you have provided.   I could not afford your level of expertise.   Wink  ( I hope that is the correct emoji. )
Reply
#78
So I'm more or less back online and I'm curious if you made any progress in the last week.
Hopefully you have tested a few suggestions and can give me an update on it. We can pickup from there then.

--Gerard
Reply
#79
(2021 Jul 08, 09:24 PM)astrogerard Wrote: So I'm more or less back online and I'm curious if you made any progress in the last week.
Hopefully you have tested a few suggestions and can give me an update on it. We can pickup from there then.

--Gerard

Glad you are up and about and back online.

Unfortunately I have not made any progress with the "experiment".  Life got in the way and now the weather.

Have all the parts on hand that you have suggested and I am ready to give it ago.

The diagram you created is great but it's a little like hieroglyphics.

Sort of seeing the logic, I think, but putting it into practice and wiring the BREAD BOARD is another thing all together. 

I need to review your past suggestion so I can verify where I left off.

It would be great to get this working.

Once again glad you are up and about.
Reply
#80
Thanks for the kind words!

The schematic diagram could indeed be a little confusing seeing this for the first time. Also I made a mistake in a Raspi Pin label (see edit).

Although I don't like Fritzing I did try to make a new drawing like the one in the SIP wiki but with the wiring as shown in the schematic diagram. Hopefully this makes a little more sense to you.

While recovering from surgery I ordered some hc595'. In the coming days/weeks I will try to find the time to make the same circuit and see if I can make it fail too.

Let me know when you have done some testing. 

--Gerard


Attached Files Thumbnail(s)
   
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)