Elena Cardiel's final Fab Academy project has ambient light sensors and has moving parts to reveal the light when you sit in front of it. I think this project will be very challenging electronically, and the actual design aspect of it (since I will be designing my own structure for it) will also be different.
I chose this project because this was the original project that caught my eye during Fab Academy final presentations. Ever since I saw this project the first time, I knew that I wanted to do something similar myself.
Marjo Leinonen's final Fab Academy project has sections to touch the lamp and dim it according to the user's preference. Since it uses copper in the sections where the user interacts with it / touches it, I'm worried about the inaccuracy of the copper. It may not be super sensitive to the user touching the copper, so I don't think I'll do this project. Again, I was drawn to this project because of its interactive aspect.
Hussain Alhudhud's final Fab Academy project is an interactive device that helps children learn simple arithmetic. It has several pieces with numbers on them and the basic arithmetic signs. With these pieces, the children can place the numbers and mathematical operation signs down and create equations. The project then tells them whether or not the equation they created is correct. This one, of all three projects, will be the most challenging because of the sheer quantity of boards that must be created. Furthermore, communications between the boards is critical for this project to work. I will not choose this project. However, this was a really fascinating concept for Hussain to try, and I think it would be effective in a kid's learning environment. I think the concept of helping kids learn would be the coolest thing about this particular project.
This is the Fab Academy final project page of a 2019 graduate, Elena Cardiel. Her presentation inspired me for my final project.
This is the inspiration for the design of my lamp.
These are my original design specs for this project. Here's how my ideas have changed:
For me, a successful project would include a sensor that dims or illuminates the light source depending on the ambient lighting. I really want it to use I2C, as well, since I didn't get to go into a lot of depth with it during Networking and Communications week during Fab Academy since I was behind schedule.
This document describes what I did each day in class as I worked on my project. In 1st semester, I had less than 30 days in class to work on my project due to extreme circumstances.
I will reference specific days mentioned in my daily journal and attempt to not be extremely redundant in my explanation of my fabrication process. My daily journal is where I go into most detail about every small struggle I encountered.
I designed, routed, milled, and soldered the following boards by myself.
This is the board with five jumpers, started on November 26 and ultimately abandoned on December 5. I only got extremely high (meaning extremely bright light) values from this board. The highest value is 1024, and the video shows that all the values given were very close to the maximum value despite the fact that I sometimes covered the sensor.
This board (started December 16) only yielded "????" errors, as seen in the video.
include <SoftwareSerial.h>
SoftwareSerial mySerial (3,4); // define (tx, rx) pins
int sensorPin = 1; // analog input pin to hook the sensor to
int sensorValue = 0; // variable to store the value coming from the sensor
void setup() {
mySerial.begin(9600); // initialize serial communcations
}
void loop() {
sensorValue = analogRead(sensorPin); // read the value from the sensor
mySerial.println(sensorValue); // print value to Serial Monitor
mySerial.printlin(“x”); // print value “x” to Serial Monitor
delay(500); // short delay so we can read the numbers
}
I soldered wire to the two ends of the phototransistor so I could use it on a breadboard.
Since I had to use an ATtiny 45 on my breadboard (we don't have through-hole ATtiny 44s), I had to double up on pins. Similar to the previously manufactured boards, I used Software Serial, which occupied two pins (TX and RX). So, the MISO pin also functions as the analog input pin for the phototransistor.
This breadboard does not currently work as I want it to, but the code uploads. I continue to receive "????" in the Serial Monitor when I hook it up to Arduino. Here, it is shown connected to the Sparkfun Programmer I learned how to use this semester and the Sparkfun RedBoard.
I learned a lot of different things while I made this breadboard, especially since I haven't used a breadboard in two years. I didn't realize that I needed to put the ATtiny 45 in the middle of the breadboard so that the pins on either side don't connect electrically.
I've also tried to use an LDR with the ATtiny 45, but I continue to just get ???? in the Serial Monitor. I referenced this page, and I realized that I've totally overlooked the analog to digital conversion. Maybe this is the source of my problem.
I took inspiration from Micky Zeijl's Fab Academy week 14 documentation, but otherwise, I designed, routed, milled, and soldered these boards by myself. It has extra pin headers for I2C communication with the master board (the Arduino) and communication to the LEDs.
After designing the board on Eagle CAD, I used BantamTools to mill it out on an Othermill in the lab.
Based on the way I designed the board, one of the traces was too narrow, so I had to manually cut it with an X-acto knife.
Then, I soldered my board and applied acetone to clean it.
I decided that I wanted a separate LED board for more ease (so I could position it how I wanted within my lamp), so I just quickly designed and threw together a board. Each LED has a 499 ohm resistor attached to it, and there's a 2x5 pin header in the center of the board. One of the ten pin headers is a common ground, leaving the nine other pins to be connected to LEDs.
Online resources I consulted:
Though I got help from these sources, none of these sites told me exactly how to make this project. I did not follow any sort of tutorial to make this code. I combined many, many different example codes together. I wrote it by myself.
In saying that, I'm really proud of my work here. I had to go through a lot of struggle to understand the Wire and TinyWire libraries, and there was a lot of setup involved. Though I spotlight the void loop portion of the code below, there's a lot more important stuff in the setup section of the code.
As always, see my code for more context, but I will explain some parts of the code here:
Below is code on the Arduino, in void loop. In this if statement, the master board transmits different characters depending on what situation is going on outside. Depending on the ambient lighting level in the room, it will send a different character to the slave board (the LED driver board) using I2C communication. The LED driver board then uses the different characters to turn on the LEDs. For example, in a super bright room (associated with character "2"), none of the LEDs will turn on because the room is already bright enough. Conversely, in a super dark room (character "5"), all of the LEDs turn on to light up the room.
I used Corel Draw to design the pieces that I will laser cut. As seen in the screenshot, the holes in the box pieces are hexagonal. This is intentional, as I want the legs to be able to stay in place when I set the lamp down. To assemble, I will glue the legs to the free hexagon pieces. and place the hexagons attached to the leg into the hexagon shaped hole on the side of the box. The little circles are for wire access to the outside of the inner section of the lamp.
First, I tested out my design on cardboard.
There is extra space at the end of the tabs because I designed my box with the dimensions of the wood in mind, not cardboard.
I used color mapping to make sure that all the cutouts (circles and hexagons) would be cut first and therefore uniform.
While I simply used the autofocus tool with the cardboard, I manually focused it on the wood because the wood was so much thicker than cardboard.
The settings I used to cut the wood and acrylic
Wood settings
Wood settings: color mapping
I used wood glue and paper clips to glue the legs to the hexagons/circles
Then, I spray painted the wooden pieces with blue paint and used a froster on the piece of acrylic to turn the clear acrylic into an adequate light diffuser.
I think that deciding to try and wire the LDR board on a breadboard was an extremely wise decision. I was using up too much time making schematics, routing, milling, and soldering boards that ultimately didn't work. With a breadboard, I can alter certain connections and first determine what does work. Then, I put the functioning schematic onto a board and solder it.
I decided to laser cut my physical lamp because, due to Fab Academy, I haven't worked on the laser cutter a lot recently. I was always encouraged to use the more difficult piece of machinery, the ShopBot, instead of the laser cutter. In using the laser cutter, I was able to review concepts like color mapping and really gain control over how my pieces are cut.
I ran into a lot of issues with the I2C coding. At one point, I didn't define my pins properly, and that set me off course for an entire class period. It also took me an extremely long time to set up my code / understand the I2C library. I had to consult a multitude of online resources and Mr. Rudolph to get everything to work properly.
As shown in the documentation above, I had a lot of trouble with my LDR board. Eventually, I was smart enough to troubleshoot on a breadboard, which was definitely a good decision to make. It was super easy to change pins around and make small edits here and there on a breadboard.
I've learned that perseverance is key in engineering. I have made several failed iterations of my LDR board, but I continued to persist and figured it all out. I also struggled with I2C, but I eventually got it. In fact, I'm extremely proud of my work with the I2C communication. I effectively have 2 different strands of I2C running simultaneously, with the Arduino working as both a sender and receiver of bytes over I2C at the same time.
I really enjoyed working with the laser cutter; as mentioned before, I haven't used it in a really long time. Color mapping is a super cool tool that I almost totally forgot about before trying to cut my box out, and I'm glad that I reviewed it. Doing this project has inspired me to circle back and review Fab Academy concepts that I haven't touched upon in awhile. I intend to be in the lab after school once this project is over in order to achieve that goal of reviewing Fab Academy concepts.
As always, I saw that the most work always goes into the last bit of an engineering project. I was in the lab a lot after school to work on this project, and I wish that I had worked a little more quickly in the beginning to try to spread out the workload a little more evenly.
To build on this project, I would want to give Sparky some mechanisms for when he senses you in front of him. That would be extremely elaborate, and I could include the stepper motor board that I designed when I was doing outputs week of Fab Academy.