[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.1612382 [View]
File: 10 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google]
1612382

>>1612369
If your arduino wants to sit at some strange voltage with respect to neutral (because of its peripherals) such that neither a full-bridge nor single diode rectifier will result in an equivalent 0V rail, an opto might help. Such as the battery charger using some strange step-down topology. Even if that isn't the case (it probably isn't) you may want to use capacitive droppers instead of resistive droppers, which mean you have to use a full-bridge and therefore get a ziggity-zaggity 0V rail with respect to neutral. Having this as the arduino's only reference to ground could mean you could get some noise on your pins if you don't shield the whole thing properly. This also applies if the battery charger circuit uses a full-bridge and you don't want to waste 4 diodes on each mains sensor I guess. I hate full-bridge rectifiers for the above reason, and only use them if I have to make a capacitive dropper circuit. A third reason would be just protecting your circuit from voltage spikes caused by the generator or relay or even external influences like lightning strikes.

Pic related is likely the simplest method to getting this to work properly. Using a 4.7V zener or something along those lines to replace R2 would be a better idea, but you probably don't have one lying about. R1 should be as big as reasonably possible to not waste power, anything from a few hundred kΩ to a few MΩ would work, and R2 should have a value that makes its peak value nearly 5V (170*R1/(R1+R2) = 4.5). The use of a zener or opto would help stop the thing from killing your arduino in the event of a voltage spike, but your entire circuit should be packed to the brim with protection and noise suppression circuitry anyway (MOVs, PTC thermisters, X and Y caps, common-mode and normal-mode suppression chokes, etc) and I doubt you'll bother with those.
Also you better be fucking using interrupts to save battery if it isn't being charged constantly, and you better have a freewheel diode.

Navigation
View posts[+24][+48][+96]