Show HN: Arduino-based current sensor. My first electronics project.
trafficlightads.net
trafficlightads.net
As it is it looks like they are much too close to each other.
Just having them electrically separated is not enough, you have to account for arcing in all kinds of conditions as well as temporary over voltage (spikes) on the current carrying wires.
The OP is correct, for a non-isolated product (one with user exposed metal bits and connectors) you're not paying enough attention to separation and protection. UL would probably require double insulated wires, wire guides, and moving your wire lug away from logic circuits, adding a fuse, along with all sorts of requirements on labeling, etc etc.
Also, are you calculating RMS current or average current? Without a voltage tap, you also can't determine power due to power factor.
A (very safe) alternative to using the hall sensor the way it is wired up right now: consider wrapping the current carrying wire around a ferrite core and putting a number of turns around the other side of the core to pick up the current (a very basic transformer). That way there is absolutely no need to go 'near' to the low voltage part of the circuit with the high voltage portion of the wiring.
That's called a current sensing transformer.
You could also place the hall sensor if you really want to use that in the gap of a slotted toroid around which the primary wire is wound a number of turns.
Adding a fuse is a basic precaution, you should size it based on the wire thickness that you are using.
You are doing pretty good but beware of knowing 'just enough to be dangerous'.
Alternatively once you've finished prototyping the circuit you could hand off the process of packaging it in a way that complies with the various standards to an electrical engineering firm, from a liability perspective that might be a good idea anyway.
hth
(I would personally have pasted a photocell onto the power LED, if I really needed to know the TV's state, but that's just me. My TV doesn't have a button for "power on", but it responds to a remote code for one.)
(However, low voltage doesn't mean that an accidentally dropped conductor wouldn't ruin your day, so insulating them would still be a good idea.)
Making assumptions about which line carries phase and which is neutral can cause very nasty surprises and should never be a factor. You're one broken circuit away from being the shortest path to ground, even in the neutral line (you'll still have the load as a drop resistor but it's not good).
It works for these things, anyway: http://www.fluke.com/images/products/Industrial/Electrical_T...
Also, your high-voltage connections look a little scary to me. Are those big bolts sticking out of the current sensor live!?
(The datasheet doesn't mention this because the IC can theoretically sink infinite voltage. The input current is put into the chip only to go through a carefully-placed piece of copper that maximizes the effectiveness of the Hall effect sensor. The only limit that matters to the chip is heat production, which depends on the resistance of that piece of copper and the amount of current flowing through it. Voltage simply doesn't affect the chip in any way, so there's no reason to set any limits.)
The problem I see with your current design is that isolating the line voltage from the container is going to be difficult. Line voltage appears on 8 different places; the four connection areas (top and bottom), and the four input pins on the IC itself. Without potting it in epoxy, you're not going to be able to isolate all that from an errant chip of metal that happens to enter the enclosure. And that's all it would take to burn down your house; a little chip of metal gets between the pins but doesn't make very good contact. As current flows, it gets hotter and hotter until it sets the enclosure on fire. (Your circuit breaker will trip if this causes your device to draw more than 20 amps, as a clean short would, but 2400W is more than enough to start a fire.)
Ultimately, you have to keep in mind that you can pull a lot of power out of your house's outlets. This power can kill you or start a fire, so when you are wiring it up to something, you need to think about how your device could possibly fail and protect against it. What if the cover falls off? What if a piece of metal shorts the line voltage to your Arduino's USB port? What if a connection is faulty and gets hot?
This much paranoia is warranted when a minor mistake could kill someone. Is knowing that your TV is on worth dying in a fire for? :)
Now, the good news is that you can make a device that works just as well as this one without having to touch the wire going to the TV. The only reason you have the TV connected through the current-sensing chip is to get the current that the TV's drawing very close to the Hall effect sensor. This will let you make milliamp-level measurements very accurately. But you don't need that accuracy, so taping a Hall effect sensor to the TV's cord will be just as good, and will be intrinsically safe. (I think a few loops of wire will work too, but I just tried this and it didn't work. YMMV. I didn't have any magnet wire, so I used a long piece of wire stolen from a radio antenna.)
(This is assuming that my photoresistor-near-the-TV's-power-LED idea doesn't work, of course.)
Finally, the Arduino is likely overkill for this application. Something like an op-amp set up as a comparator and connected to a free serial port pin would work just as well, and cost you 1 cent instead of 20 bucks :)
Anyway, I'm looking forward to version two; this is a great project and your proof of concept is excellent. But you can make the device simpler, safer, and cheaper; so why not spend an afternoon doing that. The increase in sleep from not having nightmares about the thing catching on fire should definitely make up for the time invested in doing so :)
I also picked up some epoxy this afternoon to do exactly what you said.
I realize the Arduino is overkill, but I'm complete newbie and it seemed like the quickest solution. Whenever my next revision is ready, can I send you an email?
Also, be careful with the epoxy. You need to get some specific kind (that is non-conductive), and I'm not sure what that is. There are all sorts of effects materials have on electronics; the epoxy could add resistance, capacitance, inductance, and any of those could adversely affect your circuit. Hopefully you can get specific advice from someone more qualified than I am.
(And then once you get to that point take a look at the Tweet-A-Watt: http://www.ladyada.net/make/tweetawatt/)
Cost would be very low, even if you have to buy USB<->Serial adapters. And you can run many feet of serial over CAT5.
Also, you may want to check xrandr, that strikes me as the correct way to ask the X server what is connected.
The photodetector idea is interesting. Do you think the ambient room light would cause any problems?
Also, electrical tape is black and blocks light pretty well, so slather enough of that on there and you should be good :) I guess you won't know whether or not your TV is on, in that case, but you can always add another LED that mimics the status of the TV's LED.
(According to Wikipedia, you can use an LED as a photodiode. So you may not even have to buy anything to try this idea out! http://en.wikipedia.org/wiki/LEDs_as_Photodiode_Light_Sensor... )
(Also, a hacked VGA cable may help xrandr report the TV power status. By default, VGA cables supply +5V to the DDC chip in the TV, so it can detect its presence even when off. Since you don't want this to happen, perhaps clipping that pin off will prevent the DDC information from being queried until the TV is turned on.)
As for the ambient lighting, I don't think it will once you use black electrical tape to attach the detector. TVs also usually aren't installed where subject to really bright light (e.g., direct sunlight) because then you can't see the screen.
How much did Polycase quote for having the enclosures milled and printed? In what quantity?
For 100 quantity, milling would be $1.15 each, printing would be $0.76 each and about $200 is setup fees.