Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




4212 posts

Uber Geek
+1 received by user: 593

Trusted

Topic # 206132 11-Dec-2016 08:46
Send private message

As part of this thread @richms and @sumnerboy talked about controlling a garagedoor via wifi.

 

http://www.geekzone.co.nz/forums.asp?forumid=141&topicid=198633&page_no=1#1593900

 

I have a fan circuit (2 x 12v 120mm fans) that I have just put in for cooling down my comms rack when it's a warm day.  I don't think it needs to run 24x7 so I'd like to add some smarts to it.

 

In the same cupboard, but about a 3m ethernet cable away is a raspberry pi that I use for monitoring my UPS (usb connected) and it also has two gpio connected dht22 sensors (so it's pretty loaded up).

 

What I'd like to do is using the temperature sensors in that cupbaord (which are fed into openhab via mqtt) is to turn on those fans when the temp gets up above 25 degrees.

 

So the posts of @sumnerboy where talking about wemo d1 and relay shield, but as far as I can tell they are 5v.  So I don't know enough how to make 5v devices control 12v ones.

 

I assume I could also wire something in to that existing raspberry pi (assuming it doesn't use any of the 6 GPIO posts I'm already using) and control it that way.

 

Preferably, I'd rather that whatever I end up doing is already powered, but either the current pi, or by the 12v circuit itself (ie I'd rather not has an independently powered device).

 

 





Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


Create new topic
2644 posts

Uber Geek
+1 received by user: 1280

Lifetime subscriber

  Reply # 1685953 11-Dec-2016 09:04
One person supports this post
Send private message

The relays are controlled by up to 5V (3.3V is OK), but can switch 12V DC (or 240V AC) no problem at all. Any GPIO pin that can be set to output can be used.

 

On my 3D printer, I have a RPi 3 switching 10A @ 12V via a 4-relay board. NB that relays consume a bit of current... I had to upgrade my RPi power supply because at boot all 4 relays turned on, which sucked all the power, which caused the RPi to reboot again. A single relay was OK.

 

You might want to think about a MOSFET instead of a relay... you would then be able to control the fan speed by PWM... this is common in 3D-printing.

 

 


14423 posts

Uber Geek
+1 received by user: 2651

Trusted
Subscriber

  Reply # 1685954 11-Dec-2016 09:10
3 people support this post
Send private message

Do you want a toy or do you want a solution? You can get a 12V thermostat with a relay from ebay for about $15.





AWS Certified Solution Architect Professional, Sysop Administrator Associate, and Developer Associate
TOGAF certified enterprise architect
Professional photographer


 
 
 
 




4212 posts

Uber Geek
+1 received by user: 593

Trusted

  Reply # 1685955 11-Dec-2016 09:16
Send private message

frankv:

 

The relays are controlled by up to 5V (3.3V is OK), but can switch 12V DC (or 240V AC) no problem at all. Any GPIO pin that can be set to output can be used.

 

On my 3D printer, I have a RPi 3 switching 10A @ 12V via a 4-relay board. NB that relays consume a bit of current... I had to upgrade my RPi power supply because at boot all 4 relays turned on, which sucked all the power, which caused the RPi to reboot again. A single relay was OK.

 

You might want to think about a MOSFET instead of a relay... you would then be able to control the fan speed by PWM... this is common in 3D-printing.

 

 

 

 

 

 

I think that might all be above my skill level.  I'm much better on software than I am on electronics.  Pre-made components are more my bag, or the simple cobbling together of some parts.





Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex




4212 posts

Uber Geek
+1 received by user: 593

Trusted

  Reply # 1685967 11-Dec-2016 10:02
Send private message

timmmay:

 

Do you want a toy or do you want a solution? You can get a 12V thermostat with a relay from ebay for about $15.

 

 

 

 

ooooooh, so while not controllable, this is independent entirely and therefore if temp reaches xyz then activate fan.





Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


273 posts

Ultimate Geek
+1 received by user: 40

Lifetime subscriber

  Reply # 1685979 11-Dec-2016 11:07
