Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Cheap Charge Meter Design

This site may earn commission on affiliate links.
BTW, I can only get the SSRs to open if I connect ground to "-" and 5V to "+". It does the same thing with a 9v battery, requiring that I connect "-" to "+" to open and light up. Any idea why that is?

Isn't that what you expect, active high? When you say open, do you mean allow current to flow through, or do you mean open switch, as in no power through?

There is an LED that is activated when you apply power across the + and -. That LED shines light on a photo-transistor. That phototransistor will then trigger the TRIAC, which allows AC current to flow into and out of the SSR. Since it's a TRIAC, it's going to be a zero cross trigger, meaning once turned on, it will stay on for at least 1 AC half cycle. TRIACs stay on as long as current is flowing through them, no matter what you do with the trigger terminal.

By the way, there is going to be a 1-2V drop across that SSR. So if you're pulling 32amps, that's 32-64 watts of power dissipation in the relay. You're going to need a much bigger heatsink, and possibly active cooling (fan).

I like those relays, I use them for inrush testing at work, they provide very clean switching, but I'm not so sure they can really handle continuous 32-40amp loads.

That's a neat meter you found, looks reasonably accurate too, good choice.
 
Last edited:
Isn't that what you expect, active high? When you say open, do you mean allow current to flow through, or do you mean open switch, as in no power through?

There is an LED that is activated when you apply power across the + and -. That LED shines light on a photo-transistor. That phototransistor will then trigger the TRIAC, which allows AC current to flow into and out of the SSR. Since it's a TRIAC, it's going to be a zero cross trigger, meaning once turned on, it will stay on for at least 1 AC half cycle. TRIACs stay on as long as current is flowing through them, no matter what you do with the trigger terminal.

By the way, there is going to be a 1-2V drop across that SSR. So if you're pulling 32amps, that's 32-64 watts of power dissipation in the relay. You're going to need a much bigger heatsink, and possibly active cooling (fan).

I like those relays, I use them for inrush testing at work, they provide very clean switching, but I'm not so sure they can really handle continuous 32-40amp loads.

That's a neat meter you found, looks reasonably accurate too, good choice.

What I meant was, the polarity connection is reversed. I needed to connect ground (ie. +) to - in order to activate the LED on the SSRs. Usually it is
+ to +, when installing batteries, for instance.

I did buy a contactor, but I need to get another one to use with 120v testing, as it ended up being 240v coil.
 
That's very strange that the polarity seems to be reversed, I have no answer for that.

If you had a spare one, opening it up might reveal the mystery.

Yeah, I have two - both wire the same way. I just found this eBay listing where they list Ground as "-".

5V/12V Lighting Transformer Switching Power Supply AC 110V-220V Cooling LED | eBay

L, N: AC power input

GND: DC power output "-"

V: DC power output "+"

+V / ADJ: Adjust the output voltage
 
I did some research on a hypothetical design for a cheap charge meter and billing system. Basically, charge-point costs $6,000 which seems like far too much.

This is not something I plan or want to do, just a hypothetical. Just because it could be build doesn't mean it should be.

The way it would work - you pair your phone with the charging station, and use an app to authorize the charge. The device uses an electromagnetic relay switch rated for 240V 30A to open an outlet or wire to a charger. The current is measured using the ACS712 current sensor for Arduino and sent over ethernet to the billing system.

So in theory (not 100% familiar with bluetooth specs), you walk up to the charging station that you've already authorize, then open the app and press "charge. The unit itself would be covered somewhere - no physical interaction.

Parts:
Arduino w/ Ethernet ($40)
Electormagnetic relay 30A (MGN2C-AC240) $50
HiLetgo 2pcs ACS712 30A ($7.19)
Bluetooth (DSD TECH HC-05) $8.49

Total $105.68 plus assembly, plastic cover, misc parts. Maybe sells for $200-$250, plus 5-10% commission to support billing infrastructure. Target would be apartment building owners, workplace owners, and workers/tenants looking to convince. They'd be able to make a profit off the electricity to pay for the installation and just to make a profit.

I'd have the skills to make it work, but I'd rather someone stole the idea. The business details and liabilities are not small, and I have my full time job which is enough. I suppose if I keep thinking about it, I'll have to make a prototype and a kickstarter.

Also, I'd posted something (not the same exactly) in "supercharger infrastructure" but seems no one there interested to respond. This is after all for the M3 primarily in mind.
Very interesting system. I'm working on making my plug to be sharable and available to other users or a second car when I am not charging.
I already register my garage plug to PlugShare.com, so a combination or your system and the sharable extension would be a good application.
May be we should work on something together.
 
What I meant was, the polarity connection is reversed. I needed to connect ground (ie. +) to - in order to activate the LED on the SSRs. Usually it is
+ to +, when installing batteries, for instance.

I did buy a contactor, but I need to get another one to use with 120v testing, as it ended up being 240v coil.

Ground is typically the minus lead. Why would you think otherwise? In a digital 5 volt system the 5V rail is positive and the ground is negative. Same in a 12 volt auto or nearly any other system other than ECL logic perhaps where the ground is the positive rail and the negative rail is the power input. But that's far outside what you are doing.

You appear to be very far out of your depth on this. The big thing I believe you are missing is that most users will want your system to have a connector that plugs directly into their car like at all other chargers. Your system will simply provide an outlet and they will need to use their own charging cable. That is a PITA having to unplug it from both ends, coil it up and stash it in the trunk and not the front one which is not secure. I know I'm fed up with handling the mobile charging cable with my car. If I install anything remotely like this it will be a charger with a cable and connector that are attached to the wall so it can't be stolen.

Oddly enough, for around $400 you can buy a 30 amp J1772 unit from openEVSE in kit form. I believe an assembled unit runs $500. It contains measuring capability and can be programmed over wifi or a cable. So with a little programming this device will do everything you are looking to do and also includes the EVSE electronics and cable/connector which your unit does not. I believe the last time I asked the guy he said he could sell me a unit with a Tesla connector on it in place of the J1772 connector, but I'd prefer to be able to charge other cars and not just a Tesla.

But then, if I'm installing multiple charging ports in a facility for Teslas, I would install HPWCs at $500 each with a 100 amp circuit shared between every three units. So even when all three chargers are in use the cars would get about 27 amps each or potentially much more if only one or two units are in use.
 
Ground is typically the minus lead. Why would you think otherwise? In a digital 5 volt system the 5V rail is positive and the ground is negative. Same in a 12 volt auto or nearly any other system other than ECL logic perhaps where the ground is the positive rail and the negative rail is the power input. But that's far outside what you are doing.

That's interesting. Electrical charge is considered "negative", but maybe that's just in physics.

You appear to be very far out of your depth on this.

True, but it is interesting to learn. The system is pretty simple so it can always be reviewed (actually it is basically done as first prototype). Can always pay someone to review the design if it were/became serious.

The big thing I believe you are missing is that most users will want your system to have a connector that plugs directly into their car like at all other chargers. Your system will simply provide an outlet and they will need to use their own charging cable.

No, no outlet would be provided. It is designed to be hard-wired directly into the electrical system before the wall unit. There would be a QR code that could be put on the unit or outlet, whatever they install.

Oddly enough, for around $400 you can buy a 30 amp J1772 unit from openEVSE in kit form. I believe an assembled unit runs $500. It contains measuring capability and can be programmed over wifi or a cable.

This is an interesting unit. I wouldn't prefer it over the Tesla HPWC myself, but it could definitely do with some re-programming.

On the other hand, you have to consider software development costs (even though I am developing for free, it takes time). If you program a small system like I have designed, that is $1-2k imaginary cost. The openEVSE is 20-50k imaginary SDLC cost. Then I'd have to make sure my system didn't fry somebody's car instead of just matching the Amp ratings and checking the system for heat. Then that would have to be given away for free since its just reprogramming, and/or to buy a huge inventory of $500 devices and reprogram them.

So its actually cheaper to build a device. It plugs into whatever they buy and is additional $150-$200 cost.

New main parts list:
-- Arduino + Ethernet board ($20)
-- Electric Meter ($26)
-- Contactor 40A ($10)
-- SSR ($4)

That's only $60 besides assembly, cover and misc parts.
 
Very interesting system. I'm working on making my plug to be sharable and available to other users or a second car when I am not charging.
I already register my garage plug to PlugShare.com, so a combination or your system and the sharable extension would be a good application.
May be we should work on something together.

How many people do you expect will use it? The disadvantage of a sharable plug that way is it would need an "owners mode" where the owner has to identify and activate the charger (ie. via app). It would bypass the billing, but you still would need to activate it every time (minor annoyance).

If you are the main user (90+ %) then better just to give the electricity free and not inconvenience yourself.
 
Updated prototype with meter. I've installed the 240v contactor, but its not connected as I'm testing on 120v. Pulses register with the Arduino board 800 / kWh. Then will be collected and connected to internet server.

Probably better to swap the SSR and contactor location when using 240v.

IMG_0150.JPG
 
FYI: Many localities in the U.S. don't allow anyone but the power company to charge for electricity by the kWh. That's why the EVSE companies often have to use a time-based billing system.

I don't see why you wouldn't base it off of OpenEVSE. Almost all of the HW needed are already there, and it is Arduino based. All you'd have to do is add the authentication you're talking about. Shouldn't take any longer than programming it from scratch.
 
Last edited:
Shouldn't take any longer than programming it from scratch.

I've put my time estimate for the OpenEVSE already - 20-40x. Its not 100% exclusive, in the sense that it could be done later (very hypothetically). Even by OpenEVSE themselves maybe. 40x the work means about 2 months worth of development.

Programming for the Arduino board is pretty much done already. Just a few hours of networking code to add.

Hardware is Cheap, Programmers are Expensive
 
I've put my time estimate for the OpenEVSE already - 20-40x. Its not 100% exclusive, in the sense that it could be done later (very hypothetically). Even by OpenEVSE themselves maybe. 40x the work means about 2 months worth of development.

Programming for the Arduino board is pretty much done already. Just a few hours of networking code to add.

Hardware is Cheap, Programmers are Expensive
I understand software, I just didn't agree with your assessment of the difference in effort. However, it's your project.
 
FYI: Many localities in the U.S. don't allow anyone but the power company to charge for electricity by the kWh. That's why the EVSE companies often have to use a time-based billing system.

I've heard this, and but the good news is all the other localities do accept it, and by the minute is actually easier. One can expect them to progress quickly if there are many EVs in their localities.
 
I understand software, I just didn't agree with your assessment of the difference in effort. However, it's your project.

I've moved past the voltage/current sensor towards a system which counts pulses from and external meter and opens/closes a relay. So the "electric meter" code is down to 20 lines of code. It needs a server and an app and billing tests, so that's next.

Arduino is also a minimalist system with very little CPU (single threaded) and very little RAM and storage, so it is unlikely that there is any spare capacity in the OpenEVSE project. The ethernet code I have needs its own thread (and there is 1 thread only, except hardware interrupts), so it will need its own micro-processor.

I like the idea of building a physical device, but it would definitely need a lot of pre-orders (~2,000) via something like kickstarter to be worthwhile. I'm totally fine to trash the project if there's no interest, and at least will have had some fun making the device.

There were 140k Tesla Model 3s sold last year, so 2,000 would equal 1% which is quite a lot to expect, I think. Definitely people will/would need to buy the device to give away since the people who would be interested (ie. I have a space in a parking garage and want to buy electricity) aren't the ones who have the right to install them.

The government of Maryland just spent $786,000 on a grant (more money provided by another company on top of that) to build an electric vehicle fast-charging station from a gas station. Allows 4 people to fast-charge. Probably spent all that on taking the gas tank out of the ground.
 
