Shop OBEX P1 Docs P2 Docs Learn Events
A Propeller Christmas — Parallax Forums

A Propeller Christmas

kt88seampkt88seamp Posts: 112
edited 2009-09-21 22:53 in Propeller 1
A future project of mine is to build a multichannel programmable dimmer switch whose task is to deliver lighting effects for strands of christmas lights. My idea is to have 6 of the 8 processors in the propeller drive 6 triacs through an optocoupler chip. One processor will act as a zero cross detector. The first processor will coordinate serial programming from a USB to serial module to an eeprom that will store the commands.

This is an ambitious project for my level of microcontroller electronics. I do have some experience with the SX units, but none with the propeller chips.

Some questions:

Does the propeller chip have commands in its spin language to store the contents of variables/arrays in its eeprom (or another eeprom)?

Will switching six triacs introduce noise into the power line?

The USB to serial chip I have in mind is the FTDI FT232RL. I have the ability to solder SMT components. Other than that·is this chip difficult·for a fairly experienced·electronic hobbiest (myself) to work·with?··

Comments

  • DynamoBenDynamoBen Posts: 366
    edited 2009-09-20 03:34
    kt88seamp said...

    Does the propeller chip have commands in its spin language to store the contents of variables/arrays in its eeprom (or another eeprom)?

    There aren't commands per say but there are a number of objects in the exchange that accomplish this task.
    kt88seamp said...

    Will switching six triacs introduce noise into the power line?

    Forward phase dimming does introduce harmonics to the neutral but its not anything you would need to be concerned about. You may want to check out the Prop128 project, a big portion of it is forward phase angle dimming.
    kt88seamp said...

    The USB to serial chip I have in mind is the FTDI FT232RL. I have the ability to solder SMT components. Other than that is this chip difficult for a fairly experienced electronic hobbiest (myself) to work with?

    I guess this depends on your level of experience, I'm using to for a project and its not bad.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2009-09-20 15:04
    kt88seamp said...
    One processor will act as a zero cross detector.
    If you use zero-crossing SSRs or zero-crossing opto-triacs (to trigger the power triacs) then·you obviate (??) any need for a·processor-derived zero-cross scheme.
    Post Edit --·X10 stuff (switchers and dimmers, etc.) is all zero-cross-based, UL-listed, reliable.· I don't know if·anyone has done·a Propeller-X10 object, yet.
    ** LED-based light-strings, which·draw much less current than incandescents, may remain faintly on when "off", owing to thyristor "leakage" (they go to a very-high-resistance but not open circuit.)· So, depending, LED-strings may require an additional·loading (parallel) resistor.

    Post Edited (PJ Allen) : 9/20/2009 3:26:28 PM GMT
  • DynamoBenDynamoBen Posts: 366
    edited 2009-09-20 15:18
    pj allen said...

    If you use zero-crossing SSRs or zero-crossing opto-triacs (to trigger the power triacs) then you obviate any need for a processor-derived zero-cross scheme.

    While an entire cog wouldn't be required for ZC, you would need to dedicate a cog for sensing ZC and then handling dimming. In a dimming system you don't trigger the triacs with the ZC circuit, you trigger them via the microprocessor.
  • Adam WieslerAdam Wiesler Posts: 81
    edited 2009-09-20 16:14
    Last year(and hopefully this year too) I did a Christmas light display using the prop. I have an object that can handle the dimming and the zero-crossing in one cog. I can get it for you if you want. I think that it was pretty easy yo control, you just had to hard code some values that adjust the zero-crossing, and after that you could just say what I/O pin you wanted to control and what the brightness should be. It wouldn't be too hard to get info from a SD card or eeprom and control my object.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My website www.quigleyelectronics.com/
  • Adam WieslerAdam Wiesler Posts: 81
    edited 2009-09-20 16:26
    Also, I used leds last year and I didn't have and problems with them being on/off at the same time.

    About X-10, it is SLOW, it takes about a second to update a module, so if your display is to music, X-10 won't work very well.

    Also, if you use leds, then you can use one of these chips. The are SMALL and don't need any extra components, I used something like them and they have worked well. Also, they can handle .9 amps, plenty enough for even a mini bulb strand.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My website www.quigleyelectronics.com/
  • kt88seampkt88seamp Posts: 112
    edited 2009-09-20 18:59
    Pj Allen said...

    If you use zero-crossing SSRs or zero-crossing opto-triacs (to trigger the power triacs) then you obviate (??) any need for a processor-derived zero-cross scheme.
    If I get a zero crossing opto-triac or SSR to trigger a power triac how with the microcontroller control when the triac will fire? Will you just be able to use straight Pulse width modulation to the zero crossing triac or SSR?
  • JonnyMacJonnyMac Posts: 9,198
    edited 2009-09-20 19:34
    For AC light dimming the triac control signal must be related to the zero crossing. I have what I think is a fairly straightforward explanation in a column I wrote a couple years ago where I created an 8-channel lighting dimmer using the SX28. Yes, I will port the code to the Propeller, it's on my [noparse][[/noparse]long] "to do" list.

    www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol8/col/nv146.pdf
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-09-20 20:22
    [noparse][[/noparse]EDIT - deleted a decidedly wrong suggestion!]

    Jon,
    But I am sure that·X-10 - as Adam says, it's too slow... you won't be able to pump more than TWO X-10 unit codes + function (e.g. 'dim') through that protocol. (I have installed/used many of these devices.)

    Looking forward to seeing what you come up with!

    cheers
    - Howard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (CounterRotatingProps) : 9/21/2009 3:16:27 PM GMT
  • JonnyMacJonnyMac Posts: 9,198
    edited 2009-09-20 20:33
    Well, I've been on an airplane and flown to Paris, and yet that is still the best way for me to get there from Los Angeles. tongue.gif

    If the goal is AC lamp dimming then I see two routes: 1) traditional triac switching based on the zero-cross or, 2) convert the AC to DC and do straight PWM -- no ZC information is needed. I've actually done the latter as well (a project for the Mouse House that they abandoned) but it comes with its own set of problems.
  • BradCBradC Posts: 2,601
    edited 2009-09-20 23:12
    If you are using a zero-cross triac your *only* way to try and attempt dimming is by dropping pulses as it will only turn on and off at the zero cross point. Once you get down to about 50% power the flicker will drive you insane. It's just not a good way of doing it. Not only that, but unless you chop in even intervals (match your half cycles on and off) you will inject some horrific harmonics into your wiring system and possibly upset lots of things connected.

    There is a very simple reason that almost every dimmer in existence is based on phase angle from zero cross.

    To paraphrase an old quote "Those who don't understand dimming are condemned to reinvent it, poorly"

    As Jon suggested, you can also convert to DC and PWM. You can also chop the mains directly using IGBT's (this makes for _NICE_ dimmers!) but switching 240VAC (where I live anyway) fast is not as easy as it might seem. Phase angle is the accepted way of doing this and is the best dimming you are going to get from a TRIAC.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    lt's not particularly silly, is it?
  • kt88seampkt88seamp Posts: 112
    edited 2009-09-21 02:29
    I have not yet ordered or learned about the propeller chip yet so I want to practice with the SX. For starters I am working on a simple program that will hold an AC lamp at 50 percent brightness. Will this code work? I am asking this because i do not have any triacs right now to test it with.



    
    plp_a = 0
    tris_a = %0001 'Triac is on pin RA.1, Zero cross detector is on RA.0.
    
    
    DO
    
              DO UNTIL RA.0 = 1 Wait until zero cross fires.
              LOOP
              RA.0 = 0 'Turn triac pin off.
     
              PAUSEUS 4000 'somewhere between 0us and 8333us, receive as a WORD. 
    
              RA.1 = 1 'Fire Triac   
    
    LOOP
     
    
    
  • JonnyMacJonnyMac Posts: 9,198
    edited 2009-09-21 04:14
    If you're going to practice with the SX you can save yourself some trouble and start with the code I wrote for my article. And you really should post this in the SX thread until you're ready to work with the Propeller.
  • CounterRotatingPropsCounterRotatingProps Posts: 1,132
    edited 2009-09-21 15:12
    BradC said...


    ... as it will only turn on and off at the zero cross point. Once you get down to about 50% power the flicker will drive you insane.
    AARRRGGG !!!·· That's what I get for not bench testing this *before* posting.

    Brad is right - my suggestion was nuts.·It won't switch *except* at the crossing point.
    Thanks for correcting this, Brad.

    > To paraphrase an old quote "Those who don't understand dimming are condemned to reinvent it, poorly"
    Kind of embarrassing actually, as I used to design and test stage lighting equipment redface.gif· ... well, 20 yrs ago ... so I'll claim a senior moment [noparse]:)[/noparse]

    [noparse][[/noparse]going to delete my previous post --- sorry about the confusion!]

    - Howard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • kt88seampkt88seamp Posts: 112
    edited 2009-09-21 22:53
    Soon I will probabably pick up a prop kit and learn spin. The SX is history so I will probably avoid it in my future designs.
Sign In or Register to comment.