Professional Documents
Culture Documents
net/Hardware
Home
Navigation
Hardware
Front Page
Progress
Hardware The schematic may look complicated, but the EnerJar's electronics are
Software actually quite simple. Power is voltage times current, so we must take
FAQ these values and provide them to the PIC as inputs, so that it can
People perform the calculation. There is also a bit of wiring for the LED display.
Instructions
DANGER: The EnerJar's circuitry involves 120-volt AC line
RSS voltage. Improper care can result in potentially fatal electrical
shock. Do not attempt this project if you are unsure of proper
safety procedures. The plans for EnerJar are provided without
warranty and the designers cannot be held liable in the result of
property damage, personal injury, or death.
Seriously, the EnerJar does some pretty crazy things with AC voltage.
Be careful when building it. Below are some design and building notes.
Look for more photos and detailed build instructions in the coming days.
Power supply
In our original prototype, we used an old 5-volt cell phone charger as
Schematic (click for full size) the power supply. The EnerJar draws almost no current, so any 5-volt
DC wall wart will work.
CAUTION: Never solder the circuit with power applied to it. Doing so is extremely dangerous.
Current sensing
The EnerJar uses a very low-resistance shunt to measure the current. Ohm's law states that the voltage across a resistor is
proportional to the current running through it. We can exploit this to create a very cheap and effective current-to-voltage converter.
The shunt resistor, R7, that we use is a length of about 8 inches of 18-gauge wire. This is actually about the size of the wire in some
extension cords, so the voltage drop across it is quite small, so this "resistor" gives off virtually no heat. To amplify the voltage, we
use a high-precision instrumentation amplifier (IC3), the LT1167. This mighty chip can amplify many thousands of times with almost
no distortion or noise. One of the features we are working on is auto-ranging, where we will use a digital potentiometer as the gain
resistor (R8) to provide adjustable gain.
Voltage detection
The voltage is much more straightforward to get into a useable form. A 68:1 voltage divider (R5 and R6) is used to make the
peak-to-peak voltage fall within the 5-volt range that the PIC is able to capture. This voltage is then buffered using one channel of
our op-amp (IC1-d) before being sent to the PIC. The EnerJar can be modified to work with 240-volt AC simply by changing R6 to
1.5Mohm.
Voltage references
R1, R2, R3, and R4 form a voltage divider with outputs at a nominal 1.5, 2.5, and 3.5 volts DC. These voltages are buffered with the
remaining three channels of the opamp, IC1-a through IC1-c. These form reference voltage outputs Vref+ (3.5v), Vref0 (2.5v), and
Vref- (1.5v). I know the naming is a little confusing, I pulled an all nighter last night finishing the schematic but I will fix the naming
in a future revision. Note that these voltages are nominal, the exact values aren't critical because the PIC has calibration factors that
can correct for imprecision. (Currently these values must be hand-coded, so you need a programmer that can rewrite the values on
the chip. We plan to develop an auto-calibration mode where you can calibrate the EnerJar to a 60-watt lightbulb, for example.)
Vref+ and Vref- are only used by the PIC as the high and low voltage references for the A/D converter. In other words, a signal at
1.5v or less will be converted to 0x000 by the ADC and a signal at 3.5v or above maps to the maximum value, 0xFFF. This has to be
done because the instrumentation amplifier can't output a voltage within about 1.5 volts of its supply rails.
Vref0 is connected to the neutral AC line. This means that the 0VDC power supply rail is about 2.5 volts below neutral and the +5V
rail is about 2.5 volts above neutral.
Parts list
1 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
Not a good idea for europe Submitted by Veronica (not verified) on Tue, 01/13/2009 - 19:09.
This device would be quite a bit dangerous if used in a country that makes no distinction between Live and Neutral, like most
european plugs.
Even if the plug is of the grounded variant it can be inserted either way, since it is symmetrical. Only ground is ever guaranteed to
be in a specific wire (the yellow-green striped one, unless you live in a house built in the 40s or so, then it could possibly be red).
Further more, there are no standards defined which pin is N and which is L, so you can never be guaranteed to have the live
or the neutral in a specific wire, and all devices should be built to cope with this.
In this case, reversing L and N could present dangerous levels of voltage, compared to ground, on the 5V input where the "wall
wart" goes.
I would therefore suggest modifying the circuit to tap the 5V from the mains-power internally inside the jar. It's relatively easy to
do, even without a transformer. That would make the circuit dangerous to touch anywhere, but I already consider it such, and it
should be double insulated and have no connections to the outside world (except for the mains-in and out of course) anyway.
reply
What changes must u make to apply 240v. Submitted by aaroni (not verified) on Mon, 12/29/2008 - 19:29.
wonderful project
reply
reply
reply
How to measure power factor? Submitted by Far8z (not verified) on Thu, 07/31/2008 - 04:35.
the Enerjar is very interesting project...how to modify the circuit in order to measure power factor?
reply
thank you...
keep it rollin...
reply
voltage divider ratio Submitted by Chris Kiick (not verified) on Wed, 05/28/2008 - 19:46.
Hi,
Was there a particular reason for using a 68:1 voltage divider? That would measure voltage +/-170V. In US, AC is a max of 127V.
2 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
Just wondering if a different ratio would make the meter more accurate.
reply
-Glen
reply
reply
reply
reply
Does Ground connect to 0 VDC? Submitted by Joe Wannabe (not verified) on Thu, 05/08/2008 - 22:31.
Sorry if it's a dumb question...
reply
reply
240V: suggest two Rs in series for R6 Submitted by Scott (not verified) on Mon, 05/05/2008 - 20:26.
Great project! One note about 240V operation. The repetitive peak voltage across R6 would be around 340V, and the maximum
working voltage rating for carbon resistors is typically 250V. I'd suggest replacing the single 1.5M resistor with two 750k resistors
in series, so that each will see only 170V.
reply
circuit board Submitted by Easy Xjer (not verified) on Tue, 04/29/2008 - 21:11.
I have been over the article several times. Where is the info on the circuit board?. Assembly says to solder to the board but I cant
find board info. Where to get one.
reply
-Matt
reply
How low does it go? Submitted by Bob (not verified) on Tue, 04/29/2008 - 14:49.
I have devices that should be drawing 0.35W at 120V. Can the EnerJar measure this small power consumption?
Nice project!
reply
Re: How low does it go? Submitted by Matt on Wed, 04/30/2008 - 19:27.
Hi Bob!
Great question. The design, as posted, would not be able to measure such small power draw. However, if you are building it
with the intent of _only_ measuring small currents, you can make R7, the current sensing resistor, much larger. Aim to make
the maximum voltage across R7 in the range of 5 mV. if R7 is 1 ohm, the maximum power that the circuit can measure is
about 0.6 watts (if my calculations are right).
Best regards,
Matt
3 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
reply
I'm not the greatest at Submitted by Anonymous (not verified) on Wed, 03/05/2008 - 00:23.
I'm not the greatest at electronics and was trying to understand how the hardware works in this project. What is the purpose of
the opamps to form the reference voltages? Is it merely to show a high-impedance load to the voltage divider, and keep the
reference voltages stiff?
reply
joe
reply
reply
So yes, you are right. My initial design was unduly dangerous, and I just updated the schematic to make it neutral-referenced.
Thanks for keeping me honest!
-Matt
reply
The mechanical construction example uses a metal lid on the jar, and metal bolds to connect the PCB to the metal lid.
reply
If it's metal, ground it Submitted by Charlie (not verified) on Sun, 03/02/2008 - 02:01.
The standard safety rule would be that if you use a metal lid, it should be grounded. It would be easier to use a plastic-lid jar
(or tupperware).
reply
there are cheap hall effect Submitted by Anonymous (not verified) on Thu, 02/21/2008 - 06:32.
there are cheap hall effect sensors that can sense the current without using a resistor and will isolate everything else from the AC
line. I wonder if there is a simple way to implement power factor measurement too.
reply
reply
Hall devices are notouriously difficult to use Submitted by RL (not verified) on Tue, 02/26/2008 - 13:04.
Hall devices are notouriously difficult to use and to calibrate and keep calibrated. The measurement accuracy will be low.
The mechanical construction becomes an important factor, as coupling to the power conductor and de-coupling to the
environment are important.
Besides that, the line voltage needs to be measured too, so that defeats the isolation advantage. Or you would have to go
for a transformer solution, but that reduces accuracy and increases costs and volume.
reply
Hall effect devices are not Submitted by Anonymous (not verified) on Thu, 03/06/2008 - 00:07.
4 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
Hall effect devices are not "notoriously difficult" to use. Allegro makes plenty of calibrated units for a few dollars. It
just happens to be that, yes, we need to measure the voltage as well so we don't care if it's isolated.
reply
For those in Europe who don't want to wait for the EnerJar, I googled for a 240V alternative to the Kill-a-Watt that someone
pointed to, and some guy recommended "Energy Monitor 3000" (around 60 USD) or the smaller "Energy Check 3000" (around 40
USD). Once you find that one, you will find many others too.
reply
Have you considered a DC version? Submitted by edoc (not verified) on Fri, 02/15/2008 - 04:07.
Have you considered a DC version?
It would be really handy to have a DC version that could be used with 5-24vdc.
Thanks! doc
reply
AC power measurement is a chalenge due to cos-phi and power-factor; the phase difference between current and voltage and
the non sine form of currents many devices generate.
This project appears to do the AC measurements the right way. Keep up the good work.
reply
Computer interface Submitted by Lee Colleton (not verified) on Wed, 02/13/2008 - 08:17.
Having a visual output of power usage is a good idea. I'd really like to see a serial or USB interface so this data can be collected
automatically and easily reported. Is this a part of your plans for the EnerJar?
Power sensing and reporting should be standard features for electrical sockets. Having a meter on the side of one's house that
shows total usage is nice, but a complete report of when and where power was used would be the easiest way to curb energy
waste. Providing a computer monitor of power usage can keep an energy budget on track more easily than waiting for the power
bill. The trick is to make the sensors cheaper than the amount of energy that can be saved (and that's a problem mass production
can handle).
reply
How about reporting data over the AC lines? Submitted by Anonymous (not verified) on Fri, 04/25/2008 - 18:40.
I'm very interested in this project, but particularly if it can be interfaced with a computer. I'd like to build a few dozen and put
them into power strips, behind my fridge, etc. Then have them all report data periodically via the power line. Since the PIC
already knows when the zero-crossing happens, it shouldn't be too terribly hard to add an X10 (or X10-like) capability. We'd
then need a node that handles the power-line interfacing to the computer (probably opto-isolated serial)
Taken one step further, the PIC could also control a small solid-state relay to control the load. This would allow the module to
not only read power and report it remotely, it could be used for automated control.
Thoughts?
reply
Re: Computer Interface Submitted by Tyler (not verified) on Thu, 02/14/2008 - 09:10.
>> I'd really like to see a serial or USB interface so this data
If my reading of the description is correct, then connecting this device to a computer would be dangerous. Since the "ground"
reference for the circuit is actually the "hot" line from power outlet, then touching the circuit with anything (your finger, a USB
cable, whatever) will yield a nasty shock, and probably destroy any grounded device you connect to it.
Not that it's impossible to build such an interface, just probably a bit expensive.
reply
Optiocouplers. No need for Submitted by Anonymous (not verified) on Tue, 02/26/2008 - 16:42.
Optiocouplers. No need for wireless or any other stupid solution. Nice and simple.
reply
Why not wireless? Submitted by Anonymous (not verified) on Tue, 02/26/2008 - 06:10.
5 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
Instead of a wired PC connection, the ultimate would be a wireless solution (802.1x or Bluetooth). I'm not sure how much
energy it takes to do a wireless transmission. To save energy it might be smarter to do burst transmissions once and a
while. Another option would be to have the jar data log usage which could be offloaded via USB memory stick once and a
while. Keep up the good work.. projects like this inspire confidence that we will be able to overcome our energy problems.
reply
Wireless with XBee Submitted by Jordan (not verified) on Tue, 02/26/2008 - 06:59.
You could use a pair of Digi XBee modules to stream the samples wirelessly for data logging. These modules can
operate in a mesh network so you could have an entire farm of these around your home for logging power
consumption over time.
I see that pins 16 and 17 of the PIC are unused, which are the USART ports of the PIC. It would be a very, very
simple exercise to configure the modules to transmit everything they receive from the PIC transparently over the
network and organize the data on a PC.
reply
It would indeed be dangerous Submitted by Howard (not verified) on Fri, 02/15/2008 - 12:08.
It would indeed be dangerous to connect directly to anything outside the jar, so you'd use opto-isolation. It's not difficult,
but it's also not trivial to design the layout so that the correct "creepage and clearance" distances are maintained between
anything live and anything that connects out of the jar. These distances will be larger for 240V, so this needs to be
designed in from the start, including things like a slot in the PCB under the opto-isolator to increase the creepage distance
between the live and isolated pins.
Of course, as the jar is glass, you could use that as the isolation and do your own Opto- by having LEDs inside which send
the data, and a photo-receptor on the outside to pick it up and send it to a PC, but light interference makes this less easy
than buying an opto-isolator chip.
Here in the UK you can get plug-in meters that do the sort of thing that the EnerJar does, but also just display the
information. Adding a PC interface to the EnerJar would make it unique, and to people like me, *very* useful.
reply
Wireless Simplification Submitted by A Randome Dude (not verified) on Wed, 02/27/2008 - 01:35.
You are inside a transparent glass jar. Forget building your own crazy opto scheme, just use an IR Transmitter (which
could be appropriately salvaged from an old remote control to save on waste) and beam stuff to the nearest IR
receiver. It may not be the newest, hipest thing on the block, but it is unmatched in price and simplicity. If I
remember correctly, most common IR protocols are standard serial that the unused USARTs ought to be able to
handle natively. You could even make a jar that automatically shuts off a tv when you use too much energy (which, in
my book, is the minute it turns on)
reply
reply
reply
reply
reply
6 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
China and India both have terrible records on environmentalism, both for different reasons, but the result is the
same. Perhaps one shouldn't judge a book by its cover, but judgment really ought to start somewhere. I'll
address Chinese issues, b/c they're the most terrible. Recently, China was struck with the possible extinction of its
river dolphins. It wasn't too much cleanliness and order that brought about their sad demise.
What about total carbon emissions in China? They really deserve to be the target of a healthy outpouring of
international outrage. The PRC hides behind low per-capita carbon emissions, but their total number of citizens
makes this statistic a joke.
What you seem to be asking is that westerners withhold judgment until well acquainted with the people and their
practices. You're really asking that the world turn a blind eye to the mass industrial poisoning going on all over
China.
Now as for judgment, you indicate that the above individual is not "worth(y) to judge." If not he than who? It
ought to be the right of everyone to judge whatever they see fit to, for without discrimination, life is void of
meaning and ability. Please, the internet is a scary enough place without you advocating for two-bit despots on
building their empires on the bones of the dead.
India at least has environmental laws and a freely elected parliament, and a desire to try.
reply
don't feed the trolls :) Submitted by Anonymous (not verified) on Thu, 02/28/2008 - 04:17.
don't feed the trolls :)
reply
More good ideas... Submitted by Anonymous (not verified) on Tue, 02/12/2008 - 19:09.
This DIY is great to educate people on energy usage, but it's mainly preaching to the choir, as anybody with the means and will to
build the thing is most likely both aware and able to prevent excess electrical use already.
Since you have so much electrical knowledge, how about creating DIY products that will actually prevent excess usage?
I would love to know how to build a powerjack for my house, that has a remote control. It would completely shut down all
electronic usage in my house, unless i am actually present. By attaching a motion sensor or remote-control cut-off switch to a
powerstrip, excess power drain is actually stopped when there's nobody around.
Or how about a capacitor, that would allow me to set a target for total electrical output for a day for my house. You would set the
capacitor for the amount of energy you want allowed, and when that limit is reached, the power would turn off-- true self-imposed
energy rationing. "Sorry kids! No more TV, we've used up all our energy for the day.."
reply
preventing excess usage Submitted by Brad (not verified) on Fri, 02/29/2008 - 15:12.
Anonymous wrote: "how about creating DIY products that will actually prevent excess usage?"
The easiest solution here is to use the product between your ears! :)
reply
powerjacks and capacitors? Submitted by Anonymous (not verified) on Fri, 02/15/2008 - 00:14.
Powerjack:What about food in your refrigerator and having to reset (non-battery) electric clocks - if you shut everything
down?
Maybe some reading on capacitors (like at http://www.wikipedia.org) might be helpful. Not sure they would help in this
application.
reply
reply
If you are using a purely resistive load, like an incandescent lamp or a resistance heater, you will be fine. But a PC power supply,
7 of 8 10/5/2010 8:02 AM
Hardware | EnerJar http://enerjar.net/Hardware
a cheap fluorescent ballast, or a compact fluorescent will give incorrect readings due to phase shift.
Check Wikipedia Power Factor Entry for a far better explanation than I can give.
There's a relatively cheap device called a Kill-a-watt that Amazon carries for about $20 that will do measurements that account for
the power factor, and will accumulate data as well.
reply
1 2 next › last »
E-mail:
The content of this field is kept private and will not be shown publicly.
Homepage:
Subject:
Comment: *
Web page addresses and e-mail addresses turn into links automatically.
Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <span> <img>
Lines and paragraphs break automatically.
Images can be added to this post.
8 of 8 10/5/2010 8:02 AM