0
\$\begingroup\$

I want to monitor whether a fan is turned on or off. No RPM, no voltage levels... simply just is it on or off. The fan is 12V and is controlled by a relay. The relay is closed when a thermocoupler reaches a certain temperature and grounds the internal coil, closing the contacts and providing power to the fan.

I was going to go through the hassle (actually I already did, just haven't installed it yet) of building a small circuit to convert the 12V down to 5V. Then I had a thought... what if I use the internal pull-up pin on the Arduino to set it "HIGH", and when the thermocoupler grounds, let that ground pull the Arduino pin "LOW," signaling that the fan is on?

I expect I will need to put some sort of safety measure inbetween the Arduino and the thermocoupler to guard against over-drawing the Arduino... but that should work right?

EDIT: A "proper" schematic

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
8
  • \$\begingroup\$ This is exactly how we signal 0 on the pulled-up digital inputs... \$\endgroup\$
    – Eugene Sh.
    Oct 17, 2017 at 14:25
  • \$\begingroup\$ 1) you should draw a schematic of the proposed solution, that avoids any misunderstandings. 2) As long as there is no other connection to the switch, i.e. it is a separate switch, you can do as you propose. However is the switch is used for something else as well then there must be some form of protection, as minimum protection use a 10 kohm series resistor to the input. That prevents any damaging currents from flowing. \$\endgroup\$ Oct 17, 2017 at 14:30
  • 1
    \$\begingroup\$ You need to make sure you don't pull the input pin higher than its maximum voltage range. \$\endgroup\$
    – HandyHowie
    Oct 17, 2017 at 14:30
  • \$\begingroup\$ Is it possible for Arduino to be powered off while the fan (and its relay) are operating? You must be careful not to provide a current path from relay-to-Arduino for this case, else the Arduino could do very strange things upon its power-up. \$\endgroup\$
    – glen_geek
    Oct 17, 2017 at 14:33
  • \$\begingroup\$ @glen_geek Each has its own relay, and the relays are powered (12v+) via the same switch. The Arduino relay is grounded all the time, while the fan relay is grounded only when the temperature is reached. If anything, the Arduino will be on without the fan on, which should be okay. \$\endgroup\$
    – jcmeyer5
    Oct 17, 2017 at 14:51

1 Answer 1

1
\$\begingroup\$

A simple diode to the relay should work for you if you use the pull-up on the Arduino input. The diode prevents the fan power from driving into the pull-up. If you are using a 3.3V Arduino you may need to use a germanium diode.

schematic

simulate this circuit – Schematic created using CircuitLab

A small series resistor would not hurt too just in case you happen to drive the pin with the relay closed.

\$\endgroup\$
10
  • \$\begingroup\$ It looks like you are suggesting driving the pin from the positive side of the relay? Or are you using a relay to represent the thermocoupler? I was planning to run from the ground to pull the pin low... with current limiting resistor of course. \$\endgroup\$
    – jcmeyer5
    Oct 17, 2017 at 15:10
  • 1
    \$\begingroup\$ Looks good, but a critical item is missing from this schematic - the Arduino must have a common-ground with the relay for this to work. It might be wise to show a more complete 5v supply for the Arduino. If the common-ground is forbidden, then so is this solution. \$\endgroup\$
    – glen_geek
    Oct 17, 2017 at 15:38
  • 1
    \$\begingroup\$ Guys, it's "thermocouple" as in "a couple of wires" - not a "thermocoupler". It doesn't couple heat between two objects. \$\endgroup\$
    – Transistor
    Oct 17, 2017 at 18:29
  • 1
    \$\begingroup\$ "Thermostat" is the word I think we're searching for. The thermocouple I mentioned is a two wire temperature sensor. \$\endgroup\$
    – Transistor
    Oct 17, 2017 at 22:43
  • 1
    \$\begingroup\$ Thanks @Trevor. I didn't even think to use the relay to switch ground. That make it work perfect. And much simpler than what I had \$\endgroup\$
    – jcmeyer5
    Oct 18, 2017 at 1:46

Your Answer

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

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