Final Project Proposal

In Week 1 I used Rhino to model my initial idea for a final project. It's a lotus lamp!

Placeholder Image

In its closed form, the petals are raised upward, allowing solar panels along the base to take in sunlight.

Placeholder Image

A light detector on the petals senses for when the ambient lighting is low enough to then transition to the open form, in which the petals lower, revealing a solar-powered light inside!

Developing the Mechanism

In Week 4, I designed the mechanism and 3D printed it to test it. The gears are built into the base, turned by what will eventually be a microcontroller-informed motor, and operate successfully.

Overall this test was successful, but the petals are a bit too floppy and the gears are a bit too difficult to turn, so I probably need to adjust the gear teeth and add some bearings.

Baby's First Input Device

I wanted to take Week 8 as an opportunity to push my final project further. I already have a large chunk of the physical mechanism worked out, but now I have to start thinking about the electronics side of things. My lotus lamp needs to be able to detect the level of light and, based on that level of light, decide whether the lamp should be closed or open.

Placeholder Image

And so begins the first week of what will be a two-week mini-project. With tremendous amazing incredible showstopping help from Quentin, Jake, and Eric, I jumped into KiCad and designed a "simple" board that would hopefully pass information on the light level from a phototransistor to an RP2040, which would in turn pass information to a stepper motor driver, which would finally direct a stepper motor to rotate in increments of 180 degrees. For this week, though, I'm only focused on the communication between my phototransistor and my RP2040. Here are some screenshots of my workflow from design to milling:

Placeholder Image Placeholder Image Placeholder Image Placeholder Image Placeholder Image Placeholder Image Placeholder Image

Now for the milling, which I did with the fancy Carvera in CBA with help from Kyle:

Placeholder Image Placeholder Image

Got it on the first try! Collecting the components I needed was more difficult than expected (it was especially hard to find 3.5 mm screw terminals; will design for 0.1" screw terminals in the future), and soldering was about as difficult as expected. But eventually, that got done too:

Now, with some serious supportive heavylifting from ChatGPT, it was time to code my RP2040 to read and report on my phototransistor. I started by setting a simple code to do just that, which worked:

Placeholder Image

My RP2040 was able to accurately report on the phototransistor's light level, both in raw ADC and voltage. I found the raw ADC to be the most helpful statistic. The raw analog-to-digital converter reading is on a scale from 0 to 1023, with 0 corresponding to a ton of light and 1023 corresponding to the absence of light. After I got an understanding of what conditions caused what light level readings, I modified my code to tell me more information:

Placeholder Image

Now, the code will tell me in real time whether my board is under bright conditions, averagely lit conditions, dim conditions, or dark conditions.

Baby's First Output Device

First, hooking up to a power supply and running some simple code just to see if the motor will spin. And it did!:

And now to spin it faster:

Cool, so the motor spins. Now, to link it to my input device! Ultimately, I want to take in the level of light, and, when the light level passes a certain threshold, tell my motor to spin. So here's the code I sent to my RP2040:

Placeholder Image Placeholder Image

And here's the result:

It worked! Now, for the real test: I wanted to hook the stepper motor up to the bottom of my lotus to get it to open up in response to the light! So, I designed and 3D printed a base for the lotus to set my motor into:

Placeholder Image Placeholder Image Placeholder Image

And I tried it and... it didn't work. I think the torque required to actually turn the gears in my lotus was too much for my simple stepper motor to handle. I heard it rattle a few times before it stopped responding altogether. Then one of my prongs came off, taking the pad with it. Then my driver carrier overheated. Then one of the motor wires came loose from a screw terminal. And at that point... I decided to call it quits.

There are so many things I can try in the future to get this thing to work down the line! For one, I can add bearings to the gears to reduce friction (right now it's just PLA scraping up on PLA). Eventually, I'll need to find a way to integrate solar power into the mix (so that my lamp can be portable and won't have to rely on a power supply to work). This was a good first try, though.

Placeholder Image

Widlarize and go again! I learned a lot this week. Looking forward to future improvements.