Results 1 to 10 of 10

Thread: Controlling galvo with teensy esp32

  1. #1
    Join Date
    Mar 2012
    Posts
    19

    Default Controlling galvo with teensy esp32

    *** Please note i'm new to working with electronics so apologies for the stupid questions, i've done lots of googling and am quite stuck ***
    +
    I'm in the process of building my own dac to control a laser I've projector I've built. The projector works well and I can control it with ilda and existing DACs. Now I'm trying to build my own DAC with a teensy esp32. This has 2 DAC pins which I hope to use for the X and Y galvos.

    I'm confused now about how I can proceed as the teensy DAC pins are each 3.3v and I need a + and - signal for both the X and Y galvo.

    So what I have is 3.3v X and 3.3v Y and I need a -X,+X, -Y, +Y.
    The teensy has a 5v output pin, plus on my laser I have a -15v and +15v power source that is driving the galvos.

    From my research I believe I should be using an op amp to amplify and then offset the voltage. Then I need to split this into + and - for both x and y? But I'm finding this really difficult to understand with my limited knowledge.

    I forgot to mention, i've been trying to follow this instructable: https://www.instructables.com/DIY-ST...VO-CONTROLLER/

    But the schematic is quite complex for me to follow so I'm having trouble converting that to an actual circuit.

    Does anyone have any advice to point me in the right direction.
    thanks!
    Last edited by donkeykong; 10-15-2020 at 19:38.

  2. #2
    Join Date
    Oct 2020
    Posts
    1

    Default

    ** edit ignore this**
    Last edited by rickyrickyricky; 10-15-2020 at 19:38.

  3. #3
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,164

    Default

    Quote Originally Posted by donkeykong View Post
    *** Please note i'm new to working with electronics so apologies for the stupid questions, i've done lots of googling and am quite stuck ***
    +
    I'm in the process of building my own dac to control a laser I've projector I've built. The projector works well and I can control it with ilda and existing DACs. Now I'm trying to build my own DAC with a teensy esp32. This has 2 DAC pins which I hope to use for the X and Y galvos.

    I'm confused now about how I can proceed as the teensy DAC pins are each 3.3v and I need a + and - signal for both the X and Y galvo.

    So what I have is 3.3v X and 3.3v Y and I need a -X,+X, -Y, +Y.
    The teensy has a 5v output pin, plus on my laser I have a -15v and +15v power source that is driving the galvos.

    From my research I believe I should be using an op amp to amplify and then offset the voltage. Then I need to split this into + and - for both x and y? But I'm finding this really difficult to understand with my limited knowledge.

    I forgot to mention, i've been trying to follow this instructable: https://www.instructables.com/DIY-ST...VO-CONTROLLER/

    But the schematic is quite complex for me to follow so I'm having trouble converting that to an actual circuit.

    Does anyone have any advice to point me in the right direction.
    thanks!
    You need to convert the output to +-5V differential (or +-10V really). Yes, you can use op amps but there may be some OTS differential driver out there. Look for the circuit for the LaserBoy audio DAC correction kit. It is basically the same as what you want. Ask James Lehman on here. The LaserBoy kit doesn't create the correct differential signals but it will still work to some extent.

  4. #4
    Join Date
    Oct 2012
    Location
    Germany
    Posts
    1,224

    Default

    ... look into some OpAmps samples/tutorials - it's a pretty common application to "map" a voltage range into another ... so from 0 - 3.3V to -10V - +10V could be done with a single OpAmp, supported with the -15V and +15V voltages ...

    Viktor
    Aufruf zum Projekt "Müll-freie Meere" - https://reprap.org/forum/list.php?426
    Call for the project "garbage-free seas" - https://reprap.org/forum/list.php?425

  5. #5
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,484

    Default

    Quote Originally Posted by JohnYayas View Post
    Ask James Lehman on here. The LaserBoy kit doesn't create the correct differential signals but it will still work to some extent.
    Gee thanks Gary! That's a rave review.


    The simplest way to do it is with one op amp per channel. You setup the amp as an inverter so you can control the gain from 0 to about 10x. You use a variable negative voltage regulator to set an offset null voltage that gets summed with the DAC signal at the input of the op amp. This design is not differential. It is single ended. So the output of the op amp drives one of the inputs to your scanner amp + or - and you ground the one you're not driving. This works just fine because your scanner amps are just looking for the difference in voltage between the + and - inputs. It doesn't matter if all of the signal is on one side.

    I have a very nice kit of a 6 channel correction amp.
    http://laserboy.org/forum/index.php?topic=561.0

    Seems like you only have two DAC outputs, so you can only drive X and Y with no signals to control the laser modulation inputs.

    If you want a full color solution, why not use a Raspberry Pi 4 with an external USB sound card DAC? With this you can run LaserBoy and make all the waves you want of your own show material. This is also a full 16-bit DAC so it is compatible with the full resolution of ILDA files. You can also use this DAC with any other computer + operating system.
    Last edited by james; 10-16-2020 at 05:43.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    Either do or do not do. There is no undo!

  6. #6
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,164

    Default

    Quote Originally Posted by james View Post
    Gee thanks Gary! That's a rave review.


    The simplest way to do it is with one op amp per channel. You setup the amp as an inverter so you can control the gain from 0 to about 10x. You use a variable negative voltage regulator to set an offset null voltage that gets summed with the DAC signal at the input of the op amp. This design is not differential. It is single ended. So the output of the op amp drives one of the inputs to your scanner amp + or - and you ground the one you're not driving. This works just fine because your scanner amps are just looking for the difference in voltage between the + and - inputs. It doesn't matter if all of the signal is on one side.
    It actually does matter because the scanner amps typically expect a delta swing from -10V to +10V across the + and - pins of the DAC. If the singled ended DAC is only producing +-5V and those are only applied on the + or - pin you will only get have of the max image you expect.

  7. #7
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,484

    Default

    Quote Originally Posted by JohnYayas View Post
    It actually does matter because the scanner amps typically expect a delta swing from -10V to +10V across the + and - pins of the DAC. If the singled ended DAC is only producing +-5V and those are only applied on the + or - pin you will only get have of the max image you expect.
    Yep. And with a differential power supply that exceeds the +-10V requirement, you can set the gain of a single op amp to achieve that same swing with a single ended approach. The only thing differential input to the scanners does for you is reduce noise picked up by very long signal cables. This is why mic cables are typically differential, but home stereo equipment is not.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    Either do or do not do. There is no undo!

  8. #8
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    2,164

    Default

    Quote Originally Posted by james View Post
    Yep. And with a differential power supply that exceeds the +-10V requirement, you can set the gain of a single op amp to achieve that same swing with a single ended approach. The only thing differential input to the scanners does for you is reduce noise picked up by very long signal cables. This is why mic cables are typically differential, but home stereo equipment is not.
    Yes, I agree. As long as the op-amps can be adjusted to +-10V it shouldn't really matter. I think with the sound card dac kit I had I could only adjust to around 7 or 8 peak to peak for some reason. I can't really remember. I ran over it with my chair accidentally many years ago.

  9. #9
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    1,484

    Default

    Quote Originally Posted by JohnYayas View Post
    Yes, I agree. As long as the op-amps can be adjusted to +-10V it shouldn't really matter. I think with the sound card dac kit I had I could only adjust to around 7 or 8 peak to peak for some reason. I can't really remember. I ran over it with my chair accidentally many years ago.
    My kit comes with a DC/DC converter that takes +5VDC from USB and turns that into +9V, -9V to power the op amps. I went with that because of the total current draw from the USB should not exceed 300mA. I could have used a +12V, -12V converter but it draws more current. You will find that +8V to -8V is just fine. It's rare that you would want to drive your scanners to their absolute limits and if you do, you can adjust the sensitivity pot on the scanner amp to do so.
    Last edited by james; 10-16-2020 at 08:15.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    Either do or do not do. There is no undo!

  10. #10
    mixedgas's Avatar
    mixedgas is offline 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
    9,370

    Default

    For starting, most galvo sets will work just fine with a -2.5 to +2.5 volt input if the negative lead of the galvo axis differential input is grounded. So if you have a 5 volt DAC on your chip, all you need is a minus 2.5 volt offset. This is easy with a summing op-amp circuit. You'll get 1/4th of the deflection angle range you would with the full differential signal, but it will work fine for test. The Diff signal is used for noise rejection over long cables in bad electrical environments, which is most if not all the places laser shows are done.



    Once you figure out your DAC's signal level, your analog power supplies , and needed summing op-amp gain or offset, the ILDA standard differential transmitter circuit is in on page 15 in this PDF:

    https://photonlexicon.com/forums/att...8&d=1390537157

    Steve
    Last edited by mixedgas; 10-16-2020 at 10:23.
    Qui habet Christos, habet Vitam!
    I should have rented the space under my name for advertising.
    When I still could have...

Posting Permissions

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