Hard Drive motor laser galvo

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024
  • Me and Fredd spent a couple of boozy nights trying to make a useable laser galvo out of an old hard disk drive and a 50mW green laser pointer.
    I didn't really intend this to be a proper video but I think I ended up with enough mobile phone footage to make it useful to anybody who is experimenting with this kind of stuff.
    If you just want to see some laser beams then skip to ten minutes into the video and you'll see how things ended up.
    THE CODE IS IN A COUPLE OF THE COMMENTS.
    RUclips doesn't let you post code in the video description. Scroll down and all will be revealed! :)
    In summary:
    We drove the coil of an old hard disk drive head motor with a differential current supplied by a UCC27425D which in turn was driven directly from the output pin of an Arduino.
    We ran the coil supply at 12 volts, with 11 ohms of current limiting resistance on the power input.
    The arm of the motor was pulled in one direction by an elastic band under enough tension to hold the arm away from the endstop when the drive circuit was running.
    We cut a small piece of the old hard drive platter, which was very polished and highly reflective, then stuck it with hot glue to the middle of the hard drive motor. It was slightly off-centre, so not ideal, but it worked well enough for us.We then cable tied the laser pointer to a bit of Veroboard and screwed that to a bit of wood so it pointed straight at the middle of the mirror
    By sending a PWM signal from the Arduino at 10% duty cycle at various audio frequencies we could move the arm to any position we wanted fairly reliably. The current required to drive the motor, as well as the duty cycle of the PWM frequency will have to be tuned to the mechanical and electrical characteristics of the particular hard drive you are using.
    Feel free to ask any questions - Though I warn you, we are making it up as we go along too! ;)

