Results 1 to 8 of 8

Thread: Can PWM be used to drive a galvo amp?

  1. #1
    Join Date
    Aug 2007
    Location
    Indianapolis, IN
    Posts
    196

    Default Can PWM be used to drive a galvo amp?

    I was debating with a friend how to create a simple PIC based DAC for a laser show. He seemed to think that PWM was the way to get variable voltage out of a PIC - this sounded a bit scary to me, what do you think?

    What's the preferred way of getting analog from a PIC - a DAC chip, or is there something simpler?

    Steve

  2. #2

    Default

    PWM could work if it's fast enough. I don't know how fast PIC's go, but get as fast as you can, and don't try to get it in the feedback loop, let the scan driver do the work of following the signal accurately as usual. You might get timing errors with a PIC unless you can buffer the signal and maybe use a separate clock to control the stream. Even so, if the direct-PIC-out average is good you only need to filter (integrate) the output, and the faster the chip, the easier it is to filter the output to get a fast responsive analog signal.

    A DAC could be the extra buffer and clock I mentioned above, in effect, if it's a serial DAC. The actual data sent isn't a PWM signal but the effect is very similar. So if you try direct from PIC and find too much jitter, go with serial DAC.

    EDIT:
    One way to spot jitter is in the (unblanked) ILDA test pattern, watch for the loop out of the inner circle before it reaches the stuff it draws above that circle, that bight will jump erratically if there is jitter in the signal.
    Last edited by The_Doctor; 09-09-2007 at 09:40.

  3. #3
    Join Date
    Dec 2006
    Location
    Pflugerville, TX, USA
    Posts
    1,977

    Default

    Although different than what you are suggesting, check out this to see how this guy made a controller:

    http://elm-chan.org/works/vlp/report_e.html

  4. #4

    Default

    Not that different. He went with the preferred microcontroller and serial DAC. I guess the simple PWM out and integrate trick is worth a go, it's probably cheap to try it, but if you need critical sync of multiple channels it might not be so cool.

    Edit: Actually I think that Atmel is a parallel device, not serial. Also interesting, it's 8 bit yet he's using a 12 bit DAC. I didn't look closer though.
    Last edited by The_Doctor; 09-09-2007 at 10:16.

  5. #5
    Join Date
    Nov 2005
    Location
    Melbourne, Australia
    Posts
    3,677

    Default

    Quote Originally Posted by The_Doctor View Post
    Edit: Actually I think that Atmel is a parallel device, not serial.

    yep, his code bit bangs the serial dac.
    KVANT Australian projector sales
    https://www.facebook.com/kvantaus/

    Lasershowparts- Laser Parts at great prices
    https://www.facebook.com/lasershowparts/

  6. #6
    mixedgas's Avatar
    mixedgas is online now Creaky Old Award Winning Bastard Technologist
    Infinitus Excellentia Ion Laser Dominatus
    Join Date
    May 2007
    Location
    A lab with some dripping water on the floor.
    Posts
    8,897

    Default

    for low frequency effects, fine, you put a low pass filter after the PWM port, that way the galvos see basic waveforms,not the pwm pulses.
    when you want to vary the point rate, your gonna suffer with pwm. Also you need to carefully design the low pass filter, and the code
    so that the PWM rate is like 10-20 times the rate you want to create points at, so for DC and static beam effects its easy, for graphcs, its gonna get tricky.

    if you need a fast dac with a low IO count, try this

    TLV5618A

    serial input, dual outputs, updates both outputs at same time,

    if you want to burn parallel io lines and pic up dacs for red and green levels, do a MAX 506, 4 dacs,8 bits, single supply, and you can use the 5V supply line as the reference voltage.All dacs update at the same time, which is important for avoiding jaggies in your images.

    Steve
    Last edited by mixedgas; 09-10-2007 at 07:59.

  7. #7
    Join Date
    Dec 2006
    Location
    denver,co
    Posts
    1,078

    Default

    I concur with mixed. Just use a dac. In the couple of bucks it will save you you will spend much more time pulling your hair out trying to get things working the way you want them. Dacs are easy to deal with. And mixed gav you a couple of great examples.

    Chad


    When the going gets weird, the weird turn pro.


  8. #8
    Join Date
    Mar 2007
    Location
    Quito
    Posts
    26

    Default

    Quote Originally Posted by shobley View Post
    I was debating with a friend how to create a simple PIC based DAC for a laser show. He seemed to think that PWM was the way to get variable voltage out of a PIC - this sounded a bit scary to me, what do you think?

    What's the preferred way of getting analog from a PIC - a DAC chip, or is there something simpler?

    Steve
    I use Pic microcontroller using pwm to make aerial effects, using small stepper motors, I omited the filter because dc signals, the same galvo motors work like a low-pass filter without dc problems, I make points , squares and other geometrical and aerials effects.
    Attached Thumbnails Attached Thumbnails galvo.JPG  

    picpwm.JPG  


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •