Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

Reply To: How to get a 5V signal out based on a sensor reading

Home Forums Mayfly Data Logger How to get a 5V signal out based on a sensor reading Reply To: How to get a 5V signal out based on a sensor reading

#15608
Shannon Hicks
Moderator

What’s the duration of the 5v signal you want to generate?  And how much current does the 5v actuator draw?  Pin D22 controls the switched 3.3v and 5v outputs together, so there’s no way to separate the two.  However, a Hydros-21 CTD sensor uses very little current when it’s constantly powered, so you could plug the CTD into the D4-5 Grove jack, then move the jumper switch for the D4-5 jack over to the “3.3v” setting instead of the “3.3v Switched” setting, so the sensor would be constantly powered.  Be sure to change the CTD channel number in your sketch to “5” instead of “7”.  Your CTD sensor will now be constantly powered, but will only use measureable amounts of power when you send the SDI-12 command to take a reading, which most sketched do once every 5 minutes.  Then you could put the jumper on the D10-11 jack set to “5v switched” and when you turn on D22, the Grove jack’s Vcc pin will get 5 volts.  This would only work if you have no other sensors on the D22 line that you want to control.

The other option would be to use a Grove relay board, like one of the ones from here: https://wiki.seeedstudio.com/Seeed_Relay_Page/ (only the ones with 3v excitation though) which would allow you to control a relay that’s capable of switching high current or high voltage signals.  But you’d still have to figure out where you’re getting the 5v signal, which again depends on how much current you’re trying to control and for how long.