Controlling relays with nodemcu

Moderators: grovkillen, TD-er, Stuntteam

Post Reply
Normal user
Posts: 2
Joined: 07 Mar 2019, 17:51

Controlling relays with nodemcu

#1 Post by pkarl45 » 08 Mar 2019, 10:25

I'm new to this and I'm sorry if this question has been asked before, but I could not find anything that is related to my question.

Anyway, I bought a nodemcu v2 Lua just a couple of days ago. My plan is to use that on my sailboat to protect my batteries from overcharging.

On my boat, I got a wind turbine and when it blows a lot, it charges the batteries (12V system) to high so I need to dump the excess voltage.

So, my plan with espeasy and nodemcu is this:
1. Check battery status.
2. If battery Voltage is over 14.4V it turns on the relay and dumps the excess voltage until Voltage has reached 12.9 Volt
3. When Voltage has reached 12.9V it turns off the relay and everything goes back to normal.

So, I got the relay, nodemcu but now I need to figure out how to write the rules to make it happen. I would appreciate if someone could help me a little bit with this. I have read the wiki but cant figure out how to do it.


User avatar
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany

Re: Controlling relays with nodemcu

#2 Post by schnurzel59 » 09 Mar 2019, 00:07

It's easier and safer to buy a simple charge controller. I just hope you know your way around with batteries.
You can not use any relays. Heavy overcharging can cause very large damage to the battery. With deep discharge
the battery is irretrievably broken. Depending on the size of the battery, over 10kW of power will quickly be
released in the event of a short circuit. Example: (12V * 2000A = 24kW). That's no fun anymore. Always remember.
A battery has no switch. In my opinion, the Node MCU can not be used without appropriate security measures.
You then have to consider possible errors and include in the programming. I would then have 2 NMCU's work together,
which monitor each other.

Best regards
Greetings Martin

Oh God, my English is horrible.

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests