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! ;)
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!
I think she's so used to this kind of stuff going on all the time that she's immune to it! :)
Looks like a fun project to work in the weekend. Thanks for sharing
Ok, I might have to revise my opinion on lasers a bit! Looking forward to the harp...
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! :)
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
That Ghostbusters theme actually slaps. Sounds grimy AF.
No idea wtf was going on there, but..wow, brilliant! Making me want to study electronics next....
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!
I hooked up a Sony am fm radio to my hard drive haven't placed my laser yet. You have a good idea.
Wow. That was epic. Nice work boys.
Hilarious. Made my day watching this. Just making something up for the fun of it.
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.
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!
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!
I've been watching Curious Marc experimenting with "proper" galvos, and he seems to be simply shooting the X mirror into the Y galvo.
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).
You need feedback. The harddrive controller uses the sectors on the harddrive itself to know the position and speed of the head extremely precisely
I think you might be missing the point slightly.
I already have proper laser galvos with feedback.
This was just a bit of fun.
Super cool!
Well done 👍
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.
all I can say is : awesome!!
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 !
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
Wow ! Thank you very much !!!
I looked in every other comments and I didn't saw it...
Awesome ! Thank you !!! :D
No problem!
Let me know how you get on! :)
is the coffee part of the circuit?
Pretty neat :)
Can't we plug the voice coil to an amplifier and play some real music?
I tried this with red laser...the sine wave stay is my eyes to five week...use speaker to move mirror
Красота.
Instead of the elastic bands, perhaps you could try apposing magnetic fields, tiny magnets.
Totally needed tetris theme. Russian anthem.
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.
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?
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 ?
Is that a Bristol accent? Love your work!
Как тебе такое Жан Мишель Жарр?
Hola doy Mexicano me interesaría por este proyecto me podrán apoyar con los diagramas electrónicos gracias
Think the code isn't in the comments anymore, can you github them?
12:03 Girlfriend ignore level over 9000
Was the 10 year old daughter in a skype call with her friend (on headphones).
She'd got bored of lasers by that point! :)
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 isvenitya.
This is like!
гимн СССР приятно удивил =)
You need defenitely not arduino to drawing some with it.
where is the code?
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
Where can i get the code?
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.
Awesome project, really inspires me to do some electronics stuff again
I couldn't find the code in the comments though
Are you wearing a dress and tights?
Speaking as a trans-sister meself.... the electronics hobby seems to be rife with that kind of thing.
It'll be Fredd in the dress and tights.
He writes the code!
What is the UTC42725? I googled it but got nothing :/
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!
Славься Отечество!