Voltmeter

1,722 views
Skip to first unread message

Gennadiy

unread,
Aug 4, 2016, 2:13:29 PM8/4/16
to OpenEVSE
Hello,
Is OpenEVSE firmware capable of the AC voltage measurements? If so, can I use this transformer based sensor? http://www.ebay.com/itm/291836117569?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

lincomatic

unread,
Aug 4, 2016, 4:29:24 PM8/4/16
to open...@googlegroups.com
It already has support for a voltmeter in Nick Sayer's OpenEVSE II variant. Look for #ifdef VOLTMETER. All you have to do is swap out the voltage reading function for your hardware. 

Sent from my iCrap

On Aug 4, 2016, at 11:13 AM, Gennadiy <gen...@gmail.com> wrote:

Hello,
Is OpenEVSE firmware capable of the AC voltage measurements? If so, can I use this transformer based sensor? http://www.ebay.com/itm/291836117569?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

--
You received this message because you are subscribed to the Google Groups "OpenEVSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openevse+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gennadiy

unread,
Aug 4, 2016, 11:34:56 PM8/4/16
to OpenEVSE
Thanks for you reply, I'm afraid that I will need a bit more hand holding if you don't mind. My coding is on the "Hello World" and "If- Then" level and I have no Arduino experience. I found the offset and scale values in the code. Will I need to recompile and flash the new code for each update or it can be done with a RAPI command over WiFi? Nick's schematics say that the AC Voltage sensor should be connected to the pin 25 PC2(ADC2). Is it the same with the production OpenEVSE board? Are the schematics and the board layout available as PDF files?

lincomatic

unread,
Aug 5, 2016, 10:49:55 AM8/5/16
to open...@googlegroups.com
your part has no documentation. I have no idea how to hook it up or program it

Sent from my iCrap

Gennadiy

unread,
Aug 5, 2016, 11:23:23 AM8/5/16
to OpenEVSE
I haven't ordered it yet, however I don't expect it to be challenging. The sensor is not programmable. It consists of an isolating transformer and an amplifier based circuit which produces a DC output correlating with the AC input. The practical range in the EVSE will be very narrow- 220-250V, it should be linear enough. This sensor will connect to the ADC input of the Arduino chip. I'm uncertain how to go from there, hence my questions.

Gennadiy

unread,
Aug 5, 2016, 2:08:52 PM8/5/16
to OpenEVSE
I found the RAPI documentation https://github.com/lincomatic/open_evse/blob/stable/rapi_proc.h. The voltage sensor can be tuned with the "SM voltscalefactor voltoffset" command.

lincomatic

unread,
Aug 5, 2016, 3:07:52 PM8/5/16
to open...@googlegroups.com

I didn’t see the close up photos until just now. If it’s just outputting an analog signal, I have a feeling that the existing voltmeter reading code will just work, and that all you have to do is change tune the offset and scale factor.

 

Yes, you can use an ADC input of your choice and change VOLTMETER_PIN to whatever pin you use.

I think the PP pin on the V4 is ADC2, so you don’t have to do anything except enable VOLTMETER, and then move the define for VOLTMETER_PIN out of the OPENEVSE_2 block.

I haven’t tested the code without OPENEVSE_2 defined, though, so you should check and make sure there isn’t any #ifdef VOLTMETER code that’s embedded inside #ifdef OPENEVSE_2.

 

If you send me one, I would be willing to try to integrate it. There are occasional inquiries about voltmeter support, and this looks like a cheap and easy solution.

 

-Sam

--

Danny ter Haar

unread,
Aug 5, 2016, 4:28:09 PM8/5/16
to OpenEVSE
Could you do the L1/L2 detection with such a volt meter as well ?
Could we get rid of the bleeder resistors and also would mean we could set L1/L2 after power interruption with EV still connected.
right ?

Gennadiy

unread,
Aug 5, 2016, 9:59:12 PM8/5/16
to OpenEVSE
Sam, thanks.
I will order the part and proceed from there. I found the PDF of the schematics, and the pin 26 ADC input used by Nick is available.
Sorry for asking many dumb questions- all documentation is scattered and not easy to find right away.
 

chris1howell .

