Mini R2-D2 robot
Hardware- 5 Devlogs
- 6 Total hours
A small R2-D2 robot made from the chassis of the LittleBits kit my sister and I made when we were younger and upgraded to be powered by an Arduino. Made in collaboration with @Winter314
A small R2-D2 robot made from the chassis of the LittleBits kit my sister and I made when we were younger and upgraded to be powered by an Arduino. Made in collaboration with @Winter314
I have some good news and some bad news here for you today. The good news: I found the problems! The motor driver needed a common ground ( wasn’t broken, I’m just stupid) and the ir remote library is interfering with the servo library, as they are both trying to use the same timer on the Arduino. I don’t really have any time logged for this since furious forum searching doesn’t count towards Stardust, but I can promise you that after two hours of checking docs and datasheets, as well as running a test that took like ten minutes, I’ve nailed down the issue. The bad news: there isn’t really a way to actually fix it, only to get around it. I could use a second Arduino to receive the values and send them over serial for the main board to use, but I’m not loving the idea of sacrificing another board to this project. I need the two working Nanos I have for other projects. Our other option is to abandon the ir receiver altogether and use Bluetooth instead, which is fine but will require a steep learning curve, as I have no idea how to make an app. MIT App Inventor, here I come I guess. Since my partner in crime is still at camp until next Sunday, I won’t be able to make a decision, so I guess this is it for now. More on the amazing adventures of R2-D2 will be shared when we have something to share.
Folks, it’s not looking great. I think that the irRemote library that I’m using is using the same timer as the servo library, so I made a test sketch without remote control. The servo and sound work great in that sketch, but the motor still won’t turn on. I’ve tried using another motor driver and changing my power supply, but the thing won’t turn on. The motor itself isn’t busted - I checked - but there’s something going on. Over the next few days, I’ll do some more in-depth debugging for that, and try to reintegrate the remote control. My sister is going to camp for the next two weeks, though, so once I make the remote control work I’ll leave it alone until she gets back.
Big day- soldered a switch onto one of the battery connectors for this project and two for another, laid down for two hours to recover from fume headache, made a circuit diagram for the project and tried to fit everything on the internal frame in a slightly different way. Unfortunately, I wasn’t able to record a timelapse while soldering because I was at the library to use their soldering iron. But it went pretty well! Over the next few days I’ll keep looking into solutions for our remote problem so hopefully we’ll be ready for our first ship soon.
We’ve hit a bit of a wall with the remote control code. At first, the tester code worked fine - the LEDs turned on and off with the push of a button. But when it came to the gate controlling the motor, it would turn on, but never off. I thought that this was a problem with the gate, as I’ve run into something similar with another project, so we borrowed a motor driver from the robotics club supplies and hooked it up. Now, though, the damn thing won’t even start. It will take one command from the remote - turn the steering servo. Then it won’t do anything else. I don’t know exactly what’s wrong, but I’m going to check out some other documentation and tutorials that might have answers. In other news, my sister now has a Stardance account: @Winter314. She’s awaiting verification, but after that there will be some updates from her too. Too bad two people can’t share a project - that would make things easier because I don’t know exactly how we’re going to ship this.
R2-D2 is coming along nicely! It’s a joint project between my sister and I, but she doesn’t know much about coding and hasn’t signed up for Stardance, so it’s all on my account. The chassis of the robot is from a kit we had when we were in elementary school, but support for the original app was discontinued a few years ago. We’re reviving it with an Arduino Uno, the original motor (which is fixed to the internal frame and wheels), a replacement servo motor to steer the robot, an IR receiver so it can be remote controlled, some LEDs and a buzzer. I found an R2-D2 sound generator for Arduino that I tested and it sounds just like the droid. We’ve divided the project into a few phases: First, get the remote control working with the internal frame and have a functional (if ugly) little robot. Then, make it possible for R2 to roll around on his own with an ultrasonic sensor to navigate. After getting both modes working, we’ll put the internal and external frames together, which will involve a lot of problem-solving. We’ll ship the project after each phase, mainly to keep it organized. So far, we are well on our way through phase 1. I’ve put all the components on the internal frame and written a test sketch for them. My sister also put the decals that came with the kit on the external frame. The next step is to log the remote control values and have R2 know what to do when he receives the values.