2021 Jun 24, 06:24 PM
(This post was last modified: 2021 Jun 24, 06:30 PM by astrogerard.)
(un)plugging an usb device is always a bit tricky especially when it is a fan. A fan is a motor and by disconnecting the fan there will be a (huge) spike on the 5v rail since the usb 5v is directly connected to the 5v pin on the pi. Earlier you mentioned when switching on/off devices on the mains the undesired switching also occurs. I assume you don't have an oscilloscope to identify the problem so you must eliminate the problem with trial and error. putting the right capacitors in various places is a good start.
To your questions/remarks the following:
- the 47uF capacitor should be at rated at 16v or higher when using it on the 5v rail.
- assuming the top rail gets power from the Pi and is only powering the shift registers decoupling with 1 (or 2 on each end) is a good practice
- the bottom power rail makes no sense to me why you have this connected. The best is to use the extra psu only for powering the relay boards and try to keep these wiring away prom the Pi and shift registers.
- do not connect both GND's (top and bottom) together. Keep them isolated from each other.
- the Pi is very sensitive on the supplied voltage. The original psu's deliver 5.1 or 5.2V. Most 5v adapters are made for charging and usually show a voltage drop to way below 5v. The Pi can then easily brown out or gives erratic behavior. So, use a good psu for the Pi with the right voltage and use the cheaper ones for the relay board(s).
The UPS I can't say much about it. From the datasheet I see there is noise suppression on the outlets but I'm not sure if this is sufficient or of any influence on your issue.
I always salvage inlet filters (e.g. like this) from old equipment and reuse these on most of the diy stuff I do. Also on my SIP irrigation system such a filter is present so the garden is not watered when I'm turning on the table saw, lathe, mill or start welding
For a book recommendation, I'm not the right person to give advice. Although I studied "higher electronics" many many ears ago, the last 30 years I learned by doing. The internet is one huge book of which some is true.
Hopefully you will find the solution soon. Don't give up, your almost there.
To your questions/remarks the following:
- the 47uF capacitor should be at rated at 16v or higher when using it on the 5v rail.
- assuming the top rail gets power from the Pi and is only powering the shift registers decoupling with 1 (or 2 on each end) is a good practice
- the bottom power rail makes no sense to me why you have this connected. The best is to use the extra psu only for powering the relay boards and try to keep these wiring away prom the Pi and shift registers.
- do not connect both GND's (top and bottom) together. Keep them isolated from each other.
- the Pi is very sensitive on the supplied voltage. The original psu's deliver 5.1 or 5.2V. Most 5v adapters are made for charging and usually show a voltage drop to way below 5v. The Pi can then easily brown out or gives erratic behavior. So, use a good psu for the Pi with the right voltage and use the cheaper ones for the relay board(s).
The UPS I can't say much about it. From the datasheet I see there is noise suppression on the outlets but I'm not sure if this is sufficient or of any influence on your issue.
I always salvage inlet filters (e.g. like this) from old equipment and reuse these on most of the diy stuff I do. Also on my SIP irrigation system such a filter is present so the garden is not watered when I'm turning on the table saw, lathe, mill or start welding
For a book recommendation, I'm not the right person to give advice. Although I studied "higher electronics" many many ears ago, the last 30 years I learned by doing. The internet is one huge book of which some is true.
Hopefully you will find the solution soon. Don't give up, your almost there.