Inspiration

The inspiration for this project is my time as a wee little pyromaniac. I used to discreetly bring a magnifying glass and some black paper to school, and during recess, I would create fire behind a little hill where my teachers couldn't see me. My creation in this hackathon would truly make my young self proud! Of course, the real applications for this (such as solar panels) are a lot more serious. However, that's not as fun!

What it does

In essence, the machine automatically focuses light into a point using a magnifying glass. The machine uses a stepper motor, a normal servo motor, and continuous motion servo motor to give it several degrees of freedom. First, the stepper motor rotates the base so that the arm is pointing in the direction of the sun. Next, the servo motor tilts the arm so that the lens directly faces the sun. Now, the lens is ready to be focused. Lastly, the camera sends a video signal of the surface tat the focused light is shining on through WiFi to my laptop. A python script on my laptop now uses OpenMV, and specifically the Hough Transform to find the focused light. The Hough Transform is a way to detect a circle, and if the rotation and the tilt worked correctly, the light on the focusing surface should be very close to a circle. Depending on the size of the circle detected, the rack and pinion system moved the magnifying glass closer or away from the sun. Through this method, the sun's light will be focused to create fire!

How we built it

I first spent time 3D modelling all the parts needed using Fusion 360. Some parts, were found online (such as the turntable base, credits at the bottom), some were modified from models found online (such as the rack and pinion system), and some were made from scratch (such as the magnifying glass holder and the photoresistor holder). These parts were all printed on my Ender 3 V2. Next, I put them all together using copious amounts of hot glue, and wired everything using a breadboard. Admittedly, my wire management is quite ugly, but all I had was these jumper wires. I used an ESP32 to control all the motors. It also reads input from the 4 photoresistors. An ESP32-CAM is used to capture an transmit the video feed to the laptop. The python script on the laptop then uses the Hough Transform to detect the light focused by the magnifying glass. This script uses OpenCV to process the video and display the video with an overlay showing where the light is detected. The python script then transmits the size of this light spot to the ESP32 over the MQTT protocol. The ESP32 then uses the rack and pinion system to move the lens up and down to focus light into the smallest possible area.

Challenges we ran into

This was an extremely difficult project for me because I had left most of my electronics on campus, and I am still at home. Thus, I had to find a project I could make using limited components. I used almost every electronic component I had brought home for the winter for a different unrelated project. Some of the notable challenges that arose as a consequence is the messy wiring: I had only these wires, and no soldering iron. Additionally, I had only a few resistors, and so could not pick values freely as my stock was extremely limited in choice. Some technical challenges I ran into was that the weight of the components put strain on the motors, and so they would sometimes not move. Redesigning my mechanical parts to account for this helped. I found difficulty in implementing MQTT, as my ESP32 boards sometimes were able to connect and sometimes simply did not. I am still not sure why, and I hope they work during judging! This may be a hardware issue: I bought the absolute cheapest brand I could find! Lastly, because my project requires the sun to test, I was completely unable to do so, since it was cloudy outside the whole day and anyways I had not prepared the whole mechanism by noon. I was forced to test with a single lamp and an iPhone flashlight. In retrospect, this may not have been the best idea for a hackathon that consists of only one noon.

Accomplishments that we're proud of

I am proud of the system I made to find the sun. It consists of 4 photoresistors, separated by a cross shaped barrier. Each photoresistor only receives light from one side. The idea is that when facing the sun, all 4 photoresistor values will be exactly equal. This, as it turned out, worked really quite well!

I am also proud of my implementation of the Hough Transform to find the sun's focused light. I am not sure how it will work with sunlight, but initial tests with my iPhone flashlight proved promising!

Lastly, I am proud to have worked on this solo. Because IDEA Hacks went remote, my team was unable to work together, and I was the only one of my team left participating in IDEA Hacks. I had to pull an all nighter, but I think the result is quite nice.

What we learned

I learned how to use OpenCV, which I had never used before. I wasted some time playing around with it to get a feel for what it can do, but I think that time was valuable, and I will certainly consider incorporating it into a future project now that I know it's power. I honed my skills in modelling mechanical parts: usually I like to take things slow and simulate my parts extensively, but this time, because of the time limit, I had to design quickly and trust my gut, as there was no time to iterate extensively. Lastly, I learned more about the difference between stepper motors, standard servo motors, and continuous servo motors. Given the chance to work on this project again, I would certainly make different decisions, including replacing the servo with a stepper motor with a certain gear ratio (this would be difficult to model though!). This is not regret, but simply an acknowledgment that I've learned something important!

What's next for Automatic Magnifying Glass Focuser

This project is a novelty, and has little use outside of a fun toy for aspiring pyromaniacs. However, the general technology could be used for one key real world application: Solar Panels. Solar Panels that face the sun could use the 2 degrees of freedom granted by rotating and tilting.

To improve this project, I would want to first ditch the camera, as it is quite unreliable, especially in very bright light conditions when the focal point is reached. A viable alternative is a temperature sensor (or an array of them) that can withstand very high temperatures (such as the one in 3D printer!). However, I did not have this part and was not willing to remove it from my 3D printer as I printed many mechanical parts for this project! Also, I would use stronger motors, because the system currently puts a lot of strain on the ones I used. The ESP32 is also largely unnecessary and could be replaced by simpler parts such as comparator circuits, if one wishes to produce this as a cheap product.

Credits

I'd like to acknowledge that I did in fact take some of my 3D models from other places. I mostly altered them, but one model was taken without alteration. Here are links to any models I used, with alteration or otherwise:

https://www.thingiverse.com/thing:1762299 https://www.thingiverse.com/thing:34829 https://www.thingiverse.com/thing:3170748

Share this project:

Updates