unread,
Aug 6, 2016, 12:50:28 AM8/6/16
to OpenEVSE
To meet UL requirements for checking ground and welded contacts on each hot, you would need 2 voltmeter circuits. You would measure hot to ground on each leg then add the values together. I will have to take a look at the circuit and see if the component (mainly the transformer) are easily available.

--
You received this message because you are subscribed to the Google Groups "OpenEVSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openevse+unsubscribe@googlegroups.com.

Gennadiy

unread,
Aug 6, 2016, 10:49:43 PM8/6/16
to OpenEVSE
Chris, I'm thinking about adding the voltmeter circuit to the existing design. Will it affect the safety checks you mentioned?
This sensor module has no documentation whatsoever, I will figure out its details when I get it. I found the datasheet for the transformer used in the module. http://www.thaieasyelec.com/images/pic_product_info/EFDV434/ZMPT101B.jpg


On Saturday, August 6, 2016 at 12:50:28 AM UTC-4, Chris wrote:
To meet UL requirements for checking ground and welded contacts on each hot, you would need 2 voltmeter circuits. You would measure hot to ground on each leg then add the values together. I will have to take a look at the circuit and see if the component (mainly the transformer) are easily available.
On Fri, Aug 5, 2016 at 1:28 PM, Danny ter Haar <from...@gmail.com> wrote:
Could you do the L1/L2 detection with such a volt meter as well ?
Could we get rid of the bleeder resistors and also would mean we could set L1/L2 after power interruption with EV still connected.
right ?

--
You received this message because you are subscribed to the Google Groups "OpenEVSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openevse+u...@googlegroups.com.

Danny ter Haar

unread,
Aug 6, 2016, 11:46:34 PM8/6/16
to OpenEVSE


On Saturday, August 6, 2016 at 7:49:43 PM UTC-7, Gennadiy wrote:
Chris, I'm thinking about adding the voltmeter circuit to the existing design. Will it affect the safety checks you mentioned?
This sensor module has no documentation whatsoever, I will figure out its details when I get it. I found the datasheet for the transformer used in the module. http://www.thaieasyelec.com/images/pic_product_info/EFDV434/ZMPT101B.jpg

I am not Chris ;-) so I hope he responds as well ..
It should not affect anything since it will have both ways of detecting both the actual voltage and the "old" way of detecting voltage.
My concern would be the extra draw of power from the internal switched power supply unit .
Is the 2 mA the power drawn from the arduino (openevse) or is that used to measure the voltage ?
The technical info is a bit limited imho

lincomatic

unread,
Aug 7, 2016, 1:21:04 AM8/7/16
to open...@googlegroups.com
Don't worry, the code just uses it as an additional sensor. The safety checks are unaffected. 

Sent from my iCrap

lincomatic

unread,
Aug 9, 2016, 5:31:09 PM8/9/16
to OpenEVSE
can you post a link for the schematic?

Gennadiy

unread,
Aug 18, 2016, 8:17:37 PM8/18/16
to OpenEVSE
Sorry, I didn't check the board- I'm on vacation. I found the schematics of the OpenEVSE board, not the one of the sensor. I ordered the sensor, it is coming from China and will take a while to arrive. I will try to draw the schematic out of the board layout.

Gennadiy

unread,
Aug 20, 2016, 11:29:03 PM8/20/16
to open...@googlegroups.com

I received the board and tried to reverse the schematics.

Schematic https://www.circuitlab.com/circuit/e39k6h/ac-voltmeter/
The capacitors are not marked, I guessed the values.

Google chews up a post with pictures, I couldn't make it any better.
With no AC voltage I get 2.5V on the output. I wish I had an autotransformer, but I don't. I'll try to come up with a circuit to test the board.

lincomatic

unread,
Aug 21, 2016, 10:56:13 PM8/21/16
to open...@googlegroups.com
Cool, thanks! I ordered one, too. 

Sent from my iCrap

On Aug 20, 2016, at 8:28 PM, Gennadiy <gen...@gmail.com> wrote:

I received the board and tried to reverse the schematics.

Schematic https://www.circuitlab.com/circuit/e39k6h/ac-voltmeter/

Gennadiy

