I created this robot to help with light painting techniques. If you don't know what light painting is, this link (http://www.diyphotography.net/painting_with_light/) gives a general description or you can simply google "light painting images." I wanted this robot to have preprogrammed functions to move in certain shapes. For example, if I wanted to create a circle, I would simply rotate the bot 360 degrees. I wanted to make this more complex, so I used a single led (for now) to create the light source. Based on the movement of the servos and motors, I can create any shape I want based on mathematical functions. Now, if I wanted to use the bot for anything else I can also manually control it.
Step 1: Gather Materials
For the structure of the robot, I mainly used MakeBlock parts. I was easily able to order them on their website based on what I needed. I'll include a list of the parts I purchased, but if you plan to replicate this, choose whatever best fits your needs. For this project, I kept the dimensions small for initial testing and plan to expand for larger results.
From Makeblock: (There are a few parts I did not end up using but I spent $164.54 in total)
- 25mm DC Motor Pack-Blue
Base Bracket B
Battery Holder for (6)AA
Me UNO Shield
Robot Servo Pack-Blue
Socket Cap Screw M4x30-Button Head (25-Pack)
Socket Cap Screw M4x8-Button Head (50-Pack)
- soldering iron / solder
- extra wire
- ps4 controller (or any bluetooth controller)
- mini tripod (this will be disassembled)
- tripod (to mount your camera)
- mini breadboard
- arduino/raspberry pi (I'm currently modifying this project to use a raspberry pi 3)
- relay module
- allen wrech/screw drivers
- power source (I used batteries or wall outlet for testing)
- L293D or similar high current motor drivers
- 2-4 Motors (I used DC, I would suggest for more accuracy use stepper motors)
Step 2: Build Frame
For the structure, I first built a base, then made modifications based on that. I positioned the servo so that I could attach a Makeblock beam without obstruction. This took a lot of time because I constantly moved parts. For a prototype, this works well. In the future, I plan on scaling the entire project and putting the electronics and wires in a neater organized electronics box. The picture doesn't show it, but a single led, is wired to the top of the beam attached to the servo. This serves as my light source. I used an rgb led which is why the wiring isn't the best, but this can be easily fixed. The battery packed is attached to the bottom of the frame just for convenience.
Step 3: Electronics, Code and Modification
I purchased a few brackets from Makeblock so that I could mount arduinos, shields, and relays. I initially planned on using Makeblock's shield to drive the 4 motors. However, I didn't have the right connectors with me, so I tried to use a L293D shield from Amazon I had from a previous project. Here I made a mistake because the motors draw more current than I thought and I ended up frying an IC because of it. If I had only used 2 of the 4 motors, this could've been avoided. However, after learning that, I decided to go a bit retro with a servo because they can handle larger amounts of current no problem. So I bought a sainsmart 4 channel relay. (Again this was from amazon) At this point, the raspberry pi model 3 was announced, so I decided to switch from the arduino so that I can take advantage of the wifi and bluetooth capabilities. I am currently waiting for my pi 3, so once I get that and test it, I will upload the most up to date code that I am using. The arduino code I used is simply running motors and servos for a specific length of time. In order to create the shapes, the code will be different based on robot size and desired result. For example to create a sphere, rotate the bot 360 degrees while moving the servo arm from 0 to 90 degrees. The speed and time interval can vary. *Note: One of the main reasons for switching to a raspberry pi is for the use of bluetooth with the dualshock 4 controller. I can do this with an arduino, however I plan to change this to a cleaner look. So the less wires and shields and components, I can use the better.
Step 4: Light Painting
Now this is where the light comes into play. The robot may move in the desired fashion, but in order to capture a picture of it, your environment should be completely dark and your camera should have the ability to change shutter speed so you can capture the light from the led. For example, your bot takes 10 seconds to spin in a circle. Your camera's shutter should be open for 10 seconds in order to capture that motion. Since the led is the only source of light, your image will be that light in a circle. If you've ever seen photos of cars on a night in the city, the concept is very similar. Finally, I used a cheap mini tripod to mount to the side of the robot so that I can capture the image up close if need be. Otherwise, I used a standard tripod with the camera aimed at the bot. This project is still in progress, so I will add more information and updates as they come along!