reed relais

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

reed relais

#1 Post by remb0 » 24 Sep 2015, 23:54

Currently, I have an pi 1with a piface for a water meter and to control my buva mechanical ventilation.
I have done this with a breadboard with 4 reed relays. with the pi and piface i give for 1 sec 5volts to relay 1 2 3 of 4. and the button on the remote is pushed this way.

the wiring is simple: 1 ground to al relays. and 4 outputs (1 for every relay) from the relay to my controller it goes the same way. this way it can be controlled whitout draining battery.
Boxstream1.jpg
Boxstream1.jpg (60.21 KiB) Viewed 13702 times
but is this possible with easy esp?

So I can remote my old pi with the old piface?

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#2 Post by asm7100 » 25 Sep 2015, 01:19

Yes it is, but i will use a optocopler, i use it to trigger my canon 1200D (as a remote for the camera)
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#3 Post by remb0 » 25 Sep 2015, 09:42

You say yes, but can you explai which wire I must connect and how to configure in easy esp?

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#4 Post by asm7100 » 25 Sep 2015, 10:07

Give me some days, and i can make a diagram.
Is it 230V ac or just some buttons on a remote control?
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#5 Post by remb0 » 25 Sep 2015, 10:21

thank you very much. it's a remote controller with a tiny battery
Buva.jpg
Buva.jpg (145.9 KiB) Viewed 13687 times

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#6 Post by asm7100 » 25 Sep 2015, 10:40

Just made this quick.
Attachments
Just a quick remote control / ESP with low voltage "relays" optocupler.
Just a quick remote control / ESP with low voltage "relays" optocupler.
ESP-Remote control.png (12.48 KiB) Viewed 13685 times
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#7 Post by remb0 » 25 Sep 2015, 11:15

so the same way as my piface.. only with a 100 ohm (gonna figure out what that is and does )

I have an NodeMCU with EasyESP btw..
Gonna try it tonight. thanks a lot.


If it works I'm very happy because I can remove my pi and piface (the piface is very buggy with latest kernels and domoticz) and the product is end of life :(

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#8 Post by asm7100 » 25 Sep 2015, 11:55

Just ask and i will try to answer the best I can :-)

ESP-12 you can bye on aliexpress.com (bye the converter print to) The ESP-12 module has 1mm spacing, and that is not to use, soo bye the converter print also :-)
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#9 Post by asm7100 » 25 Sep 2015, 11:58

Bye the way love Domoticz :-)
Keep op the good work with that :-)
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: reed relais

#10 Post by BertB » 25 Sep 2015, 12:58

asm7100 wrote:Just made this quick.
Nice picture, but please keep in mind that the collector of a npn transistor needs a positive voltage with respect to the emitter to work.
Also keep in mind that some remotes scan their buttons.
What chip is being used in the remote?

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#11 Post by remb0 » 25 Sep 2015, 17:53

asm7100 wrote:Just ask and i will try to answer the best I can :-)

ESP-12 you can bye on aliexpress.com (bye the converter print to) The ESP-12 module has 1mm spacing, and that is not to use, soo bye the converter print also :-)
thanks. I know already bought that (but it took sometime to came from china :P )
I have no a lot of radio's esp's and nodemcu :)

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#12 Post by remb0 » 25 Sep 2015, 21:54

I have tested it this Evening. I can control a 2 relay board but when i want to control the other 5V SPST Miniature Reed Relay Switch On PCB i got stuck.
Is it posible tot make a wiring diagram which ports i must connecties and the setting i must use??

Other thinks like dht22 is not a problem. I use version 22

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#13 Post by asm7100 » 25 Sep 2015, 23:40

On ESP12 use 12,13,14 and 16, but remember ESP moduls are 3v3 and DO NOT USE 5V IT WILL KILL IT.
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: reed relais

#14 Post by BertB » 26 Sep 2015, 12:56

Please also check if your relays have clamp diodes. They prevent output transistors being destroyed by flyback currents.
If the relays do have such diodes, they also have a distinctive + and - pin. This is not always shown on the housing.
To overcome the 5 volt versus 3.3 volt problem, you could use a ULN2803. They also have the diodes.

Image

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#15 Post by remb0 » 26 Sep 2015, 21:02

Thank you all for helping. It works!

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: reed relais

#16 Post by BertB » 26 Sep 2015, 21:50

Do the relays work with 3.3 volts?

remb0
Normal user
Posts: 36
Joined: 24 Sep 2015, 23:47

Re: reed relais

#17 Post by remb0 » 28 Sep 2015, 19:36

