« make your own h-bridge | Main | animation »

mtrail - thoughts

For my pcomp final I worked with Stefan to improve our light display for the midterm. The project was to create a light display that detects movement and leave behind trailing light. There were too main areas we wanted to improve from our first prototype -

1) Improve the sensitivity of the display
2) Make it portable

Changing the sensitivity required a lot of reworking of the code. We tested several different methods to sense “change” in the environment. We first tried peak detection, but the lights wouldn’t go on until a shadow passes through. This was a somewhat confusing interface. We then switched to raising-falling edge detection, which was more akin to what we had in mind. In the end, we only used raising edge to trigger the lights, because it allowed the display to sense multiple shades of shadows.

We had decided early on that we didn’t want to use the Digital-to-Analog chip from our midterm. We were using the chip at a lower resolution than specified, and sometimes it would be stuck in this mysterious state where no LED’s would light up, and only unplugging the chip would fix it. We coded our own PWM by using a series of ON’s and OFF”s for each digital pin. Because this was done purely through software, we had reduce the number of non-PWM instructions we do on the arduino so we don’t eat up too many clock cycles.

To make the display portable, we decided to build a casing with plexiglas and also design a PCB which would hold all the LED’s and sensors, a charger circuit and a battery, and a USB port and programming pins. We used a lithium ion battery, which was commonly used for cell phones. Designing of the PCB took almost a week as it was something Stefan and I had never done.

With all the designing and coding done and orders for parts and PCB’s sent out, we decided to build a perfboard version of our final product. We knew that time was tight and if any of our three orders didn’t come in time we wouldn’t make it for finals presentation. In the end, this turned out to be a life savor because our PCB’s got sent to Texas. We also found out that there was too much reflection on the Plexiglas that covered our sensors, and the display would be stuck in a feedback loop. Luckily we were able to modify the interface quickly (by drilling holes to expose the photocells) to rectify this problem. On our final day, we moved our display around the floor and tested it with different sensitivity for fine tuning. This would not have been possible if we hadn’t burned the perfboard version.

Some things I learned from this experience.
1) Always have a backup plan in case things don’t arrive on time.
2) Built a prototype of your final design to find any potential problems (like our feedback loop issue)
3) A simple idea can turn out quite fun. All we wanted to do was detect motions, and at times I thought this was too simple of an idea. However, once we made it responsive and portable, we were bringing to different settings and putting it in different orientation. Tom was even using it as a mini light-saber in class.

I’ll post photos and video some other day.

Future improvements -
1) Include a potentiometer used for fine tuning resolution for edge detection.
2) We didn’t put in an on/off button for the display (I don’t know how we missed this)
3) Combine USB charger and programming pins.