Activate power relays from weather data

Post Reply
Posts: 1
Joined: Thu Jun 16, 2016 12:48 pm
languages_spoken: english
ODROIDs: Odroid XU3 Lite
Has thanked: 0
Been thanked: 0

Activate power relays from weather data

Post by XJDHDR »

I currently have a project to have my Odroid XU3 Lite receive input from a weather sensor and then use the read values to activate or deactivate 4 relays that will switch a 230V power supply.

For the weather sensor, I am currently looking at this one: ... r-breakout
It is designed for the Raspberry Pi but I am wondering if I can use it with my Odroid? I noticed that Hardkernel did use the same sensor in their weather board and the data sheet states that the typical supply and output voltages are 1.8V

As for the relays, I have not been able to find a 230V rated relay that switches on less than 5V. Since the GPIO pins only put out 1.8V, I think I will have to attach the GPIO pins to a MOSFET that will be used to switch a 5V supply on and off. I have attached a circuit diagram of what I'm thinking about.
Relay circuit diagram.png
Relay circuit diagram.png (22.51 KiB) Viewed 68 times
Does anyone see any issues with it? I'm also thinking of using this MOSFET and this relay. Would these work for my project? My main concern currently is whether 4 of these relays activated simultaneously would draw more current than can be safely drawn from the GPIO's 5V pin (they each draw around 72mA according to my calculations) and whether the 1.8V output by the GPIO pins is enough to activate the MOSFET while not being more than it can handle.

User avatar
Site Admin
Posts: 35266
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean, Japanese
Has thanked: 1074 times
Been thanked: 821 times

Re: Activate power relays from weather data

Post by odroid »

The FET and relay are looking fine.
I think the 5V rail on the 30pin header can source 300~400mA at least and the you can driver four relays simultaneously.

BTW, is the internal diode in the MOSFET being able to act as a flyback protection diode?
Otherwise, you need to add a flyback diode for the relay .

User avatar
Posts: 1149
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 55 times
Been thanked: 128 times

Re: Activate power relays from weather data

Post by joerg »

The P-CH FET needs to be clamped to 5V to be in not conducted state. This can be archived with a pull-up resistor between Gate and 5V - BUT - this would connect 5V to the GPIO of the XU3. I think its GPIOs are not 5V tolerant. Consider to put a NPN transistor between the GPIO and the Gate. Or you can use directly a NPN transistor with low saturation voltage (like FMMT618) instead of a FET. In that case you need a free wheeling diode.

@odroid: Yes the diode in the Power-FET can act as free wheeling diode.
These users thanked the author joerg for the post:
odroid (Tue Sep 15, 2020 3:52 pm)

Post Reply

Return to “Projects”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests