EmonGlcd relay

Robert Wall's picture

Re: EmonGlcd relay

DIO8 is available on the JeePort expansion connector, so yes, it is possible to connect a suitable driver and a relay.

(It is wrongly labelled "DIO6" on Versions 1.3 and 1.4 of the pcb, and see here how to correct a manufacturing error on those boards.)  Version 1.5 of the pcb is correct.

(Martin: you got there while I was editing this!)

MartinR's picture

Re: EmonGlcd relay

Be aware of the bug shorting out DI08 on version 1.4 of the PCB though.

see: http://openenergymonitor.org/emon/node/2063

zeno's picture

Re: EmonGlcd relay

I have this relay
http://www.ethermania.com/shop/index.php?main_page=product_info&cPath=91...

Connect DI08 to relay pin enable,
Vcc and grd relay to vcc and grd EmonGlcd

For sketch solarpv, where is the pin for relay control?

Button 2 (switch2) pin 15 is not used. I use this for relay.

I want to change a emoncms to turn off/on the relay.

Thak

Robert Wall's picture

Re: EmonGlcd relay

"For sketch solarpv, where is the pin for relay control?"

There is no pin already defined in the emonGLCD_SolarPV.ino sketch. You must add it - like "const int RelayPin=8;" and "pinMode(RelayPin, OUTPUT);"  then turn the relay on and off with "digitalWrite(DIO8_pin,1);" and "digitalWrite(DIO8_pin,0);"

The guaranteed minimum output from DIO8 in the HIGH condition is 2 V, and the guaranteed maximum output from DIO8 in the LOW condition is 1 V;  your relay must turn on with an input signal of 2 V or more and turn off with an input signal of 1 V or less.

 

"Button 2 (switch2) pin 15 is not used. I use this for relay."
"I want to change a emoncms to turn off/on the relay."

I do not understand. Do you want to

(1) operate the switch by hand to turn the relay on and off, or

(2) do you want your server and the computer program emoncms to turn the relay on and off automatically, or

(3) do you want to write code in your emonGLCD sketch to turn the relay on and off automatically?

zeno's picture

Re: EmonGlcd relay

I want to turn relay on-Off to botton on EmonGlcd and via web with emoncms.

I want to test my relay to swich a signal on 2 volt.

Robert Wall's picture

Re: EmonGlcd relay

You will need to copy the switch de-bounce code from a sketch such as SolarPV.ino to work the relay from the GLCD, but working it from emoncms will be harder. At the GLCD, you must write some code (like detecting the time message from emoncms) to turn the relay on and off. I do not know enough about emoncms to be able to help you with writing the routines that you will need to add to emoncms to generate the message.

zeno's picture

Re: EmonGlcd relay

thank Robert

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.