DIY Laser Projector - Built from an old hard drive

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
foreign [Music] wouldn't it be cool to have a small portable device that could project a message from a long distance away normal projectors have pretty short ranges because they use light bulbs or LEDs so the light isn't coherent so I got to thinking what about a laser but wait a minute don't laser projectors already exist I mean what about those things they use at concerts these are typically referred to as show lasers and they use a technology called a galvanometer to move a small mirror which directs the beam these are cool and really powerful but they aren't exactly designed with this task in mind and therefore have some limitations when it comes to it they're really just meant to produce cool looking geometric designs and can actually struggle to draw out highly detailed images in addition they use a lot of power and are expensive and not very portable now I just wanted to write some simple text on a wall surely a simpler method could be found or so I thought this device would employ the effect known as Persistence of vision Persistence of vision is a phenomenon where the image of a moving object does not immediately vanish as it passes when we see a rapid succession of images our brains blur them together I had the idea that by having a laser pointed at a circular array of rapidly spinning mirrors set at slightly different angles horizontal scan lines could be produced as the angle of reflection changed in relation to the laser the dot would Trace rapidly across the wall this would appear to the eye as a solid red line due to its speed then the next mirror would come in front of it projecting the next line down meanwhile the laser could be rapidly switched on and off to produce line segments together these segments can form an image in order to keep things synchronized I would need some kind of sensor to detect when each mirror was about to pass in front of the laser I also realized I would need another tab because I needed to know that the mirrors were passing in the correct order when a full rotation was complete the next frame would be drawn I originally thought I could just use a photo resistor and an LED and have some sort of little tab in front of each mirror that would block it as the mirror array spun however after some initial testing it turned out that the photo resistors were just too slow and I'd have to find another solution luckily I happened to find some photo transistors that not only operated much faster than the photo resistors but also had the perfect size slots in them to accommodate the tabs that I would use on the mirror array so it was time to start experimenting after looking around to see what parts I had on hand I had the idea of using an old hard drive these use brushless motors that are very quiet and spin at a high RPM as an added bonus I could leave the motor in the aluminum housing and use that like a sort of case for the whole device I happen to have an old 80 gig hard drive from a broken computer and I decided to use that I enthusiastically voided the warranty by removing all of the screws and popping the lid off then I removed the data disks and other parts that were in the way now originally I had planned to run the motor by hijacking the existing hard drive control board that was conveniently located underneath and unfortunately I couldn't get it to run at a consistent speed so I tossed it I found a simple brushless motor driver online that allowed the speed to be controlled via an onboard potentiometer I connected this to the motor and a 12 volt power supply and found that it worked perfectly now it was time to start building the mirror array I used Fusion 360 to design a cylindrical drum that had eight sides one for each mirror set at slightly different angles I had some round one-inch mirrors already and figured they would do fine for a test version I Incorporated these into my design then I used my 3D printer to make the part this was kept as simple as possible with no way to adjust the vertical or horizontal angle of the mirrors but I hope that it would be good enough I cut a hole in the bottom of the aluminum hard drive housing to accommodate the sensor that would count the passing of the lower tabs I then tentatively installed both sensors for the laser I used a cheap five milliwatt red diode that was comparable to any ordinary laser pointer I just sort of stuck it in the housing with some double-sided tape for the time being this was just a proof of concept version after all next I wired the Arduino and the rest of the required components into a small breadboard for testing with all of that done it was time to sort out the code now for the sake of brevity I'm not going to go line by line but rather give an overall explanation of what's going on first let's talk inputs and outputs we have two inputs for the two IR sensors these are attached as interrupts which allows them to supersede any process currently running on the Arduino this is very important because the device requires precise timing if either sensor gets triggered the Arduino will pause what it's doing run the interrupt function then proceed with its normal process the first function the mirror counter simply increments a variable to keep track of what Mirror Has most recently passed in front of the sensor the second one resets that number to zero when the final mirror has passed it so that it resets for the next Revolution the only output is the laser diode switching signal each letter is represented by a two-dimensional array the First Dimension corresponds to the vertical resolution meaning what mirror is in front of the laser at that time and the second represents the horizontal line segments that make up the image the numbers in the array represent on or off times for the laser positive numbers correspond to the laser being turned on negative numbers correspond to it being turned off obviously we can't have negative time so I simply use an absolute value function later in a conditional statement to fix this now let's talk about the main Loop first we receive data this is done through a function with the serial.read command then there is a simple conditional statement that checks what mirror is currently in front of the laser first there is a slight delay with a value equal to whatever I set in a variable called frame offset then a small horizontal adjustment is made to each Mirror by adding or subtracting a few microseconds this is necessary because of the imperfection of the 3D printed part without it there will be some variation in where each mirror reflects the light then there's a little bit of math that basically functions like a center alignment on the text so after that minor delay the mirror number is passed to a function called encode pulses this function looks at what serial data is coming in and then makes a series of on and off commands for the laser based on the letter arrays that I mentioned earlier the code Loops through each array and if the number is positive it turns the laser on for that many microseconds and if it's negative it turns it off for that long then the next mirror comes along and the process repeats it took me a while to get all this sorted out but eventually I got it working more or less the way I wanted so I put everything together and we'll call this version one so the good news was it did actually work the bad news was there was no shortage of problems right away I saw that the image that was being displayed was incredibly dim although the little red laser that I was using seemed bright enough when pointed at a fixed spot it was a lot less bright when being rapidly traced across the wall for only a few microseconds in fact I could only see it properly from a few feet away in a dimly lit room we need more power the second issue was that the lines were too far apart and not evenly spaced for the former problem apparently even one degree of difference which is what I had used made too much space between the lines on a wall 15 feet away and for the latter my 3D printer was apparently just not accurate enough to ensure the consistency that I wanted I also decided I wanted to use more than eight lines if possible because I thought it would allow for nicer looking text and I didn't need more horizontal resolution anyway I should explain here that the more mirrors used the tighter the reflection angle would be also there was an annoying wiggling effect that resulted from the lines seeming to move back and forth horizontally I wasn't sure if this was due to the mirror array being unbalanced or some weird feedback loop that resulted from a timing interaction between the interrupts and the clock speed of the Arduino I immediately began working on version 2. for the first issue the solution seemed simple just get a brighter laser luckily between eBay and Amazon there are no shortage of cheap powerful and dubiously rated laser diodes apparently green light is the most visible to the human eye specifically 555 nanometers is the peak wavelength for human visibility the closest diodes to that that are commonly available are 532 nanometers which is kind of a lime green color I found a cheap 120 milliwatt 532 nanometer green laser with a nice heat sink and a driver board that said it allowed for modulation via an input signal all right before we go any further I need to address laser safety lasers of this power level are dangerous enough to cause permanent damage to your eyes potential actually even blindness wearing safety goggles like these that are rated for the correct wavelength is important when experimenting with all that being said I do want to point out that the way that this device uses the laser is inherently safer than a lot of the devices that you can find online first of all because the laser is pointed at mirrors that are rapidly spinning at a high RPM it's never focused on a single spot for more than a microsecond it's also being pulsed on and off rapidly which decreases the apparent brightness still I'd never point this device at any person animal or reflective surface if you do choose to experiment with lasers please be safe because you only get one set of eyes now back to the project in order to accommodate the Laser's large heat sink I needed to cut away some of the hard drive's aluminum housing I carefully used my CNC machine like a manual Mill and removed enough material to give the heatsink plenty of space the issues of the line spacing and accuracy can be tackled simultaneously I would design a new mirror array that had 12 smaller mirrors instead of eight and would have adjustable angles so I could get everything lined up perfectly the new design had a base section that provided a mounting space for each mirror arm assembly and 12 tabs for counting its rotation each mirror assembly consisted of a support structure mirror plate adjustment screw connector arm and two horizontal pivot bolts by turning the adjustment screw I could move the connector arm in or out therefore tilting the mirror up or down so I fired up my 3D printer and set it to work making all of these tiny little parts then I had to assemble everything and it took quite a while here's the result this complex little assembly unfortunately this is what I would call a cool looking failure right off the bat I really realized how finicky the adjustments were oh it did work to an extent I was able to adjust the mirror angle by turning the screw the problem was even a slight adjustment of a few degrees was more than enough to move the mirror a significant amount in other words I had to use extreme delicacy on all 12 of the screws to get them lined up right oh well it only needed to be done once right wrong for whatever reason perhaps because of the softness of the plastic they kept getting out of alignment I would get everything right then the next day it was all out of alignment at this point I decided to shift gears and work on another part of the project I used a piece of perf board to solder together a circuit to get everything off of the breadboard and clean up the whole device now in addition to the difficulty of adjusting the 12 mirrors I also noticed some issues with the laser it was apparent that this green laser wasn't turning on and off as cleanly as the red one had been the little five milliwatt laser was just being powered directly from the Arduino so there was nothing to go wrong I noticed a strange banding effect within the lines it seemed like the laser must be pulsing very rapidly in addition to the on and off commands that I was giving it the brightness was also reduced compared to what it should be it was becoming obvious to me that this green Laser's driver board was a total piece of crap altogether you can see that things were not going very well it seemed like every time I fixed one problem two more sprang up to replace it time for version three I guess the first thing that I did was redesign the mirror array instead of a highly complex assembly of dozens of tiny parts that all had to fit together I would just print a cylindrical drum with holes in it for each mirror there would be a simple one-piece plastic backing part that could bend it would be fixed at the bottom and at the top a screw would allow me to adjust it just like in the last design the new Arrangement used way less moving parts and would hopefully therefore be more consistent the other main issue was the laser modulation problem oh did I mention that I somehow blew up the first control board yeah that happened and I had to get another one but the problem persisted so now I also needed to design and build my own rapid switching constant current laser driver circuitry now to be perfectly honest my electronics knowledge is somewhat limited so this was looking pretty intimidating but I'm also way too stubborn to give up that easily you may be wondering what is a constant current driver anyway I know I was most power supplies are constant voltage devices they just put out a specific voltage regardless of the load attached to it in contrast address a constant current driver puts out a specific amount of current regardless of the voltage drop assuming of course that it's less than the input voltage I learned that you can build one pretty simply using an lm317 voltage regulator like this the output current is inversely proportional to the resistor value but hang on a minute why do we even need one of these constant current drivers anyway well laser diodes generate a lot of Heat and the hotter they get the more current they draw so they can go into a thermal runaway type of situation where they burn themselves out in order to prevent this as well as keep the brightness consistent we have to give them a fixed amount of current so I put the circuit together hooked it directly to the laser diode and everything seemed to work fine then I added a mosfet to switch the power on and off via a signal from the Arduino at this point the laser diode came on for a split second and then died I wasn't sure what the problem was and thought that maybe the Arduino being plugged into the external power supply as well as the laptop was somehow the culprit I tried another diode same thing dead after killing a third diode I decided to switch to LEDs because this was getting ridiculous and a little bit expensive what I realized was that when the LED switched on there was a brief flash of brighter light before it fell to its intended brightness then I did a massive face palm foreign because I then realized there was an extra capacitor in my circuit that was totally unnecessary and it was dumping current as soon as it was switched on the LEDs could actually handle this brief pulse of higher current but the laser diodes were more sensitive and they could not when I got rid of that part everything was fine and it really would have been nice if I had thought of that a little bit sooner I rebuilt the circuit on another piece of perf board and installed it on the device I was still having issues with my laser though I didn't know this when I started the project but the kind of diode that I had picked was probably about the worst choice I could have made 532 nanometer lasers are what is known as diode pump solid state DPSS for short there's a lot of complex stuff going on here but basically DPSS lasers actually consist of an 808 nanometer infrared diode that puts out light that's invisible to the eye and a crystal that changes its frequency to 532 nanometer green light the problem is that they don't come on instantly at full brightness but rather require a short warm-up period so for this application not a good choice luckily 520 nanometer Green Lasers exist in direct diode form so I ordered one from eBay as well as a nice copper and aluminum housing that would eliminate Heat this time around I went with an even more powerful laser diode 120 milliwatts was still pretty dim at any reasonable distance I used my CNC machine to make a holder for it that could attach to the hard drive after that I used my drill press along with a small metal tube to press the diode into the copper housing then I screwed in the lens and rear section and pressed that into the square block that I made earlier this was attached to the hard drive via single bolt allowing me to adjust the angle that the laser hits the mirrors there's one more piece to the puzzle when it comes to the Circuit design that I should mention even after changing the type of laser to a direct diode I noticed a slight delay when it turned on which caused portions of the image to be dimmer to rectify this I added a resistor that basically leaks a small amount of current through the laser even when it's not being switched on this decreases the response time right at the beginning of this video I mentioned that this device was supposed to be portable so let's talk about that first and foremost power the motor runs on 12 volts and the Arduino can handle that much as well the laser constant current circuit really only cares that the voltage is a bit higher than the diode's voltage drop of 5.7 volts in the interest of getting this project done I decided to go with the simplest option available to me eight double a batteries I already happened to have a battery holder for these so I printed a base section that bolts to the bottom of the hard drive and holds the battery box I also Incorporated a mounting bar in to the design which can be connected to a tripod now up till this point I had just been sending serial data to the Arduino with a USB cable but in the interest of full portability I Incorporated a Bluetooth module into the circuit that allows me to connect my phone directly to the Arduino I just use this app called serial Bluetooth terminal plus a few lines of code in my program and it works great I designed and 3D printed a top cover that not only protects the rotating components from damage but also prevents dangerous reflections of laser light from coming out anywhere other than the intended Direction and finally I added a removable cover for the main Electronics control board I did a final check of all the components and put everything together the bottom 3D printed box bolts into the hard drive's case mounting holes with regular pc screws the top cover bolts to it with M3 Hardware that goes into existing holes that I enlarged and tapped then the circuit board cover screws into that with more M3 bolts I Incorporated some vents into that as well as an opening for the USB port so here's the finished device as you can see everything is pretty well contained within the hard drive case and 3D printed shell I've got to say I'm pretty happy with how this came out but it is still very much a prototype this was a huge learning experience as well as a test of my patients if I'm being honest I have a lot of ideas on how it could be improved but also really wanted to get this project and video done for the time being now let's take a look at what it can actually do you already saw a little preview in the intro of the video but that was indoors and a distance of only about 20 feet Persistence of vision devices are notoriously hard to capture with digital cameras you tend to get weird flickering effects where the camera's shutter speed interacts with the refresh rate of the device to mitigate this I lowered the shutter speed but it still looks a lot better in person right now the device is limited to projecting one line at a time with a maximum of 20 characters which conveniently happens to be just enough to display my channel name I could probably modify the code to do a scrolling text effect that would allow for longer messages without making any changes to the hardware I just haven't gotten around to that yet I never did resolve the wobbling effect that the projected image has and I believe this is just a result of the 3D printed part being unbalanced I don't think it looks too bad but ultimately it would be nice to reduce or eliminate this but enough with the short range indoor shots let's see this thing Outdoors the first outdoor test I did was in my backyard and I was limited by how far I could go by the size of the yard I was able to project the image onto a fence at the back of the property a distance of about 90 feet as you can see the image is pretty bright and very readable the main issue is how large the letters are I really wanted it to be a tighter angle of projection however without a secondary lens this is kind of difficult to do I'm already pretty close to the Limit the Arduino can do for switching on and off the laser one microsecond I think maybe a faster board would be better for the vertical space it just has to do with adjusting the mirror angle this takes a lot of precision the tripod attachment point that I mentioned earlier ended up being really awesome by the way I have this mini tripod that allows me to rotate the projector in any direction and then clamp it down this means that I can angle the image however I want and it's really stable so that's where the project stands as of right now I'd like to develop this concept further in the future and I actually have a lot of ideas on how to do that if I do revisit this project expect to see another video from me it might be a while though at any rate I hope that you enjoyed the video it took me a lot longer to make this than I thought because of all the technical hurdles that I ran into if you have any comments or questions about this project or suggestions for future videos please feel free to leave them in the comments below I do try to read as many of them as I can subscribe to my channel if you want to see more cool projects like this in the future thanks for watching and I'll see you in the next video
Info
Channel: Ben Makes Everything
Views: 1,373,209
Rating: undefined out of 5
Keywords:
Id: u9TpJ-_hBR8
Channel Id: undefined
Length: 20min 7sec (1207 seconds)
Published: Tue May 09 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.