3
\$\begingroup\$

I have a project where I need to detect whether a 12V circuit is live or not. If it is I want to close a switch (actually close a digital IO input on an Adicon SECU16 Digital IO controller).

I am not an EE and would prefer to find a component off the shelf that I can tie into the 12V circuit and provide the relay.

I could choose to not use digital (Supervised) input and instead do analog, but I really don't care how much voltage I'm seeing just whether it's on or off.

I'm capable of soldering a few components on a prototype board, but my lack of EE knowledge means I need some serious help selcting the right components. The simpler the better.

Thanks in advance.

\$\endgroup\$
4
  • \$\begingroup\$ Is this an automotive environment? \$\endgroup\$ – tyblu Jan 14 '11 at 6:13
  • \$\begingroup\$ Nope, it is not automotive. It has to do with home automation. Why? \$\endgroup\$ – tig Jan 14 '11 at 8:51
  • 1
    \$\begingroup\$ 12V is common in auto electronics, and that environment comes with a whole bag o' trouble. \$\endgroup\$ – tyblu Jan 14 '11 at 13:33
  • \$\begingroup\$ @tyblu, I have actually done some auto-electronics and the signal quality was not as bad as promised. \$\endgroup\$ – Kortuk Jan 14 '11 at 14:54
2
\$\begingroup\$

You actually can do this with two resistors. Connect a 7kohm resistor from the signal line to your pin. Then connect a 5k resistor from your pin to your ground.(This is for 5V input, if you have 3.3 us a ~4k and a ~8k)

When 12V is input, it will show up as the logic level the chip knows, when 0V is there you will get 0V on the pin.

\$\endgroup\$
8
  • \$\begingroup\$ Just so I'm clear: By "connect a 5k resistor from your pin to your ground" you mean to the device I'm measuring's ground? I know there's 12V on the signal line because when I connect my volt meter to the line and the a ground point on the component. \$\endgroup\$ – tig Jan 14 '11 at 4:13
  • \$\begingroup\$ @cek, Your chip that is detecting this and your chip that is generating the signal need to have the same ground. If this is absolutely not an option, and I am not sure why it would not be, then we can discuss other options. Yes, it should connect from the pin you are measuring on to the chips ground. But This ground should be connected to your controllers ground also. \$\endgroup\$ – Kortuk Jan 14 '11 at 14:58
  • \$\begingroup\$ My "chip that is detecting" is an Adicon SECU16 digital IO controller that is connected to my home control system via RS-485. It sits in one room. The device I am monitoring the voltage of sits in another room. It's all the same Earth, so ground is ground, but... \$\endgroup\$ – tig Jan 14 '11 at 16:21
  • \$\begingroup\$ @cek, when you run a wire from one room to the other, the one that carries the signal, also run a ground reference. You can do the divide to 5V on either side. If you are going to run a long wire, I would suggest keeping a high voltage on the line for noise reasons. \$\endgroup\$ – Kortuk Jan 14 '11 at 16:24
  • \$\begingroup\$ I must not be understanding something. I built this: kindel.com/misc/12v%20to%205v%20circuit.png. If I apply the 12V signal I measure ~5V across the analog input leads...as expected. but as soon as I connect the analog IO sensor I read 1.3V (and the sensor reads 1.3V). Where is the additional resistance coming from? \$\endgroup\$ – tig Jan 21 '11 at 3:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.