Комментарии • 61

  • @edgeeffect
    @edgeeffect 6 лет назад +11

    Even not considering you'd made it yourself out of a knackered old hard drive.... it's ace!
    No way would I have been able to stay in bed if my dad had been up to something that brilliant down in the kitchen!

    • @spungletrumpet
      @spungletrumpet  6 лет назад +1

      I think she's so used to this kind of stuff going on all the time that she's immune to it! :)

  • @tttuberc
    @tttuberc Год назад +2

    Looks like a fun project to work in the weekend. Thanks for sharing

  • @maximusironthumper
    @maximusironthumper 6 лет назад +11

    Ok, I might have to revise my opinion on lasers a bit! Looking forward to the harp...

    • @spungletrumpet
      @spungletrumpet  6 лет назад +1

      There's some proper galvos on the way and a very good pal of mine has been investing in some 6 watt RGB lasers.
      The harp is going to be epic! :)

  • @spungletrumpet
    @spungletrumpet  6 лет назад +10

    Here's the code that was running at the end of the video, for those who are into that sort of thing.
    ***************************************************************************************
    #include "TimerOne.h"
    #define GALVO 9
    #define LASER 2
    void setup()
    {
    Timer1.initialize(4545); // initialize timer1, and set a 220Hz
    Timer1.pwm(GALVO, 128); // setup pwm on pin 9, 10% duty cycle
    pinMode(LASER,OUTPUT);
    digitalWrite(LASER,HIGH);
    }
    void loop()
    {
    //wide();
    //wide();
    //small();
    //small();
    //slow();
    //slowchop();
    //wideslow();
    for (int j=0; j

  • @PaulHindt
    @PaulHindt Год назад

    That Ghostbusters theme actually slaps. Sounds grimy AF.

  • @woodswomansoul
    @woodswomansoul 6 лет назад +2

    No idea wtf was going on there, but..wow, brilliant! Making me want to study electronics next....

    • @spungletrumpet
      @spungletrumpet  6 лет назад +1

      The electronics here are very simple really. It's the mechanical bodging and software that took the time!
      I'll bring to to Max's so you can have a play!

  • @timothyhallmon1887
    @timothyhallmon1887 3 года назад

    I hooked up a Sony am fm radio to my hard drive haven't placed my laser yet. You have a good idea.

  • @MOOSEDOWNUNDER
    @MOOSEDOWNUNDER 3 года назад

    Wow. That was epic. Nice work boys.

  • @jeffreyosborne6747
    @jeffreyosborne6747 Год назад

    Hilarious. Made my day watching this. Just making something up for the fun of it.

  • @nickcarriere2765
    @nickcarriere2765 6 лет назад +2

    These motors are just a single loop which pulls itself into a field or pushes itself out, aren't they? So the force is proportional to the current (or the average current with pwm). So I guess you ended up varying the pwm duty cycle and kept the freq the same. And you could do away with the elastic band by modelling the ballistics of the moving bit, then working on acceleration and velocity. Reversing the force to make it accelerate the other way? How does it track position drift? I guess it gets feedback by detecting the tracks on the platter.

    • @spungletrumpet
      @spungletrumpet  6 лет назад +2

      It should work exactly as you described but it doesn't seem to work quite that way in practice.
      The head motor is indexed by a track on the platters but we couldn't do it that way. We tried doing it without the elastic band and using variable duty cycle but it was impossible to track the drift at all, or even get repeatable results.
      In the end I ran the Tesla coil code on it and found that the most reliable results were by using a fixed duty cycle and varying the frequency. Playing music through it seemed to be the most stable option.
      I think what is happening is that the duty cycle is biasing the arm against the force of the elastic band. Changing the frequency works against that force but it doesn't seem to be a very linear response. It's okay for doing basic beam shows but it's not particularly quick or accurate and it's very noisy!

  • @SoulboxStudios
    @SoulboxStudios 5 лет назад +6

    First of all, congratulations, of all the projects with low cost of recycled laser, yours is the best by far, what software do you use to send PWM to arduino? I would like to replicate your project but with X and Y axes
    Best regards and congratulations again!

    • @edgeeffect
      @edgeeffect 4 года назад +1

      I've been watching Curious Marc experimenting with "proper" galvos, and he seems to be simply shooting the X mirror into the Y galvo.

    • @inventorkid13
      @inventorkid13 2 года назад +1

      The Arduino puts out PWM on it's own - pins 9, 10, and 11 can be tuned for the frequency at which PWM operates using code to adjust the clocks.
      TCCR1B = TCCR1B & 0b11111000 | 0x01; // set PWM frequency @ 31250 Hz for Pins 9 and 10, (0x03 is default value, gives 490 Hz).
      TCCR2B = TCCR2B & 0b11111000 | 0x01; // set PWM frequency @ 31250 Hz for Pins 11 and 3, (0x03 is default value, gives 490 Hz).

  • @nielsdaemen
    @nielsdaemen 9 месяцев назад +1

    You need feedback. The harddrive controller uses the sectors on the harddrive itself to know the position and speed of the head extremely precisely

    • @spungletrumpet
      @spungletrumpet  9 месяцев назад +1

      I think you might be missing the point slightly.
      I already have proper laser galvos with feedback.
      This was just a bit of fun.

  • @lumotroph
    @lumotroph Год назад

    Super cool!

  • @saturn1returns
    @saturn1returns 2 года назад

    Well done 👍

  • @silverroxx1021
    @silverroxx1021 4 года назад

    very nice! working on same thing myself. much work in this area need to be done. working on an x-y system to draw animation.

  • @ashdjin8530
    @ashdjin8530 6 лет назад

    all I can say is : awesome!!

  • @Buz4x4
    @Buz4x4 6 лет назад +1

    Wow ! :D
    I was searching for something like this for some time...
    You've manage to get it quite good !
    Would you mind sharing your work, the code... I saw you would post it but you did'nt.
    Don't worry I tink I'm not the only one interested !! :D
    Great work guys ! Thank you !

    • @spungletrumpet
      @spungletrumpet  6 лет назад +5

      I posted it in one of the comments. RUclips doesn't allow you to use angled brackets in video descriptions, so posting it there would have been confusing for many people.
      Here it is again though:
      Here's the code that was running at the end of the video, for those who are into that sort of thing.
      *************************************************************************************
      #include "TimerOne.h"
      #define GALVO 9
      #define LASER 2
      void setup()
      {
      Timer1.initialize(4545); // initialize timer1, and set a 220Hz
      Timer1.pwm(GALVO, 128); // setup pwm on pin 9, 10% duty cycle
      pinMode(LASER,OUTPUT);
      digitalWrite(LASER,HIGH);
      }
      void loop()
      {
      //wide();
      //wide();
      //small();
      //small();
      //slow();
      //slowchop();
      //wideslow();
      for (int j=0; j

    • @Buz4x4
      @Buz4x4 6 лет назад +1

      Wow ! Thank you very much !!!
      I looked in every other comments and I didn't saw it...
      Awesome ! Thank you !!! :D

    • @spungletrumpet
      @spungletrumpet  6 лет назад +1

      No problem!
      Let me know how you get on! :)

  • @BlackBirdOverflow
    @BlackBirdOverflow 3 года назад

    is the coffee part of the circuit?

  • @Jormunguandr
    @Jormunguandr 5 лет назад +1

    Pretty neat :)

  • @Grimes_68
    @Grimes_68 4 года назад +2

    Can't we plug the voice coil to an amplifier and play some real music?

  • @joelsoncdma
    @joelsoncdma 3 месяца назад

    I tried this with red laser...the sine wave stay is my eyes to five week...use speaker to move mirror

  • @efremkos
    @efremkos 10 месяцев назад

    Красота.

  • @KJ7JHN
    @KJ7JHN 5 лет назад

    Instead of the elastic bands, perhaps you could try apposing magnetic fields, tiny magnets.

    • @KJ7JHN
      @KJ7JHN 5 лет назад

      Totally needed tetris theme. Russian anthem.

    • @freundderuc9146
      @freundderuc9146 3 года назад +2

      no definitely not. Elastic band is linear resistance rising with elongation (spring law F = l * c ). Magnets are spot based and have spheroidical field lines between poles. Compare it to balance two speheres stacked vertically.

  • @loayloay7096
    @loayloay7096 4 года назад

    Hello Professor, I love this device very very much, how much is its price, how is it delivered to Iraq, and is this device a rainy one?

  • @leolhermitte7183
    @leolhermitte7183 5 лет назад

    Hi, really great work !! I'm also working on a similar project using galvanomotors. I'm very interested by your code but i'm not able to find it out from the comments. Where can I get it ?

  • @madhatter2k
    @madhatter2k 4 года назад

    Is that a Bristol accent? Love your work!

  • @Nicholas.K.
    @Nicholas.K. 5 лет назад +1

    Как тебе такое Жан Мишель Жарр?

  • @marbellayessy9162
    @marbellayessy9162 2 года назад

    Hola doy Mexicano me interesaría por este proyecto me podrán apoyar con los diagramas electrónicos gracias

  • @henrybutler6137
    @henrybutler6137 4 года назад

    Think the code isn't in the comments anymore, can you github them?

  • @mendebil
    @mendebil 5 лет назад +3

    12:03 Girlfriend ignore level over 9000

    • @spungletrumpet
      @spungletrumpet  5 лет назад +3

      Was the 10 year old daughter in a skype call with her friend (on headphones).
      She'd got bored of lasers by that point! :)

  • @edgeeffect
    @edgeeffect 5 лет назад +1

    I know we all love the Soviet National Anthem an' all... but could you put an RC filter on it to hush it a bit???

    • @12EC3C0F
      @12EC3C0F 4 года назад

      это Российский гимн

    • @edgeeffect
      @edgeeffect 4 года назад

      @@12EC3C0F isvenitya.

  • @kinowalktv
    @kinowalktv 5 лет назад

    This is like!

    • @kinowalktv
      @kinowalktv 5 лет назад

      гимн СССР приятно удивил =)

  • @ДмитрийТ-к6ч9ш
    @ДмитрийТ-к6ч9ш 6 лет назад

    You need defenitely not arduino to drawing some with it.

  • @ex2005
    @ex2005 2 года назад

    where is the code?

    • @spungletrumpet
      @spungletrumpet  2 года назад

      On the arduino.
      But, for the benefit of the people who saw this on RUclips years ago, Also posted in the comments below!
      #include "TimerOne.h"
      #define GALVO 9
      #define LASER 2
      void setup()
      {
      Timer1.initialize(4545); // initialize timer1, and set a 220Hz
      Timer1.pwm(GALVO, 128); // setup pwm on pin 9, 10% duty cycle

      pinMode(LASER,OUTPUT);
      digitalWrite(LASER,HIGH);

      }
      void loop()
      {
      //wide();
      //wide();
      //small();
      //small();
      //slow();
      //slowchop();
      //wideslow();

      for (int j=0; j

  • @louis-fh9qt
    @louis-fh9qt 6 лет назад

    Where can i get the code?

    • @spungletrumpet
      @spungletrumpet  6 лет назад

      louis 12350 - I've included it in one of the comments here. Let me know if you find it OK, otherwise I'll repost it when I'm home at the weekend.

    • @rebane2001
      @rebane2001 6 лет назад

      Awesome project, really inspires me to do some electronics stuff again
      I couldn't find the code in the comments though

  • @synapticaxon9303
    @synapticaxon9303 4 года назад +4

    Are you wearing a dress and tights?

    • @edgeeffect
      @edgeeffect 4 года назад +2

      Speaking as a trans-sister meself.... the electronics hobby seems to be rife with that kind of thing.

    • @spungletrumpet
      @spungletrumpet  3 года назад +3

      It'll be Fredd in the dress and tights.
      He writes the code!

  • @rebane2001
    @rebane2001 6 лет назад

    What is the UTC42725? I googled it but got nothing :/

    • @spungletrumpet
      @spungletrumpet  6 лет назад +1

      I'm so sorry, it was a late night typo!
      The chip I was using was a UCC27425D. It's a dual 4A MOSFET driver.
      I have edited the text accordingly. Thanks for highlighting my mistake!

  • @vasyalapuh2878
    @vasyalapuh2878 2 года назад

    Славься Отечество!