Since the last post I added speed control, cleaned the code up a bit, and got rid of the cable.
Post 6: Requirements met, but there will be more
So after 12 hours of almost continuous work we finally got the car working! This is intended as a tentative demonstration video. We’ll have improvements added by the new deadline on Sunday!
Post 5: through the smoke and flames
Post 4: a small tank in a big world
Tuesday and today have been productive. In lab on Tuesday we assembled the tank chassis. It was a little bit tricky because of poorly-written instructions, but we were almost able to finish.

At around 10PM we had to take links off of the tread so that it would fit over the wheels. We weren’t able to figure it out so we put it off till later. Today I brought a old compass with a sturdy needle with which we were able to get the tread installed properly.
We spent most of today repurposing the code from lab 3A so that a phone could send signals to the car via Bluetooth. Controls from the phone would be sent as a byte which we can interpret as a single character.
We realized that the code we were repurposing wasn’t actually using the interrupt handling function that was in it. That thing was just there as a model. The path forward became clearer to us:
- write code so a received byte over Bluetooth triggers an USART interrupt
- have the USART interrupt trigger a signal via I2C or SPI (whichever we decide on) which would tell the motor controller to take the appropriate action (move forward, left, etc.) based on the value of the received byte
Post3: Repurposing bluetooth technique
In this week, we repurposed the code for lab3 part A. Previously in part A, we used bluetooth module to set and reset the LEDs on STM. For the purpose of our project, we want the bluetooth using UART to send signals to motor controller and the motor controller send voltage signals to DC motors. The first half of the code is finished. Also, we figured out and ordered the battery we are going to use to power up STM board without the USB cable. All parts have arrived except cr2032. We started on assembling the hardwares.
Post 2: scrambling to make this post
I’ve been busy with another class so I had to scramble a bit to meet this deadline.
A few things that I’ve done for the project since my last posting:
Finished Lab 3a
Lucky for me the HC-05 bluetooth dongle used in lab 3a is relevant to this project. I was able to get it to pair with an Android phone and a windows laptop and turn the LED on and off.
Reaching out to get some Legos
I’m still hoping it’s possible to make a front engine, rear wheel drive car with a front wheel turning mechanism instead of the tank, so I reached out to the robotics professor to see if she’d let me use the Legos the robotics students get to use.

Buying the parts
Yesterday I placed orders for the remaining parts. Looking forward to assembly and programming of the rest.
Post 1: figuring out what to do
We chose the idea of a Bluetooth controlled car because it sounded fun and achievable and now we’re hashing through the details. At first we thought we would use Lego Technic pieces (the ones with all the gears and rods) but they look pretty expensive and it’s hard to know what parts would work without having them in front of you to play around with. I’ve seen a room in HFH where people are working with them so maybe we might still use them if we can play with them with our own hands and see how well they would fit our purposes.

While it would be really cool to construct all the machinery of a car in miniature (turning mechanism, front mounted motor with driveshaft going down the length of the chassis) we’re not mechanical engineers. The chassis kits we found online that had turning mechanisms marketed towards RC enthusiasts looked really cool were too expensive. We’re being graded on our ability to control peripherals, not construct RC cars, so we looked for cheaper options.

The cheapest chassis kit we were able to find so far that seems to fit our requirements is this little tank chassis. It’s simple and seems easily reconfigurable, so this is probably what we’re going to go with. Here’s the plan so far:

The HC-05 Bluetooth module communicates w/ the STM32L board via UART, so that’s one peripheral and one serial communication protocol. The Sparkfun serial controlled motor driver can be communicated with over I2C, SPI, or UART and controls the DC motors. Both motors spin one way to go forward, and spin the opposite way to go backwards. Turn left by not spinning left motor and spinning right motor forward. Visa-versa to turn right. Maybe for a stretch goal we can put a swinging turret on top that shoots rubber bands 😛
- TP101 tank undercarriage kit
- SparkFun serial controlled motor driver
- HC-05 bluetooth module
- Batteries TBD