Shop OBEX P1 Docs P2 Docs Learn Events
Halloween Project Problems! — Parallax Forums

Halloween Project Problems!

MacgruberMacgruber Posts: 20
edited 2009-11-04 21:20 in General Discussion
Hi Everyone!

So I'm hoping someone can clue me in to what I am doing wrong here... Basically, I am use an SX to run a home brewed halloween electric chair project. I am trying to keep things simple so I have the SX mounted into the SX tech board (so I don't have to add my own PS electronics etc.) which then has leads that attach to the "meat" of the project which is mounted to a solderless breadboard (again for ease). All I am trying to do is run an output from the SX to a basic PNP transistor which is used to switch a radioshack 1A 5VDC relay and switches 120AC to a solenoid. Before anyone asks, yes I have a 1N4007 diode worked in to protect from the back EMF generated from the relay switching.

I wrote a simple program to cycle the relay on and off and I can see that I am generating the 120VAC on and off as expected. The problems begin once I actually attach the solenoid to the power leads (i.e. add the load). Once I do this, the program cycles one time and then it seems like the SX just stops functioning and I have to reset. Since I only run one AC line into my control box and then split the power to the solenoid and the AC adapter of the SX board I am wondering if the EMF generated by the solenoid is causing some kind of problem to my SX power supply?

Any thoughts? Below is the program code (this isn't the whole halloween project... just what I am using for testing):

Start:
  isRampUp = 1

Main:

  DO
    ' Check the ramping direction
    IF isRampUp = 0 THEN
    'HIGH SPEAKER
        HIGH EYELED1
        HIGH EYELED2
        LOW HEARTLED1
        LOW HEARTLED2
        'HIGH STROBE
        'HIGH ELWIRE
        'HIGH ELSOL
        HIGH CHAIRSOL
    ELSE
    'LOW SPEAKER
        LOW EYELED1
        LOW EYELED2
        HIGH HEARTLED1
        HIGH HEARTLED2
        'LOW STROBE
        'LOW ELWIRE
        'LOW ELSOL
        LOW CHAIRSOL
    ENDIF

    ' Wait before repeating
    WAIT_MS 5000
    TOGGLE isRampUp

  LOOP

Comments

  • stamptrolstamptrol Posts: 1,731
    edited 2009-10-16 18:20
    Not too much question the solenoid is contributing to the problem.

    You don't say how big the solenoid is, but they are big draws during the initial application of power. Probably to the point of overloading the 1A relay contacts. Also, if the iron core is partially out of the solenoid , the solenoid's current draw will be exceptionally high.

    Assuming the solenoid's steady state current is 0.5 amp or lower, maybe all you'll need is a "snubber" either across the coil or across the relay contacts. The snubber will be a resistor and capacitor in series or a another device made for the job.

    If you can really separate the 120vac used for the solenoid from the power supply used by the SX, you might improve things but my guess is the solenoid current is causing lots of arcing in the relay contacts.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • MacgruberMacgruber Posts: 20
    edited 2009-10-16 18:33
    Definitely the solenoid... I was wondering if it might be a current draw issue that I could counteract with a 10A 5VDC relay (which I just happened to have) so I wired that in and got the same result. I'll look into the snubber but if you can direct me more on the selection of snubber components that would be great! Not much experience there!
  • stamptrolstamptrol Posts: 1,731
    edited 2009-10-16 19:12
    ·· I've attached a section of a Toshiba logic controller manual. The manual is available from Toshiba International with a free registration.

    ·· Their manuals contain lots of useful information and have helped me over the years.

    ·· This shows how to apply a snubber for an AC load.

    ·· In your case, the "triac output" is actually your relay contacts. The formula will give you a workable system.

    ·· Cheers,



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
  • MacgruberMacgruber Posts: 20
    edited 2009-10-16 19:13
    Hi Guys... After looking into it a little more, I was wondering if I can just wire an MOV from Radio Shack in parallel with the solenoid? They don't seem to offer any current ratings online for the MOV but it looks like it might help?!? If anyone can add more information on component selection for an RC snubber I would find that very interesting. All I know about my solenoid (from McMaster Carr) is that it runs at 120AC and uses about 0.5A of power. Measured coil resistance at 8 ohms.
  • MacgruberMacgruber Posts: 20
    edited 2009-10-16 20:15
    Tried an MOV and while it helped (was able to get a few cycles of switching) it inevitably still puttered out... So if I follow the snubber pdf, I should just get a non-polarized 1uF cap rated at something like 250VAC along with a ~100ohm resistor and connect them in series across the solenoid terminals. Correct? (Went with 1uF since the load might be 1A and R is just between 0.5 to 1.0 * the power... Do I need to consider resistor wattage?)

    
         +---------- 120AC
         |            |
         |          100 ohm
    Solenoid          |
         |          1 uF
         |            |
         ------------ Ground
    
    
  • kwinnkwinn Posts: 8,697
    edited 2009-10-16 20:32
    The first thing I would do is to power the 120VAC solenoid from a different circuit than the SX, or try powering the SX from a battery. If that solves the problem then you know it is due to the 120VAC dropping when the solenoid draws current. A 10A draw will cause quite a drop over a long or fine gauge extension cord.
  • MacgruberMacgruber Posts: 20
    edited 2009-10-16 20:36
    I am powering the SX from a different source right now and still encountered the problems I described when using the MOV (i.e. it performs the first few iterations of switching fine and eventually locks up). I think the RC snubber is my last hope so the more info I can get on component selection for a snubber the better. Thank you for the suggestion.
  • stamptrolstamptrol Posts: 1,731
    edited 2009-10-17 15:01
    The 100 ohms is a bit lower than recommended, but careful testing will confirm whether it will overheat. Turn on for a few seconds, turn off and check resistor and cap for high temp.


    The MOV probably had a rating a bit higher than the recommended value. Also, the MOV trigger point can vary quite a bit. The suggested value is about 203 volts based on the peak value of the 120VAC sinewave.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tom Sisk

    http://www.siskconsult.com
    ·
  • MacgruberMacgruber Posts: 20
    edited 2009-11-04 21:20
    Hi Guys,

    So I finished the project... Even with the snubber I had some problems with the whole thing locking up. Maybe next year I'll have to do a better job isolating the power supplies (maybe wiring with earth ground will help?).

    Anyway, here are some links to the video. (Note that I sourced a powerful solenoid which ended up breaking so the one in the video just ended up being of meager power so the whole thing didn't move much.)

    www.veoh.com/browse/videos/category/horror/watch/v193211775mMrdsXB
    750 x 1000 - 1M
Sign In or Register to comment.