Send private message

while not as much fun as this project, i used the aeotec zwave garage door opener which works fine. Also tells me when door has been left open


1664 posts

Uber Geek
+1 received by user: 188

Subscriber

  Reply # 1685982 11-Dec-2016 11:14
One person supports this post
Send private message

The Wemos relay shield is a mechanical relay so it can switch anything from 5vdc to 240vac, although you would want to limit the current. The relays say they can switch 10A but you would be mad to trust them with that!

Not sure off the top of my head but the Wemos might have an on board regulator so feeding 12VDC might work out of the box into VCC.

So you could power it with your 12VDC and have the relay switching your control signal.



4212 posts

Uber Geek
+1 received by user: 593

Trusted

  Reply # 1685989 11-Dec-2016 12:13
Send private message

t0ny:

while not as much fun as this project, i used the aeotec zwave garage door opener which works fine. Also tells me when door has been left open



I really want to play with zwave but the initial cost is a bit of a barrier. And all the cool stuff has eu frequencies (radiator valves anyone?)




Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex




4212 posts

Uber Geek
+1 received by user: 593

Trusted

  Reply # 1685990 11-Dec-2016 12:14
Send private message

SumnerBoy: The Wemos relay shield is a mechanical relay so it can switch anything from 5vdc to 240vac, although you would want to limit the current. The relays say they can switch 10A but you would be mad to trust them with that!

Not sure off the top of my head but the Wemos might have an on board regulator so feeding 12VDC might work out of the box into VCC.

So you could power it with your 12VDC and have the relay switching your control signal.


So how would that look, wemos d1 with a relay shield ? Then how would it be wired?




Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


1134 posts

Uber Geek
+1 received by user: 256


  Reply # 1685995 11-Dec-2016 12:43
Send private message

Alternative solution could be - thermistor (e.g. 10kOhm, changes resistance with temperature) in the mosfet gate circuit. Mosfet in turn would control your fan directly or through relay.




4212 posts

Uber Geek
+1 received by user: 593

Trusted

  Reply # 1686118 11-Dec-2016 17:04
Send private message

Slight change of plan.  I bought an chromecast audio today, so my raspberry pi that was volumio has just become free.  And I've put it in the enclosure that the fan is cooling.  It has a dht22 temp sensor (I put them on all my raspberry pi's for giggles).  So it's now possible that it can do the detection and control of the fan.

 

To that end, would this work:

 

http://www.14core.com/wiring-mosfet-module-board-on-higher-loads-with-motor/

 

I get the impression it passes through the 12v power controlling the fan, and the raspberry pi just turns on a switch (of which it can be done via code from the dht22).

 

Am I right?





Previously known as psycik

NextPVR: 
Gigabyte AMD A8 Brix --> Samsung LA46A650D via HDMI, NextPVR,
OpenHAB: ODroid C2 eMMC DriveOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 2012 
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


2644 posts

Uber Geek
+1 received by user: 1280

Lifetime subscriber

  Reply # 1686134 11-Dec-2016 18:10
Send private message

SumnerBoy: The Wemos relay shield is a mechanical relay so it can switch anything from 5vdc to 240vac, although you would want to limit the current. The relays say they can switch 10A but you would be mad to trust them with that!

Not sure off the top of my head but the Wemos might have an on board regulator so feeding 12VDC might work out of the box into VCC.

So you could power it with your 12VDC and have the relay switching your control signal.

 

Wemos D1 mini is supplied by 5V DC, regulated down to 3.3V. 12V to 5V buck voltage converters are cheap as... I have several that I use for D1s.

 

davidcole: I think that might all be above my skill level.  I'm much better on software than I am on electronics.  Pre-made components are more my bag, or the simple cobbling together of some parts.

 

 

I'm more into software than electronics too. Relay boards for the RPi are available as pre-made components. Then you just need 3 jumpers for 5V, GND, and a GPIO pin. Google will find lots of sites which tell you how to do it.

 

 


Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.