Shop OBEX P1 Docs P2 Docs Learn Events
Controlling BuckPuck Driver — Parallax Forums

Controlling BuckPuck Driver

ddmnkfddmnkf Posts: 5
edited 2008-09-18 21:25 in General Discussion
Hi, I am a newbie and I may have totally gone off track, sorry if I ask some stupid questions that are obvious.

With that said, I am trying to control a Buckpuck Driver (http://www.leddynamics.com/LuxDrive/datasheets/3021-BuckPuck.pdf), I want to build a simple circuit to slowly dim the LEDs through the buckpuck driver.· According to the spec sheet, you can supply·a voltage of 0-5V to the control port which·will act·like a dimmer to the LED.· Which is perfect using the PWM function·in SX/B.· I finished with the program, check the output port using a simple multimeter, and it's running as I wanted, 5-0V in 1 minute slowing ramping down.· But when I plug the output to the control port on the Buckpuck Driver, the·voltage start to go erratically and·jumps around.· I cannot get a stable voltage out from SX28 to control the Buckpuck.

So my question is, do I need an op-amp·buffer circuit between the output of SX28 and control port of the Buckpuck Driver?· All I have between it right now is a simple RC circuit, and I am trying to get away with the least possible components (space issue).· I can't find the spec of how much current the control port is drawing but I assume is not big enough that I need a buffer circuit, since according to the spec sheet, it can take TTL/CMOS signal, but obviously it's not working right now.· Am I totally off track?· Please advise, thanks.

Comments

  • LawsonLawson Posts: 870
    edited 2008-09-16 21:46
    ddmnkf said...
    I finished with the program, check the output port using a simple multimeter, and it's running as I wanted, 5-0V in 1 minute slowing ramping down. But when I plug the output to the control port on the Buckpuck Driver, the voltage start to go erratically and jumps around. I cannot get a stable voltage out from SX28 to control the Buckpuck.

    Are the BuckPuck and SX running off of the same battery/psu? Just for testing try using separate power supplies. The BuckPuck has a switching power supply inside and switching power supplies can produce a LOT of noise. Using separate power supplies keeps this noise out of the SX. If this fixes the problem extra filtering on the SX's power supply input is needed to keep the SX happy. (noise can sneak in on the ground wires too) You could also try a stiffer RC circuit. 1k/10uF would be good.

    Marty

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Lunch cures all problems! have you had lunch?
  • ddmnkfddmnkf Posts: 5
    edited 2008-09-16 22:10
    At first I am running the SX off the ref port(5v) of buckpuck, and the buckpuck off an AC/DC supply. The SX wasn't too happy at all, so right now I am using 2 different power supplies, 24V to buckpuck, and a 5.2V (all I can find around my house) to the SX. And I forgot to mention, the RC circuit I am using is 2.2k/10uF combo(that I can find around my house also), and the code I use is basically similar to:
    PWM pin, duty, 110
    for which "duty" is from 240 to 0, -4 each time. Oh and the above line of code only get excuted every second which I have an external timer circuit that keep tracks of.

    So maybe is it because I burst too short of voltage out each second?
  • VelocitVelocit Posts: 119
    edited 2008-09-16 22:49
    Unless I read something wrong, it looks like the BuckPuck pulls 20mA from the control port given the spec sheet to which you linked. By my calculations you should need to "refresh" the RC network every 0.0025 seconds in order to maintain a particular voltage. If you can do that, you shouldn't need the op-amp buffer. I would put the PWM command in an interrupt that runs 400 times a second and change the duty cycle as needed.

    I also think you can easily run the SX off the BuckPuck's Vref port, but you'll definitely want a decoupling capacitor across Vcc and ground to smooth things out.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Paul
  • ddmnkfddmnkf Posts: 5
    edited 2008-09-16 23:08
    Yes, that's what I was thinking, but it means I have to move the code around since the program was not originally design for controlling the buckpuck.

    And yes I can use the Vref port from buckpuck, but it gave me problem because it's going to power not only the SX chip, but also another circuit plus a LCD screen. I end up scraping the idea and headache trying to cramp everything using that ref port.

    Thanks for all that replied, I will try playing around with it more, but if anyone got anymore ideas or experience, feel free to chime in. thanks.
  • StarManStarMan Posts: 306
    edited 2008-09-17 15:52
    When powering from different power supplies, are you tying the grounds together?· The control pin of the buckpuck needs to have the same 0V reference as the SX output pin.

    Chris I.
  • ddmnkfddmnkf Posts: 5
    edited 2008-09-17 19:07
    Yes I did ground them together. I went home yesterday and found the problems immediately, which taught me one thing - don't struggle with little things when you are sleepy and tired. [noparse]:)[/noparse] I found that I am using too big of a resistor and too small of a capacitor, the control port discharged the capacitor faster then I can supply it. So I put in a 10ohm/100uF combo and everything works fine now. Althought I still got another problem, maybe because I wasn't using an interrupt for the PWM, whenever the LCD screen updates(per sec), the LEDs blinks along. But when I took out all the code for LCD, it dims smoothly. So I still need move the code around, clean it up a bit and add an interrupt for PWM. hopefully it will solve the blinking, thanks all again.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-18 17:12
    ddmnkf -

    You are using buckpucks in your project? What are you building? What LED are you driving?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • ddmnkfddmnkf Posts: 5
    edited 2008-09-18 21:25
    yes I choose the buckpuck at first because I was trying to make a little light fixture with it, it's simple and small package, basically just plug and play. But same as other things that I do, a small thing eventually turned into something complex and into something impossible and headache. If I were thinking to control it in the first place, I would just used something similar to LM3401/LM3404 of some sort, save me some money... oh and I am driving 15 Cree XR-E with 2 buckpucks.
Sign In or Register to comment.