Hi
I have made my own version of an ESP board which has 2 3V relays on it to switch on/off. I also can connect a temp sensor (GPIO13) and 2 servos (GPIO12, 14). My voltage source is a 220V->3.3V AC/DC converter.
* Are there any optimizations I could make (change pullups/down?, additional capacitors ?).
* Are there any potential problems ?
* Is there a way to protect the GPIOs against over voltage/current ? I recently had the problem that GPIO13 died with 2 temp sensors (5 meters away) on it. I think maybe some statics killed the port, because on GPIO14 the temp sensors work fine, and until now they worked well on 13 too.
My project with this board and the app is based on 2 Outputs, either to relay or to a servo, depending on how it is configured. So, for now, I dont need additional pins other than: 4,5 -> relays, 12,14 -> servo, 13 temp.
Current I'm using it for:
1 Unit switching 2 electric fences
1 Unit switching my Sauna ON/OFF with 2 temp sensors
1 Unit switching my pool pump and water pump
1 Unit switching 2 valves for outside water with one temp sensor
One more question I came across:
The Songle 3V relay needs a current of about 120mA. The BC337 has a hFe of about >100. So I need a transistor base current of 1.2mA. Therefore I would need a 2k7 resistor at the base. In my case I would get about 12mA out of the GPIO with my 220R, isn't a little bit too high ?
Should I change the 220R base resistor ?? To maybe 1k ?
I forgot to say, that I only use the programming pins once for initial programming, all further updates are done OTA
thanks for your help
regards
Erich
Selfmade relay board tips
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 2
- Joined: 12 Nov 2016, 11:03
Selfmade relay board tips
You do not have the required permissions to view the files attached to this post.
-
- Normal user
- Posts: 497
- Joined: 04 Oct 2016, 23:16
Re: Selfmade relay board tips
my comments:
1) schematich is fine (just the OUT1/2-N and OUT1/2-L are swapped I believe)
2) I indeed would replace R3/4 with 1k (I did the same with similar board I build but I've used 2N2222 and I'm not familiar with BC337)
3) as I use a 5VDC power supply to be able to use most common 5V relays, in my latest revision of the schematic I used optocoupler (4N25) to trigger the 2N2222 in order to provide 5VDC directly to the coils but still control it with a GPIO output of ESP8266 fully isolated
I woudl be like to see your PCB layout, as I'm not good in that and I'm always looking examples to learn from...
1) schematich is fine (just the OUT1/2-N and OUT1/2-L are swapped I believe)
2) I indeed would replace R3/4 with 1k (I did the same with similar board I build but I've used 2N2222 and I'm not familiar with BC337)
3) as I use a 5VDC power supply to be able to use most common 5V relays, in my latest revision of the schematic I used optocoupler (4N25) to trigger the 2N2222 in order to provide 5VDC directly to the coils but still control it with a GPIO output of ESP8266 fully isolated
I woudl be like to see your PCB layout, as I'm not good in that and I'm always looking examples to learn from...
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- New user
- Posts: 2
- Joined: 12 Nov 2016, 11:03
Re: Selfmade relay board tips
Hi
Thanks for your reply.
I know that L and N are swapped, just because they fit better reversed on the board, and I was too lazy to change it in the schematics, for AC it doesn't matter anyway (-:
In my first version I used 5V relays and a 220V to 5V AC/DC converter with an additional stepdown converter to 3.3V for the ESP.
The only reason to use 5V were the relays as the 5V version is more common, but after I ordered a bunch of the songle 3.3V relays and some more 220V to 3.3V AC/DC converters, there is no need for 5V anymore, so I switched completely to 3.3V.
I will change the base resistors to 1k I think, so the current on the GPIOs doesn't get too high.
Here is my PCB layout. The ESP-12F is placed on the bottom layer. Wires are either 32mil or for AC 100mil, so the etching isn't so critical.
regards
Erich
Thanks for your reply.
I know that L and N are swapped, just because they fit better reversed on the board, and I was too lazy to change it in the schematics, for AC it doesn't matter anyway (-:
In my first version I used 5V relays and a 220V to 5V AC/DC converter with an additional stepdown converter to 3.3V for the ESP.
The only reason to use 5V were the relays as the 5V version is more common, but after I ordered a bunch of the songle 3.3V relays and some more 220V to 3.3V AC/DC converters, there is no need for 5V anymore, so I switched completely to 3.3V.
I will change the base resistors to 1k I think, so the current on the GPIOs doesn't get too high.
Here is my PCB layout. The ESP-12F is placed on the bottom layer. Wires are either 32mil or for AC 100mil, so the etching isn't so critical.
regards
Erich
You do not have the required permissions to view the files attached to this post.
Who is online
Users browsing this forum: Ahrefs [Bot] and 17 guests