Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Max Maxov
#60303 Hello there!
I want to create a SMALL board, which fits just behind the srtandard relays-Board and can switch it on /off.


Just view requirements for the bard:

- universal for 1,2,4,8CH Relays-Board like
IMG-20161230-WA0015.jpeg

- size of the Board should be 20x50mm
size.jpeg

- Powersuply using AMS1117 (12-4V) onboard
- esp 12f
- possibility (jumper) to set manualy each relay to a=ON, b=OFF, C= ESP
(see
concept1.jpg
)
- as easy/cheap/vew components as possible

so now my questions:

- is my concept ok? (See picture 1)
- is AMS1117 power suply ok with just on Output and Input 10uF (ceramic) or do i have to use this shematics: [url]http://www.electrodragon.com/w/File:AMS1117.png
[/url]
Would like to use this project as a start:
http://www.esp8266.com/viewtopic.php?f=13&t=1897
hope @mano1979 will get in touch with me ;-)
at the end it will be inteegrated in this project
[url]ioBroker.net[/url]
You do not have the required permissions to view the files attached to this post.
User avatar
By mano1979
#60325 Depending on your powersupply, you can leave out the capacitors entirely. They are just filtering some noise from the supply. Personally i use 2 electrolytic capacitors at 22uF (15V).

I'm not really sure about the schematic you've drawn. The ESP8266's 3.3V logic, that the gpio can output should be enough to drive the optocoupler on these relay boards. Wich in turn, turn on the relay.

So it is just a matter of connecting the esp pins to the relay board .

If i'm not mistaken the max input voltage for the ams1117 is 7V not 12V! Anyway, if you want to run the esp from 12V, you are better off lowering the voltage to 6V with an lm7806 and then let the ams1117 bring it down to 3.3V. This way they share the heat that arrises when using voltage regulators.
Be carefull not to use any components like a diode or a resistor between the gnd pin of the voltage regulator and gnd from the powersupply. Otherwise the voltage rises to 4V or higher!

Did this answer your question? If not give me a shout! :D
User avatar
By Max Maxov
#60399 SOOOO...
just checked...
esp 12f can control relays which have a optocoupler intergrated without transistor at all :D

i took a arduino mini as power supply to test it.

Just NOTICE! you have to set control-pin as output

Code: Select allpinMode(RELAY1, OUTPUT);


and when you set the pin LOW:

Code: Select alldigitalWrite(RELAY1,LOW);           // Turns ON Relays 1


it switches the relay!
Test #1:
+ 5V----Vcc Relay
GND----GND Relay
Pin on UNO----R220----LED Jellow(to reduce 5v by 2,2V)----Relay IN1

WORKS!
Power between VCC and GND on relay 3,2V and 0,5mA (YES 0,5mA!!!!)

Test #2:
+ 5V----Vcc Relay
GND----GND Relay
GND on UNO----R220----LED Jellow(to reduce 5v by 2,2V)----Relay IN1

WORKS!
Power between VCC and GND on relay 3,3V and 0,5mA (YES 0,5mA!!!!)

Test #3:
+ 3,3V----Vcc Relay
GND----GND Relay
GND on UNO----R220----Relay IN1 ///PLEASE NOTE NO LED , coz we do not need reduction of power

WORKS!
Power between VCC and GND on relay 3,3V and 0,5mA (YES 0,5mA!!!!)

=> because esp supply can up to 12ma (20ma sink) it means to me it will work!

please correct me, if i am wrong ;-)