Inspiration

Light-painting is an old photography technique that can use an upgrade from modern LED technology. With the increase in popularity of RGB addressable LED strips, many possibilities are opening up in the field, and one of these is light-painting images. The visual effect of these photos are highly effective and leaves viewers in wonder.

While commercial off-the-shelf products exist in the market, they are often marked with a high price and offer little freedom in manipulation. On the other hand, home-made solution lack the finish of a complete product, and they are usually difficult to operate. Lastly, both commercial and DIY designs suffer from distortion due to uneven moving speeds of the users, which requires lots of practice and many attempts before achieving satisfactory result. Therefore, I hope to improve on these shortcomings with AirBrush, which can light-paint stunning images with improved brightness and speed.

What it does

AirBrush is a portable RGB LED light-painting tool used for long exposure photography. By moving at a constant speed and varying the color of each pixel, it can “print” images in mid-air accurately and reliably.

How I built it

This project makes use of sensors and SD memory card as input, and RGB LED lights as output. The early focus is paid to make sure each component works individually before integrating them into the system. The LED strip is controlled with serial communication which is the major bottleneck on the speed this device, so optimizing the communication becomes essential. Once the basics are operational, then the project can continue on the battery system and user-interface to make the device more user-friendly and portable. All components in the system are modular and connected using DuPont cables to allow for quick replacement and scalability.

Challenges I ran into

The most challenging part is accessing the filesystem on the SD card. In order for the SD card to be accessed from a computer, the filesystem must be in FAT format. External library FatFs is used to manage the communication and file access of the image files. This introduced quite a bit of complexity in adapting the library to specific microcontroller. During assembly, there was a mishap where two SD cards were damaged by the adapter. They worked on a computer but not with the microcontroller. It was diagnosed that the 5V-3.3V level shifter was burnt, and 5V GPIO was supplied directly to the SD card. I suspect that the SPI module on the SD card is damaged, but the primary communication module SDIO is still operational, which is why it works on a computer. This kind of situation was expected, and multiple microSD adapter was purchased. The damaged adapter was replaced, and it has been functional since. Accelerometer is installed and the reading function was full implemented. Unfortunately, there was not enough time left in the project to calibrate and adjust the display speed based on this data.

Accomplishments that I'm proud of

By building the firmware from the scratch, writing LED communication protocol in assembly, and optimizing SD card read cycle, I was able to reduce the software overhead of this project significantly. This resulted in faster operation and a crisper image.

What I learned

Overall, I am extremely satisfied with the resulting device and the effects it is able to create. This is the first time I had written assembly language in a more practical context. It has also been a great learning experience to learn to interface the different serial protocols such as I2C and SPI.

What's next for AirBrush

For my next step, I would like to create a second version of this project, building on top of the foundations from the first iteration. The project was designed with modularity and scalability in mind. The LED strip can be upgraded with a longer one for more pixels since the power supply was chosen to support higher power output. Although not currently in use, the hardware capability for the accelerometer is already integrated and need only to be activated in the software.

Built With

Share this project:

Updates