Week 9: Input Devices09 Nov 2016 · 2 min read
The assignment for this week was to design a microcontroller that measures something in the physical world.
I decided to make a microcontroller that measures ambient light. I have a small nightlight in my room that I built a couple months ago, and I thought it would be cool to modify it so that it automatically turns on when it’s dark. Here’s my nightlight:
I didn’t actually modify my nightlight for this week’s assignment, but I did get some practice working with phototransistors.
After designing the schematic, I placed parts on a board and let the autorouter do its job:
I made sure to leave enough space in front of the FTDI connector so that the SMT component would be supported. This is something that I didn’t do last time I designed a board with an FTDI connector, and then I had to be super careful about not putting any load on the connector to avoid breaking the board.
Producing the PCB was pretty straightforward. Here’s the milled PCB:
And here’s the finished PCB with all the components:
I programmed the board using my FabISP:
Running the light.py script on my computer, I could verify that the board worked as expected: