Code Monkey home page Code Monkey logo

solar_evse's Introduction

Solar EVSE

Description

This project is intended to manage the charging of an electric car so that the charging current is varied in accordance with available solar power from a PV array.

Introduction

Electric cars require an EVSE (Electric Vehicle Supply Equipment) to connect to the domestic electricity supply. It is the responsibility of the EVSE to signal to the car the maximum current it is allowed to draw based on factors like the rating of the domestic wiring, and the cable connecting the vehicle to the EVSE. A smart controller inside the EVSE called an EPC (Electronic Protocol Controller) performs the function by setting the duty cycle on a 12V pilot signal sent to the car via the charging cable. One of the leading models of EPC is manufactured by Viridian (sometimes labelled as MainPine) What makes the Viridian EPC interesting to a DIYer is the fact that the available current signalled to the car can be controlled by applying a voltage on a control pin on the Viridian EPC. Solar EVSE This project is for an Arduino based device to set that control voltage based on a calculation of available solar power made by an OpenEnergyMonitor system, and transmitted to the Arduino via a radio link. The Arduino takes no part in the decision making process. It merely applies the voltage dictated by OpenEnergyMonitor. The Viridian EPC has its own fail safes to prevent an unsafe current being signalled to the vehicle.

Hardware required is

Arduino Uno -/Images/solar_evse_pcb.jpg

or clone, or stripboard with Atmel328P No crystal required. I used a Xino which is a minimalist Arduino clone with no usb interface, and I modfied it to run off 3.3V power which has the advantage of allowing finer control of the Digital to Analogue Converter, and means no step down resistors are required for the RFM69CW radio module which requires a 3.3V supply. By burning a new bootloader into the Atmega328P chip I was able to run it using the 8MHz internal clock and so saved on the cost of a crystal, and reduced power consumption. Power was drawn from the 5V rail of the Viridian EPC itself by wiring in an extra screw connector into the housing of the EPC. Using a Xino at 8MHz the current requirement is 20mA.

  • MCP4725 Digital to Analogue converter module. It is very cheap to buy MCP4725 chips on ebay, ready mounted on a pcb which saves the trouble of trying to solder surface mount components.
  • RFM69CW 433MHz or 868MHz radio module. This is the radio module used in the OpenEnergyMonitor project. They are cheap on ebay.
  • Viridian Tethered EPC
    Viridian make their own EVSEs, but I was unable to buy one at a sensible price so instead I bought a Rolec EVSE and replaced the Rolec EPC with a Viridian. Since both the Rolec and Viridian EPCs are DIN rail mounted modules this was a simple exchange.
  • EmonPi or Emonbase from OpenEnergyMonitor.org

Arduino Libraries required

  • Jeelib
  • Wire
  • Adafruit_MCP4725

Software required

  • Emonhub Part of EmonPi or Emonbase. Used to transmit commands over radio link.
    A patch is required for emonhub to allow it to transmit control messages to Solar_EVSE. See GitHub for required patch to emonhub.
  • Node-Red Included as part of EmonPi. Used to calculate Solar PV power PV available. See Node-Red folder for an example flow.

Operation

This sketch is very simple. The process loops continually waiting for a packet ready flag from the RFM69CW radio unit. When the packet arrives it is validated for CRC and correct address and a single integer variable is read. If the variable has msb bit set, then it is a command to set a new default Power on Voltage for the DAC to use. If msb bit is zero it is a new command to set a voltage on the DAC. The voltage set on the DAC is passed to the Viridian EPC which uses it to vary the duty cycle of the Pilot signal given to an attached electric car, and so regulates the current drawn while charging.

Installation notes are here

solar_evse's People

Contributors

delboy711 avatar

Stargazers

Glenn Algie avatar David Peterson avatar  avatar  avatar pulse avatar Andrew Ellis avatar  avatar Michael Schuler avatar

Watchers

James Cloos avatar  avatar

Forkers

dodavies

solar_evse's Issues

Viridian 5v line

Hi,
I am making a charger in a similar manner to yourself but am using a photon and some custom software monitoring a solar edge inverter directly. So many thanks for posting this resource which has been very helpful.

I have pulled apart the viridian and can't seem to see an obvious 5V point to take a power source from which you alluded to in the post. Is it possible for you to give me a pointer to where that might be please. Did you power up the device and just poke around with a multimeter?
Cheers
Andy

You might want to take a look at my solution to tweak many DC/DC converters like the BST900...

My approach is a different one: not reprogram the STM, but replace the board by a TTGO module on a adapter PCB, which provides a gorgeous color display, statistics, Internet dashboard, Telnet and thousands of features...

https://github.com/rin67630/Drok-Juntek-on-steroids
and its application as a solar SCC.
https://github.com/rin67630/Soft-Power2-MPPT

It would be nice to have you on board, we share the same aims,

Not working

Hello, I have done it with ESPHome PWM having a voltage between IC and 0V and it does not work. When I introduce for example 1.1V or whatever, relay turns off. In your picture I am not able to see where are you connecting 0Volts apart from the ground

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.