Yes they do!

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#18 Post by asm7100 » 19 Oct 2015, 14:19

BertB wrote:
asm7100 wrote:Just made this quick.
Nice picture, but please keep in mind that the collector of a npn transistor needs a positive voltage with respect to the emitter to work.
Also keep in mind that some remotes scan their buttons.
What chip is being used in the remote?
Yes you are right, i just uses something like that to trigger my Canon D1200. :-)
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

rtenklooster
Normal user
Posts: 320
Joined: 15 Apr 2015, 14:17

Re: reed relais

#19 Post by rtenklooster » 19 Oct 2015, 19:32

Hi Bert,
I have a couple of those ULNxxx laying around. They came with the cheap servo's.
If i connect the "right" side to 12v, the left to 3.3v, i can trigger my doorlock using this simple chip? Is 3.3v enough to open the "gate"?
Interrusting, no need for level shifting on the outgoing side then?
Richard - Groningen (NL) - Image

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#20 Post by asm7100 » 19 Oct 2015, 22:12

If you connect a mcp23017 then you have 2x8 In/out more and only use 2 pins on the esp modul, it will say you can have 2x8 in/out on a esp-01 modul, and the MCP23017 has 3 address pins so you can have 8x (2x8) in/out port on a esp modul and only use 2 pins (the I2C bus)

Just a little info :-)
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

asm7100
Normal user
Posts: 96
Joined: 13 Sep 2015, 21:45
Location: Denmark

Re: reed relais

#21 Post by asm7100 » 19 Oct 2015, 22:12

rtenklooster wrote:Hi Bert,
I have a couple of those ULNxxx laying around. They came with the cheap servo's.
If i connect the "right" side to 12v, the left to 3.3v, i can trigger my doorlock using this simple chip? Is 3.3v enough to open the "gate"?
Interrusting, no need for level shifting on the outgoing side then?
That right.
5xESP-01 - 3xESP-12 - 2xESP-12E 3xRPIb+ - 1xBPIm1 - 3xACTi DOME - 7xACTi Indoor cam. Lot off cisco equ.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: reed relais

#22 Post by BertB » 19 Oct 2015, 22:26

The ULN2803 consists of 8 darlington drivers with open collector outputs.
On the output side (right end) they can sink up to 500 mA and can withstand up to 50 volts.
The output is the reverse of the logic level on the input side (left). So a logic 1 on the input will make the output go low.
There is a relation between the maximum sink current and the input voltage. The 2803 is optimized for 5 volts input. At 3.3 volts the sink current will be lower.
In many designs, the ULN2803 is used to give 3.3 volt designs more power. Examples of this are io boards for raspberry pi.

I do not know how much current your door lock uses, but you could try to use several gates in parallel, driven by just one of them.

On page 10 of the doc below is a nice explanation.
http://www.ti.com/lit/ds/symlink/uln2803a.pdf

JR01
Normal user
Posts: 260
Joined: 14 Feb 2016, 21:04
Location: South Africa

Re: reed relais - will it work with a logic level converter as well ?

#23 Post by JR01 » 22 Jun 2016, 00:07

.@BertB - can I achieve the same with the logic level converter from Sparkfun, for driving one light relay? Like this one:
https://www.sparkfun.com/products/12009
Image
-----------
IOTPLAY. Tinkerer, my projects are @ http://GitHub.com/IoTPlay, and blog https://iotplay.org. Using RPi, Node-Red, ESP8266 to prove Industry 4.0 concepts.

BertB
Normal user
Posts: 1049
Joined: 25 Apr 2015, 14:39

Re: reed relais

#24 Post by BertB » 26 Jun 2016, 14:35

@JR01
I guess you can give it a try, but only if the reed relay itself has a diode to clamp the negative voltage.

User avatar
costo
Normal user
Posts: 500
Joined: 21 Nov 2015, 15:03
Location: NL, zw-NB

Re: reed relais

#25 Post by costo » 26 Jun 2016, 15:16

Don't forget that a level converter only transforms the voltage level. All the current that flows through the relais will flow out or into the GPIO of the ESP.
Max current a GPIO can safely handle is 12mA note#. So if your 5V relais has a coil-resistance of 500 ohm the current will be 5/500=0,01A or 10 mA.
So it will probably work.
Wouldn't it be more convenient to use a optocoupler ? Much safer and less prone to problems like spontaneous resets.

note# : max sink current of ESP is about 20mA http://bbs.espressif.com/viewtopic.php?t=139

Post Reply

Who is online

Users browsing this forum: No registered users and 52 guests