Jump to content
43oh

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


Recommended Posts

  • 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 ordering parts for Page 5 on your "Pictures of the boards Nov 2012.pdf":

 

I assume the "gate resistor" on R3 is just a standard resistor, not some special kind... the part number you have is a duplicate of R1.

 

Also what is R1 under the relay section? 680 ohm?

 

In your schematic PDF, is it SW2 triac, SW3 SCR, and what is the difference between SW1 and SW4?

Link to post
Share on other sites
The gate resistor is indeed a standard resistor; it is only called a gate resistor because of how it is used in the circuit, connected to the gate of the TRIAC or SCR. Good catch on R3, I've corrected it above to be a 180ohm resistor part number.

 

In the schematic, yes, SW2 is a TRIAC and SW3 is a SCR. 

 

R1 for the relay section is either a 330ohm resistor for an opto-driven relay coil or a 680ohm resistor for a transistor-driven relay coil (I've updated the BOM above to reflect that as well). In the schematic, SW1 is a relay that is driven by an optocoupler, whereas SW4 is a relay driven by an NPN transistor. The rationale behind which to choose depends on several factors:

 

Arguments for using optoisolator-driven relay coil

  • In some instances (such as the transformerless power supply configuration), the optoisolator is required because the configuration uses two voltages (3.3V for the MSP430 and 24V for the relay coil) with separate grounds. In the transformerless power suppply specifically, the 24V ground is basically tied to the positive side of the low voltage. If you try to use a transistor instead of an opto, the microcontroller would be unable to turn it on (because the microcontroller is unable to drive the base of the transistor above the 24V ground, i.e. the emitter voltage)
  • In other instances, someone may choose to use an opto because of noise or voltage level issues. For example, if you're driving a 12V relay coil from a $200 FPGA output pin, the optoisolator might be preferred over a transistor because if somehow the transistor gets damaged, you could expose your expensive FPGA to high voltages which can damage it, whereas the opto will likely continue to isolate electrically.
  • If the relay coil injects a bunch of noise into the driving circuit, you may want to isolate the ground through an opto, because a transistor precludes having isolated grounds.

Arguments for using transistor-driven relay coil

 


  • On the other hand, you may want a transistor because Vce (the voltage drop across the collector to the emitter) is low. At tens of milliamps (which is the relay coil current) passing through the output of the optocoupler, there is about a corresponding 1V drop across the output of the optocoupler. This means that with a 5V USB-powered circuit, the relay coil will never see the full 5V across it. The opto will create a voltage drop slightly more than 1V, leaving only 4V across the relay coil. The Omron relay I use states in the datasheet that it "must make" at 75% of the rated voltage, so as long as the relay sees more than 3.75V across the coil, the relay will turn on. However, that only leaves less than 0.25V of margin. Alternatively, with the NPN transistor, the Vce is only about 0.2V, you can still provide 4.8V to the relay coil directly, leaving plenty of margin (more than 1V of margin). Note also that if a 12V or 24V relay coil were to be used (which is a higher voltage than a USB connection provides), a 1V drop would be a lot less significant than it is for a 5V relay coil.
  • The CTR of optocouplers  is generally lower than the hfe (the DC current gain) of a transistor...The selected opto has a minimum CTR of 600%, which means that you can pass at least 6x the current through the output compared to what you drive through its input (internal LED). The 5V relay coil requires 72mA of current. 72mA is right at the maximum output current for the opto; beyond that you start to exceed the power rating of the opto. Looking at the datasheet for the LTV-815 (figure 5 specifically), I see that at 10mA forward current (into the internal LED), I get about 7.5x CTR, so I can draw 75mA on the output (which corresponds to the maximum collector current specified in the electro-optical characteristics table as well). That is barely enough to turn on the relay coil at 5V, but we can assume the current draw will be less because (as we already established) the opto driven relay coil will not give the full 5V anyway. So we figure the coil will actually draw 75mA * 4/5 = 60mA and we actually look ok with 10mA in. But do you really want the MSP430 to have to drive 10mA per relay? With all four relays on, 40mA is quite a bit of current (especially given that some MSP430 have a total maximum current output of 48mA...and we haven't even started counting the current drawn on MSP430 pins from LEDs, etc.). You can of course drive the opto (and LEDs) with a transistor instead, or by adding a transistor on the output of the opto (which is effectively taking the Darlington transistor pair on the output of the LTV815 yet another step). You could also sidestep this issue by spending a little more on the opto...insead of ~$0.2 per LTV815 at Mouser for 600% CTR, you could go for the ~$0.6 per PS2502-1-A at Mouser for a 2000% CTR (still with a 1V drop on the output though)...
  • The transistor costs less. If you want something that does the job elegantly by providing a 25x current gain when the output current is 75mA (so we only need 3mA to drive it on) and only 0.2V drop across the output, the transistor I chose is only $0.4. Less than 20% of the cost of the cheapest opto. For someone wanting to prototype a design with plans to go into production, that cost savings can make quite a difference.
 

I'd say the bottom line is that unless you require isolation for noise immunity, or because you need/have different grounds or other reasons to maintain isolation, I would certainly prefer the transistor-driven relay coil as shown for SW4 in the schematic (for a 5V coil relay, anyways) . The cost is lower, the voltage margins are better, the current required from the microcontroller is lower, and you are not susceptible to the CTR degradation of the opto over time (i.e. your long term reliability improves).

 

I can say that I have implemented both and at the very least, both options are functional. You can see this on the second page of the pictures of the boards pdf, where two have the optos and two have the transistors. (note that on the opto versions, I forgot to buy 330ohm resistors, so I just go it close enough by installing a 680ohm on both the top and bottom side of the board to get a parallel combination of 340ohms).

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

I see one definite problem: the 815 optocoupler in position U1 is installed backwards; you'll need to remove it and rotate it 180 degrees. The alignment dot on the silkscreen art is fairly small, so I'll make it larger on the next revision of the board.

 

For the SCR and TRIAC, the three position terminal block is unnecessary, you only need two. This is definitely not a problem though. I used some three position terminals on mine because I ran out of the two position terminals.

 

I only see one MOV behind the relay (is there a second one?), which may be perfectly fine. If you only plan to connect a load to the normally-open or normally closed side of the really, you only really need one (across the load). For that matter, you only really need it at all for inductive loads (e.g. motors) that will generate a voltage spike when you remove power.

 

I'm assuming the corner notch on the LED aligns with the silkscreen triangle, can't tell from the picture.

 

I'm also assuming you got the red jumper wire in the right spot for 5V from the USB on the Launchpad, as I can't see it directly in the picture.

 

Lastly, one thing to note, on mine I put additional capacitance on C4 and C5 out of habit because it was needed on the transformerlessly-powered variant. I don't think this capacitance is necessary, and I know that it technically exceeds the USB specs for maximum 5V capacitance of 10uF (not that I've had any problem with it). Just in case, I just wanted to make you aware that I don't think I've tested without it, so if there are problems with actuating the relay (e.g. the board resets when you turn on the relay), this is the only difference I see between the boards.

 

Thanks,

David

Link to post
Share on other sites
  • 3 months later...
I've completed what should be the final design iteration for the ProtoPowerSwitch BoosterPack.

 

post-8235-0-16444000-1368853380_thumb.jpgpost-8235-0-94567500-1368853402_thumb.jpgpost-8235-0-68729600-1368853435_thumb.jpgpost-8235-0-01217700-1368853474_thumb.jpg

 

This version of the board provides more simplicity, flexibility, and ease of use compared to the previous versions. There is only one switching element per board, and (as before) it can be a relay, TRIAC, or SCR.

 

-When populated with a relay, the relay coil power can be provided by the transformerless power supply or by the 5V on the Launchpad.

-The microcontroller can be powered from the AC mains connection via transformerless supply or from USB (selectable with jumpers), making it easier to transition between a safer debug mode and a mains-powered mode.

-The microcontroller pin used to turn the switching element on and off can be selected from any of the 20 pins by using a jumper.

-For phase angle control of TRIACs and SCRs, the zero-volt detect signal can be routed to any of the 20 pins via jumper. 

 

If want to see the new board in action and you happen to be at the Maker Faire Bay Area this weekend, Texas Instruments will be there with a TRIAC ProtoPowerSwitch board running a demo program with the following stackup: Launchpad -> ProtoPowerSwitch -> CapTouch. The program continuously loops through light dimming with a TRIAC, and when touched, the CapTouch boosterpack turns the light off and on.

 

David
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.

Guest
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...