unread,
Aug 21, 2016, 11:35:18 PM8/21/16
to OpenEVSE
I had no luck running simulations in Circuit Lab. Could be mistakes in my guesses for the capacitors and transformer specs or my schematic is wrong.

lincomatic

unread,
Aug 22, 2016, 6:36:59 PM8/22/16
to open...@googlegroups.com

I received mine today. Not that it really helps, since there isn’t much information, but here is the manufacturer’s product page for it:

 

http://www.chinalctech.com/index.php?_m=mod_product&_a=view&p_id=716

 

 

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Gennadiy
Sent: Sunday, August 21, 2016 8:35 PM
To: OpenEVSE
Subject: Re: Voltmeter

 

I had no luck running simulations in Circuit Lab. Could be mistakes in my guesses for the capacitors and transformer specs or my schematic is wrong.

--

lincomatic

unread,
Aug 22, 2016, 7:42:12 PM8/22/16
to OpenEVSE
OK, I just did some quick and dirty tests.
I hooked up the OUT pin from the voltage sensor to the PP pin input on the OpenEVSE and enabled the voltmeter code.
The voltage reading fluctuates continuously, so the existing code to read the voltmeter signal from the OpenEVSE II is
incompatible with this board.

I found a thread on in the Arduino forum where someone got it to work. The thread contains a link to the datasheet, and
a sample sketch that supposedly works, using EmonLib. Obviously, we can't afford the space to drag in the entire EmonLib...
the voltage reading code needs to be extracted, and substituted for the OpenEVSE II voltmeter reading code.
The datasheet provides info on how to use the sensor board.

I am probably not going to have any more time to work on this in the near future. If you want to take a stab at it, I have created
a new branch with the voltmeter stuff enabled for use with a regular OpenEVSE board (not OpenEVSE II) . The define which enables the code
is #define ZMPT101B, which you can find at the top of open_evse.h. Unfortunately, turning on the voltmeter code makes the sketch too big, so
I temporarily turned off TIME_LIMIT in order to make space.

The function that needs to be modified is J1772EVSEController::ReadVoltmeter() in J1772EvseController.cpp.

Here is the link to the voltmeter development branch: 

lincomatic

unread,
Aug 22, 2016, 7:43:10 PM8/22/16
to OpenEVSE
Oops, here is the arduino forum thread with the info we need to get it working:

Gennadiy

unread,
Aug 23, 2016, 11:14:27 AM8/23/16
to open...@googlegroups.com
Bummer... My board doesn't work at all. It outputs the same voltage plugged into 120V or unplugged. I didn't see any AC on the secondary coil when checked with the oscilloscope. Had no time to dig further. I will look further when the time allows. Thanks for the links, they should help.

Just read the thread on the arduino forum. The board outputs AC, which makes sense- I couldn't understand what in it converts the output to DC.

Bjørn Eikeland

unread,
Sep 24, 2016, 1:03:17 PM9/24/16
to OpenEVSE


On Thursday, August 4, 2016 at 8:13:29 PM UTC+2, Gennadiy wrote:
Hello,
Is OpenEVSE firmware capable of the AC voltage measurements? If so, can I use this transformer based sensor? http://www.ebay.com/itm/291836117569?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

I ended up using just the transformer itself for what its worth. Some distortion, but might be because of capacitor size, but its repeatable at least, so can calibrate for inaccuracies. Schematic and sample adc data below


Bjørn Eikeland

unread,
Sep 28, 2016, 7:19:22 PM9/28/16
to open...@googlegroups.com
Seems the distortion was mostly due to the serial buffer filling up, effectively altering the samplerate at the first zero crossing; and the rest from that I somehow managed to turn the transformer 90 degrees; effectively using it as a voltage divider with two serial inductors; it just happened to result in almost the identical voltages! When wired correctly there is only a little distortion at the peaks. But at this input voltage its rather inaccurate with the built in 10bit ADC. Around 0.9V/LSB

Stiff Agrath

unread,
Apr 30, 2017, 1:56:02 PM4/30/17
to OpenEVSE
thanks for this schematics. i have a question for this schematic. Whether the input voltage can accept the input voltage of 380 Volts for AC line voltage to line?
thanks before.

Stif Agrath.
Reply all
Reply to author
Forward
0 new messages