Control 5VDC with 120VAC

Interesting solution @peekay123 , as it keeps everyone’s fingers out of the AC.

1 Like

@jvanier
Well you are quite a bit more ambitious than me as I didn’t want to build my own ‘device’. I think I have settled on this relay now. Its nice in that it has screw terminals which will allow me to have a professional look that requires no soldering when I install it inside an electrical cabinet. And if I’m interpreting the specs properly, I can use 120-240VAC as the input (trigger / control) and 5-200VDC as the output (load / photon).

@peekay123
I like your idea, but it sounds like it would require more software work than a simple relay would require.

As always I greatly appreciate the awesome support of the Spark … erm… Particle community!

I’m only a hobbyist but I think the thing @peekay123 is describing is just a Hall effect sensor; those are available as small self-contained parts from all your favorite vendors, requiring minimal effort to integrate them with a Particle. For example, https://www.sparkfun.com/products/11005

This thread is very useful, I have a similar application but I need to know the state of the circuit - not whether the pump is running, but whether it has the line power to run if needed. A Hall effect sensor won’t work for my application so I was searching for a 120v optoisolator and either the one mentioned here, or the relay suggestion, will work perfectly. Thanks all!

There are also some cute chips with built-in isolation, eg the TI AMC1100. See this appnote: http://www.ti.com/lit/an/slaa552/slaa552.pdf

Figure 5 has a minimal setup; you could connect the pin 7 output directly to an ADC pin. Note that you DO need to lay out your own board and follow the isolation requirements though (and things like the 2x1M in series are intentional, to allow one to fail short without frying everything). This also gives you zero-cross information which is probably OTT for your application, but hey.

A relay is far by the simplest (and safest, as you can buy them housed) setup, as long as you don’t mind the noise.

1 Like