Last edited:
That's interesting. Electrical charge is considered "negative", but maybe that's just in physics.

"Conventional" current vs. electron current. Before electrons were known to be the carriers of charge the + and - signs were used for charge and by "convention" the positive current flow was adopted.


True, but it is interesting to learn. The system is pretty simple so it can always be reviewed (actually it is basically done as first prototype). Can always pay someone to review the design if it were/became serious.

No, no outlet would be provided. It is designed to be hard-wired directly into the electrical system before the wall unit. There would be a QR code that could be put on the unit or outlet, whatever they install.

There is the issue. The wall "unit" (by which I assume you mean EVSE) can do everything your unit would do. It just needs to communicate to something that will track the use and manage the billing... in other words a CPU like a Raspberry Pi. The entire rest of your system is redundant.


This is an interesting unit. I wouldn't prefer it over the Tesla HPWC myself, but it could definitely do with some re-programming.

On the other hand, you have to consider software development costs (even though I am developing for free, it takes time). If you program a small system like I have designed, that is $1-2k imaginary cost. The openEVSE is 20-50k imaginary SDLC cost. Then I'd have to make sure my system didn't fry somebody's car instead of just matching the Amp ratings and checking the system for heat. Then that would have to be given away for free since its just reprogramming, and/or to buy a huge inventory of $500 devices and reprogram them.

Development costs are not "imaginary". I don't know what you mean by SDLC cost. The development costs of adding software to the two systems would be about the same as far as I can see.

Not sure what the rest of your paragraph is about, but I think you are describing but it sounds like it is verification testing to make sure it meets all the requirements like safety.

So its actually cheaper to build a device. It plugs into whatever they buy and is additional $150-$200 cost.

No, it isn't.


New main parts list:
-- Arduino + Ethernet board ($20)
-- Electric Meter ($26)
-- Contactor 40A ($10)
-- SSR ($4)

That's only $60 besides assembly, cover and misc parts.

Yeah... ok. Compare that to buying an rPi and programming it.

-- rPi (35$)
-- PSU ($5)
-- Flash SD car ($5)
-- Case ($5)

$50 and no wiring... yeah, you left out the wiring you would have to modify. You also didn't include the various approvals you need to make and sell items for the power line and not get your butt sued.

This is what I mean about you being in over your depth. Product development is not just a matter of understanding the electronics. You need to fully understand how the product will be used and marketed and all the design issues, not just the technical aspects of wiring components together.
 
I've put my time estimate for the OpenEVSE already - 20-40x. Its not 100% exclusive, in the sense that it could be done later (very hypothetically). Even by OpenEVSE themselves maybe. 40x the work means about 2 months worth of development.

Programming for the Arduino board is pretty much done already. Just a few hours of networking code to add.

Hardware is Cheap, Programmers are Expensive

I'm lost, why is the programming 40 times more time on the OpenEVSE?
 
$50 and no wiring... yeah, you left out the wiring you would have to modify. You also didn't include the various approvals you need to make and sell items for the power line and not get your butt sued.

This is what I mean about you being in over your depth. Product development is not just a matter of understanding the electronics. You need to fully understand how the product will be used and marketed and all the design issues, not just the technical aspects of wiring components together.

I'm aware of the depth of the project, and more likely than not will not actually do it. I will certainly keep making the software and prototype, but whether I go further is a bigger question.

Wiring is under "and misc parts, assembly". Approvals are not per-item so would be covered by selling the item for more than it costs.

The warnings are nice, but you are spiting hairs to find fault.

The wall "unit" (by which I assume you mean EVSE) can do everything your unit would do. It just needs to communicate to something that will track the use and manage the billing... in other words a CPU like a Raspberry Pi. The entire rest of your system is redundant.

It is redundant from a hardware perspective vs. something like OpenEVSE, but nothing requires me to use their hardware. So it is not redundant in a system that does not include OpenEVSE.