PDA

View Full Version : 120 line to 5v signal



AMay
- 11th August 2008, 18:24
Building a remote water valve. The valve motor limit switchs provides full line voltage when limit is achieved. I want to use this for transmission of feedback to the controler.

I know I can use transformers or relays, but it seems there must be a more elegant way. 120 volt relays are bigger than I like, as are transformers. Considered using current sensors which would signal limit achieved or an open connection, but that would not warn me about open trouble.

I will probably wind up making my own optocoupler with the smallest 120v bulb I can find unless I can find a better ready made solution.

Any thoughts will be appreciated.

AMay

skimask
- 11th August 2008, 18:28
Can't you butt a lever switch up against the valve itself? Valve arm hits the lever switch, connects the dots, send the 5v...
Or do you need an actual voltage that is proportional to the voltage going to the valve itself?

AMay
- 11th August 2008, 18:40
No, a small motor turns a shaft using gears. The limit switches are operated by cams on the shaft. There is not room to add another microswitch,

skimask
- 11th August 2008, 18:47
No, a small motor turns a shaft using gears. The limit switches are operated by cams on the shaft. There is not room to add another microswitch,
120VAC when the motor is at the limit? Maybe tap that 120VAC, plug it into a small wall-wart like power supply and send that output to the controller?
Past that, I would think a series current limiting resistor along with a voltage divider (and maybe a ZENER for protection) would do the trick...or a voltage divider that divides it down to +12v (or whatever) and feed that into a 7805 regulator.

I do like your light bulb idea though...simple, effective, practically zero thought/effort required :D
Did something like that awhile back. Needed to switch 120VAC with a PIC. Didn't want to mess with the AC, so I took a PIC, a servo, a chunk of threaded rod and a standard wall light switch...programmed the PIC to move the servo to move the light switch handle to turn power on/off. Almost perfect isolation...

dhouston
- 11th August 2008, 19:28
I will probably wind up making my own optocoupler with the smallest 120v bulb I can find unless I can find a better ready made solution.There are AC optocouplers intended for sensing presence of mains voltage.

However, since this is a PIC forum, Microchip AN236, which is about controlling X-10 devices, shows how to detect mains zero-crossing just using a 5M resistor and the built-in clamping diodes (on most PIC pins).