1
\$\begingroup\$

I am much more comfortable in software than hardware, but I'm working on a home automation project to track water usage. I have a Dinel AFP-966-S fiber optic sensor positioned over the water meter - and that works. It changes state when the needle moves. I also have a Hobby Boards dual 1-wire counter. If I manually jump the C-A or C-B input to +5v, I see the counter rise in software. Perfect so far.

But I don't know exactly how to connect them because the Optical sensor requires 10-30VDC and the Dual Counter wants 5VDC. The dual-counter has an internal pull-down resistor, so I presumably have to send it a +5v signal to count. How? Surely I can't just connect the +5V and the +12V to the sensor because the dual counter will get +12v.... I guess here is where I'm stuck. Or do I have to tie in an opto-isolator between the two?

My guess is the internal pull-down resistor is working against me? Otherwise wouldn't I just tie a pull-up resistor to +5V and then tie all GND together? The sensor would pull down the logic pin instead of trying to pull it up? (If this is the easiest solution, I could remove the pull-down resistor, but that's a permanent move.)

Basically, I'm hoping the diagram below just needs one more wire, but where to PUT that wire?!enter image description here

\$\endgroup\$
7
  • \$\begingroup\$ do you have 12V and 5V supplies available for these devices? You can simply use 2 resistors from the output of the 12V device to make it ~4.5V so the 5V device is not damaged, but will still get the logic HIGH and logic LOW that you need etc. \$\endgroup\$
    – KyranF
    Oct 3, 2014 at 5:57
  • \$\begingroup\$ the pull down resistors are only there to stop the pins from floating and to protect them from false triggers in an electrically noisy environment \$\endgroup\$
    – KyranF
    Oct 3, 2014 at 5:58
  • \$\begingroup\$ Would you say my only two options are (A) power everything from a single source, stepping down the voltage for the 1-wire system, or (B) use an opto-isolator (or some other intermediate components) to fully isolate the two components? \$\endgroup\$
    – Adamlive
    Oct 3, 2014 at 6:32
  • \$\begingroup\$ And if I'm not mistaken, a standard PC power supply has +12v and +5v already? I have a few of those around, I could just dedicate one to the 1-wire system and that'd be more than sufficient. \$\endgroup\$
    – Adamlive
    Oct 3, 2014 at 6:33
  • \$\begingroup\$ You say the optical sensor needs 10+ VDC, so power that from 12V. What is the output from the optical sensor? It might actually have 5V outputs, do you have a datasheet link for it? \$\endgroup\$
    – KyranF
    Oct 3, 2014 at 6:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.