DIY Home Automation Controller for Electric Car Charging

by Ben N on July 22, 2018

Although most electric vehicles have some sort of a timer feature available, they are often simple or have poor user interfaces. Since I was already using a Samsung SmartThings home automation system, I was wondering why not control my electric car charging with my automation system?

I set to work on the project. At it’s heart would be a contactor and a NEMA 14-50 electric outlet. 14-50s are great because they can carry 50 amps and provide 120 AND 240V power. I have several of these electric outlets in my garage and they are also common at RV parks.

To start, I’d need the materials to build the project.

I set to work by laying out the components to fit on the lid of the 8 inch box. I arranged them in a logical order and traced the components so I would know where to cut the holes. I drilled the hole for the power indicator light with a 7/8″ spade blade and the hole for the NEMA 14-50 outlet with a 2.125″ hole saw. The two square holes were made with a Dremel rotary tool with a fluted spiral cutter bit.

I drew up a simple electrical diagram to help me organize my thoughts. The power cord would run to the bottom end of the contactor. The top end (switch end) of the contractor would connect to the 14-50 outlet. I would use one connection from the switched end of the contactor to provide power for the power indicator light. That way, the light would come on and go off at the same time as the switched power to the electric outlet.

For the multimeter display, I would slide the CT (current transducer) ring over one of the two switched hot wires. Power for the multimeter would come from the bottom end of the contactor so that it always has power.

I attached a bus bar for the ground and another for the neutral. Most of these components use ground and neutral, so I’d have plenty of connections to make there.

For the “Smart” part of the project, I used a Leviton Decora Smart switch with Z-Wave communications. It’s part number DZ15S.

After connecting power to the hot, neutral, and ground of the switch, I had one wire left. It’s the “switched hot out” wire. That wire goes to the coil of the contactor. The other coil terminal connects to the neutral so that a 120V circuit is completed to activate the contactor when the switch is turned on. The switch can be activated locally, by smart phone, on timer, or through a number of other variables through the Samsung SmartThings system.

I followed the included instructions with the switch for how to put it into a mode to be identified and included in my home automation system. Once it did, I was able to test it, and the switch turned on and off from my smart phone!

After testing, I needed to finish boxing everything up. I drilled a hole in the box, installed a cable clamp, ran the appliance cord through it, clamped it down and made all the electrical connections.

I attached the faceplate to the box and screwed it down. On the back, I attached the feet that would become mounting points for the box.

I mounted the box to the wall near my existing NEMA 14-50 outlet. After putting in one wood screw, I made sure to level the box, then I marked, pre-drilled, and screwed down the other mounting points.

I plugged in the appliance cable to the wall outlet, and my EVSE (Electric car charging cord) into my home automation gadget. The other end of the EVSE plugged into my car.

With that, I now have remote control over my car charging. I currently have it set to power up late at night, when there’s a very low draw on the electrical grid. This is great to do if you are on a Time of Use plan with your power company. Often, electricity costs HALF as much late at night.

Besides timers, the electric car charging can also be controlled through a number of variables and inputs available through the Samsung SmartThings system. I plan to experiment with some of these and have some ideas for integrating my solar into the home automation system.

Do you have a home automation system? Are you already using timers or solar with your electric car charging? Let us know, and stay charged up!


{ 7 comments… read them below or add one }

1 Jay Donnaway November 26, 2018 at 9:19 pm

Very cool Ben, I have wanted such for 6 years, but evidence has recently emerged that interrupting the 240V current could cause cumulative damage to our onboard chargers. Mine failed yhis summer after 90,000 miles without many 240V interruptions. The other culprit appears to be insufficient cooling. Interrupting the pilot signal appears to be a better way than cutting the mains. Here’s the thread on

2 admin November 27, 2018 at 10:43 am

Thanks for the input, Jay!
For the most part, I’ve been using my remote box to START 240V power, not STOP it, so I don’t think it’s an issue. Controlling the PWM pilot signal is a very interesting thing and I still want to pursue designing and building my custom EVSE which will vary the PWM depending on available solar power and other inputs.

3 Jacob Mouser February 23, 2019 at 6:56 pm

I really like this project. I don’t have an EV myself, but I’m not ruling it out of my future. I like this because you can charge in off-peak hours remotely or automatically via timer in your smart home setup. I have a question about the contactor though. Power coming into the enclosure is 240V…so how do you run a 120V smart-switch circuit inside the enclosure? Does the contactor have a step-down transformer built in? If so, do all contactors have this built in?

4 admin February 27, 2019 at 9:30 am

If you use a 240V cable with FOUR wires, then it contains two Hots, a Neutral, and a Ground. 240V is the difference between the two hot leads. 120V is the difference between either hot lead and the neutral. So, you can get either 120V or 240V (or both) from a connection like a NEMA 14-50.
For example, on old electric stoves, the clock and controls for the oven was 120V, but the heating element itself was 240V. No need for transformers or other complexity.

5 Lee March 2, 2021 at 12:40 pm

I’d love something like to set daily limits on usage. I have an Airbnb and am planning to add a 14-50 and J1772 connecter/charger?. I’d like to limit guests to free charging up to say 60 Kwh for 1st day and 10 Kwh each day afterwards.

Suggestions on how to do this?

6 Shahen August 5, 2021 at 5:05 pm

Hi Ben, I was inspired by your project so I made one of my own for 2 chargers with a Sonoff dual and schedule set up to charge both cars overnight without overlapping. Charger outlets are located away from the box itself. It was a fun project and your video was very helpful and inspirational. here are 2 photos

7 Ben N August 6, 2021 at 9:36 am

Wow! Looks great! Nice job.

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Previous post:

Next post: