Jump to content

[S] ProtoPowerSwitch Boosterpack (formerly AC-powered Relay BoosterPack)

Recommended Posts

Actually, thermocouples generate a small voltage due to the dissimilar metals. So instead of a resistor divider, you just need measure it directly. Well, almost directly...as shown in the TI link I posted above, you want to put resistors in series with the lines and couple them with capacitors. The reason you'd need/want to do this is because even though the thermocouple generates a voltage, it cannot source much current. The ADC draws a small amount of current to measure the voltage, but it is more current than the thermocouple can source. Steady state, the capacitor voltage will settle at the thermocouple voltage. With capacitors near the ADC, the current used to sample comes out of the capacitors which are resting at the thermocouple voltage. The resistors between the capacitors and the thermocouple serve to limit (actually almost completely eliminates) the surge of ADC sampling current which comes from the thermocouple. And thus we have a basic low-pass RC filter.


Other temperature sensing elements (such as an RTD, resistive temperature detector) do have a resistance that varies with temperature, so you can use a resistor divider circuit to simply measure the voltage. There are two things to be aware of for high precision temperature measurements with RTDs, however. First, you will want to use two wires to apply the voltage across the resistance and two separate wires connected very close to the RTD to measure the voltage (such that the sensing lines don't have to carry much/any current and thus you eliminate resistance contributions in the measurement lines). Second, the act of measuring continuously (forcing continuous DC current through the RTD) actually causes the RTD to heat up slightly, affecting the measurement; this can be mitigated through some clever low-current AC coupling as shown here.

Link to post
Share on other sites
  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

NOTE: this BoosterPack uses high voltage (120V) AC power which is dangerous and can be fatal if not handled/packaged properly I created my first BoosterPack for the MSP430: an AC-powered AC relay. Th

As much as I like it, I would strongly discourage from making transformer-less line voltage booster packs. Imagine what would happen if someone connected hot wire to GND and plugged it to USB. Even i

Larsie, thanks for the link to an enclosure; it should work well for applications like ours provided that the chassis/safety ground exists and care is taken to ensure the metal of the enclosure is tie

Posted Images

I am using a thermistor in mine. This one


http://uk.farnell.com/epcos/b57560g104f ... tt=3878697


It is the same as I use in my 3d printers, and takes heat up to 300C. I could have used a cheaper one for water, but I want to use the same for avreflow oven or soldering plate. It has to be enclosed if in water, but works well. The resistance change is not linear though. 3d printer sites hav conversion tables. It is a very simple circuit. You just need a resistor and an analog input on the mcu.


Thanks for the project link. I am planning to isolate the thermistor. Its necessary for it to work properly in water.


Thermocouples are nice too of course, but quite expensive in comparison.


My project will connect into the middle of a power extension cord, so I can connect any 230v device that can take being turned on or off. I will use this enclosure to isolate the board:


http://uk.farnell.com/multicomp/mcrp106 ... tt=1520406


Sorry for interfering on the thread, but I guess this might be useful for someone wanting to use your board.

Link to post
Share on other sites
As much as I like it, I would strongly discourage from making transformer-less line voltage booster packs. Imagine what would happen if someone connected hot wire to GND and plugged it to USB.?


The idea that the "hot" and "neutral" wire are only a North American phenomenon. With zero basis in fact.


Many products come with polarized at the plug connectors but the cable itself can be plugged backwards in the machine (such as laptop power cords to the AC/DC adapter). Or the tons of non-polarized plugs in both North America but the rest of the world that has the "neutral" wire tied into ground none the less, meaning you might never know what is connected to neutral or the "hot" wire as only in North America are polarized plugs defined as some sort of "standard".


Also international regulatory regulations prohibit the use of the neutral and hot wires in the manors sometimes described by people. A laptop or desktop PSU is NOT allowed to treat the hot wire as the "hot" wire, and the neutral wire cannot be treated as the "grounded" wire. Only in a properly installed 3 wire system can you try to use a wire as a ground throughout a building/home, of which many homes due to age do not actually have this ability to use, which again after the direct AC powered circuit (such as AC to DC conversion in a PSU) is still quite illegal to reference your loads to the AC neutral/ground because the wiring in any building is treated as suspect by the regulations.


Anyways this is a pretty interesting read, and a good summery from a respectable source (APC):


http://www.apcdistributors.com/white-pa ... hology.pdf



Link to post
Share on other sites

I think TN networks that have one of the wires connected to ground are relatively common in newer installations in Europe also. But this is probbly mainly done for cheaper power transmission (less loss). Network with both live wires are generally safer to touch, but asyou say you can certainly not trust that th plug is put in th right way, whatever way that is. In Norway we have a Mix. In my house, built in the seventies, both are live (an IT network, as described in http://en.wikipedia.org/wiki/Earthing_system) In new large building projects here, they use TN I think.


Btw. It might be good to pass both wires through the relay and use a dpst relay? Might be safer???


Note2: i think current as low as 15-30mA can kill you.

Link to post
Share on other sites

Yes, however combining your post about the power supply:


Thanks. I'll test the circuit. In Norway, where I live, many installations have both wires as live. Something like 135 V compared to ground, but 235v between the two live wires.


Effectively your "GND" and your 235V (230V here), and your "middle ground" wire are all present in a North American home, we just don't use the 230V leg unless its to power our ovens. The 2 wires I'm talking about being live, are effectively in this diagram as N(neutral) and PE (GND) which are typically wired together, and the L1 line give you a nominal 115V/120V.




While N/PE is "grounded" using a grounding rod at the home/building, its wrongly assumed to actually be a "ground" in the 3 wire system, or the older 2 wire system, in the similar sense that the ground on a DC power plane has nothing to do with each other.


Connecting the N or PE line (per the diagram) to the metal case of a device is actually quite illegal if its done to make a "ground", your DC ground plane may be connected to the metal enclosure, however, AC grounding to N/PE is a no-no.


The electricity to the home is not much different between here and there, we get a 230V line, (so L1 & L2) but we only push L2 to our bigger appliances (stoves), where as we wire L1 to our lights and outlets. But the "safe" N/PE and the "hot" L1 terminology here is a very old practice due to old light fixtures, and its not actually any safer then just realizing that both are hot and can kill you. As well, when designing actual devices that use AC, treating any of the lines shown (PE/N/L1/L2/L3) as your device "ground" by tying into it is dangerous and illegal internationally.


Which, combined with the fact your not allowed to use a wire to reference your systems "ground potential" at, means that at least when done right a USB powered LP though the AC mains if done right should NOT kill the laptop regardless if the "hot" or "Neutral Ground" wires are mixed and matched between both devices.



Link to post
Share on other sites

Larsie, thanks for the link to an enclosure; it should work well for applications like ours provided that the chassis/safety ground exists and care is taken to ensure the metal of the enclosure is tied only to the chassis/safety ground. If the chassis/safety ground wire is not provided or available, a plastic enclosure should be used instead because it is possible for a loose wire internally to contact a metal housing and energize it, whereas a plastic enclosure (like laptop power supply) is insulative and cannot become energized even if a wire comes loose inside. (Edit: nevermind, just realized the description states the enclosure is made out of ABS plastic and not metal, so no need to worry about grounding the enclosure)


And yes, 15-30mA can kill. Again, I recommend plugging into a GFCI outlet when working on something non-isolated from the mains; even though you can still get killed by the 120V, you do gain protection from accidental shorts to other objects/surfaces tied to the earth/chassis/safety ground.



...your DC ground plane may be connected to the metal enclosure, however, AC grounding to N/PE is a no-no.

Not to be pedantic, but since it affects safety....techically the distinction is not AC vs. DC but isolated vs. non-isolated. A device which provides galvanic isolation (i.e. high impedance) from the mains can safely connect any one (but only one) of it's output wires to the AC chassis/safety ground. For example, if you take the AC mains power and run it through an isolation transformer, then it safe to tie one end of the output to the chassis/safety ground. Same goes for a DC power supply with an isolated output. However, the circuit I use for the transformerless power supply booster pack cannot have anything tied to safety/chassis ground even though it is DC because there is no isolation from the mains.


Just to restate: isolation from the mains is what matters. The chassis ground can be used as a reference for any isolated AC or DC voltages (e.g. AC isolation transformer, DC isolated power supplies, batteries, etc). Anything that is unable "complete the circuit" to send current through the chassis/safety ground during normal operation is ok.

Link to post
Share on other sites
techically the distinction is not AC vs. DC but isolated vs. non-isolated.


Very true, and technically a transformerless AC-DC power supply probably wont cut it safety wise to ground anything as you say. Reading back I over simplified the situation in my post. So thank you for expanding. :D


While I'm no expert at AC, actually I tend to avoid it (for the most part I still have a toroidal transformer I intend to make a power supply with), but not necessarily about your project in specific, just a general FYI before someone gets hurt. Because I keep hearing things like "hot" and "neutral" which are thought to be "safe" or "grounding" wires and it scares the crap out of me. Since in reality both are "hot" as they change phase 50-60 times a second and both will kill.



Link to post
Share on other sites
...Since in reality both are "hot" as they change phase 50-60 times a second and both will kill.

Actually, "hot" doesn't have anything to do with phase. To simplify, in a properly wired 120V installation, you touch "hot" you create a loop to the ground... and most likely you die. Nothing should happen when you touch "neutral". But don't try it, I have been shocked couple of times when working on 220V and it is not a pleasant experience at all.

Link to post
Share on other sites
Actually, "hot" doesn't have anything to do with phase.


Yes that is true, sorry thinking of my math classes, teacher kept calling the different stages (relative to the degree position along the x-axis) of the sine wave as a "phase". In AC, your phase is caused by the shift of the sine wave relative to each other.




But yes, nothing should happen if you touch the neutral, but as you said, and the regulations state, it can be dangerous to think that its "safe" to touch.



Link to post
Share on other sites
  • 2 weeks later...

Just wanted to provide a quick update; I had a chance to play around with the boosterpack some more today and found that there actually is not a problem with the LDO regulating while unloaded. It turns out that somewhere between the schematic and the board layout, the ground connection of the LDO disappeared. After whitewiring the ground connection in, the 3.3V works just fine.


Interestingly enough, however, it does not work well with the TXD jumper in. I'm using the that pin (P1.1) to drive the optocoupler for the relay, which is probably a mistake; it causes the relay to open and close rapidly instead of staying on solidly, which appears to be because VCC falls from 3.3 down to a little over 2V. I don't know exactly why driving TXD high (with the TXD and VCC jumpers in place) causes the LDO supply to fall so much; is this just an part of the programming operation for the Launchpad? It may just be that the current draw is simply too high; if the total power draw is more than 29mA (including LEDs, opto, MSP430, and any other chips on the top portion which draw from the 3.3V), then the boosterpack as-designed cannot sustain it.

Link to post
Share on other sites
  • 2 months later...

I've been working on an improved version of the AC-powered AC-controlling BoosterPack and before I send the boards out to be prototyped, I wanted to float the design for comments or feedback. Schematic:


Proposed layout:



  • -The new board supports the use of relays, SCRs, and/or TRIACs; the schematic shows an example of each.
    -It supports up to three of any combination of those devices (labeled ACS1/2/3 for AC Switch), and SCRs/TRIACs can be packaged as either TO220 (or equivalent, with the gate on pin 3) or as TO92 (or eqiuvalent, with the gate on pin 2).
    -One footprint is used for a 4 pin opto for relay control or a 6 pin optotriac for the SCR/TRIAC control. For the 6 pin optotriac, the only caveat is that pin 5 should be bent up or removed (as is specified to be a "no connect")
    -The board can be powered by AC using X2 film capacitors or one or more resistors. Multiple capacitor sizes are supported.
    -The Zener diodes that set the DC voltages can be either thru hole or SMD; likewise, the alum. electrolytic caps can be thru hole or SMD. Same for the fuse (optional).
    -For inductive loads, thru hole spaces for MOVs are provided for both normally open (NO) connections as well as the relay's normally closed (NC) connection.
    -The board is rated to handle about 7 or 8A of load current.
    -A bride rectifier is supported for the AC input power to increase the low voltage current available (as long as you're willing to give up a hard reference to neutral for the MSP430 ground).
    -The board does not have to be AC powered. If you only want to control AC power but you don't want the microcontroller to be plugged into AC directly, you can simply not populate the AC film cap/resistor and you will still be able to control SCRs and TRIACs while maintaining isolation from the mains (assuming you power the microcontroller through some other means, such as USB plugged into the Launchpad).
    -The board is 2 inches wide and 3 inches long and plugs directly into the Launchpad.


So that's about it...it's basically a board to control AC power in an isolated manner with the option to operate entirely off of AC power as well. If anyone has ideas or suggestions for changes/additions/improvements (e.g. external I/O interfaces?), I'd love to hear them.

Link to post
Share on other sites

LEDs would certainly be useful; I had one on the original single-relay version but hadn't decided whether or not it is worthwhile to add on this one. I have about two square inches left before I exceed Seeedstudio's size limit to bump up to the next highest price boards, so there should be plenty of room for the LEDs.


Other thoughts I had might be just some general purpose I/O access to the MSP430 pins, but I don't know what spacing or pin configuration would be the most useful for typical applications. I could imagine CC2500 tie-in being relevant.


Another thought is to maybe just leave some open space on the board, maybe on the top side, so that there is at least one keepout region that is known safe to touch (but I still do not recommend touching anything directly only the board while AC is live...on my first little board, it looks pretty silly but most of the time when testing it I would either just dangle it by the cord or hold it by the case of the X2 film cap). Either that or settle in on a suitable enclosure and include some matching mounting holes...?


One other thing I've considered adding but still need to figure out the cleanest way to do it would be a way to sense the zero-volt-crossing point of the AC input sinusoid. This would allow for phase angle control firing of the SCR or TRIAC to perform "light dimming" type functionality.


I'm certainly interested in sponsorship for the first batch of boards, every bit of feedback and support helps bring them closer to reality.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...