![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Our first step after settling on an idea for the camera was to start getting familiar with photoresistors, or photocells. In order to capture the entire image on the image plane, we would either need an array of up to 1000 photocells, or a smaller patch of cells that could move along the x and y axes and function, essentially, as a larger sensor. We chose to go with the smaller patch, for reasons of time, cost and wiring feasibilty. The idea of building an xy movement mechanism seemed less daunting than wiring up to 1000 photoresistors.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
The first thing that we did was wire up five photoresistors to a breadboard and connect the board to an Arduino microcontroller. We wrote a simple Processing program that would read the analog values of the sensors and display those values as grayscale rectangles. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The more available light, the lighter the square on screen, the less available light, the darker. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Working with five photocells was straightforward. The next step would be to wire up 64 (an 8x8 grid). In order to do this, we needed to use 4 multiplexers to increase our available analog inputs. Figuring out the code for one multiplexer was a challenge and took us a good four days. With the help of our professor Tom Igoe, we eventually got one multiplexer down, and were able to populate the pins with 16 photoresisitors. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| On the left are pictures of the multiplexer on the breadboard. For code information, please go to the tech page. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The next thing to tackle was building the sensor with 64 photo resistors. We order 64 mini cells from the Electronic Goldmine and when they arrived, we got to soldering. We decided to use perf board to keep them all in place. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| After soldering about eight resistors to the board, we decided to test the values of all of the mini cells using a simple analog read program through Arduino. To our dismay, the mini cells had values that ranged from 40 to about 800 - too disparate to use for our application. Our choices from that point were to order a few more bags of mini cells, go through each and pick out the ones with similar values or to getr all new cells. We chose the latter, and bought several bags of standard size cells. We also decided to scale down the sensor to 16 cells instead of 64. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| After testing the standard photocells, and weeding out the ones with outlying values, we proceeded to solder 16 of them to the perf board. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Keeping our wires nice and long, we got all 16 onto the board. We used different color wires for power and ground, and tried to keep them grouped into batches of four to help us organize our board. Once the wiring was complete, we were able to start working on the serial program that would transmit the analog values to Processing for use in our "painting software".
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Because we weren't able to move the head around smoothly, we knew we'd have to rewire the head eventually with thinner wires. The image on the left shows our first setup. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| We worked with Tom again on the programming. He went through the benefits of using ASCII and Byte and helped us clarify questions we were having about how to read the data in Processing. In the end, becuase we knew we would be using two additional sensors to locate the sensor in place, we wired two pots to the breadboard and Arduino for the time being. Since the multiplexer was using analog0, we put the potentiometers on analog pins 1 and 2. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
We ended up going with ASCII sender and receiver programs. For more information, please see the tech page. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Once we had the sensors communicating with our software, we were ready to start construction on the movemement mechanism. For ideas, we pulled apart an etch-a-sketch to see how it functioned. We experiemented with different tubing, wood and re-purposed parts to create the xy movement mechanism. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This is the first movement mechanism that we made using wood, copper tube and parts from a tile cutter. Before going with this, we had experiemented and thought about using drawer tracks and Brio train tracks. These pieces worked, but were quite large. Initially the sliding mechanism stuck a little bit, but after using some WD-40 we didn't have any problems with smooth movement. In the end, Chris suggested using a record cube as the box for our camera housing instead of building a new box. For that reason, we built another mechanism that was smaller and could fit easily into the 13.25" x 13.25" box that we bought at Gothic Cabinet Craft. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| These images show the original rig. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| At this point, we were also trying to fiigure out which sensors we were going to mount to the rig to track the x and y positions of the sensor. After playing around with several kinds of sensors including sonic rangefinders, the ones that worked for our purposes were sharp IR sensors. They can sense as close as about 1.5" and as far as about 14". These were perfect for our purposes. Because we had already wired pots to our board, and the code was ready to receive their values, all we had to do was substitute in our IRs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
At this point in the project, all of the parts were beginning to work concurrently. We were simulataneously working on code, building a new mechanism and rewiring the head to have more robust connections and be more flexible. We decided to go with all new cells for the sensor and to use ethernet cable attached to header pins for the wiring. After the new, smaller, movement mechanism was built, we attached two IR sensors to be able to track movement. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| We attached white cards for the IR sensors to pick up on for movement. Additionally, because the sensor head was about an inch and a half from the IR (separated by a wood block), we didn't have a problem with the IR being too close to the sensor head. The head was always in its range. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| We then began work on the outside box, the movement handle and the light proofing system. We bought the box from Gothic cabinet and drilled a hole on one side. We spraypainted the interior black for lightproofing and attached a handle to the sensor head that would extend out of the box. The handle would allow the user to move the sensor around inside the box without breaching the light-tight environment. We attached a handle to come out of the box, and made attached Duvatyne cloth to the open side of the box using velcro strips. On the front of the box, over the hole that we had drilled, we attached a metal sheet that we could easily make a pinhole in. We also attached a brass handle to the top of the box for portability. We placed a sheet of vellum in front of the image plane in the hopes that it would help more light get to the sensors. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| That was it for construction. All we had left to do was test our movement mechanism and sensors inside the box. The last touch was to cover the LEDs on the Arduino with electrical tape so the light wouldn't get picked up by our sensors. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||