Framework powered autonomous RC car

Hey all, figured it’s about time I detail the project I was selected to recive a mainboard for. I’m a member of the University of Michigan Dearborn’s Intelligent Systems Club, where we regularly deal with mobile robotics. This coming year, we will be creating an autonomous go-kart to compete in evgrandprix, where our kart will be attempting the fastest time trial without any human intervention.

While this is cool and all, we of first have to get our feet wet with programming car-like vehicles, which is quite a different experence due to their Ackermann steering setup. Learning on the $8000 kart sounded unwise, so we decided upon another route…

The TinyKart™️

As it turns out, RC cars are quite hackable. This makes them a great target for a DIY automous vehicle on a budget. We arn’t the first to have this idea of course, MIT racecar and F1/10 are both well established autonomous RC car programs. What we aim to do then is to create a much more freeform and lower budget equivelent for (for now) internal use, which we hope will provide a strong learning platform for new and old members alike.

As we progress through the project, we will be open sourcing our software, electrical, and mechanical components, as well as providing the appropriate documentation such that others may follow along.

The Fun Part

Unfortunatly, much of the planning for the electrical and mechanical components are a little in the air, as my mainboard has not shipped yet, and our original RC car gave up the ghost. Nonetheless, here’s a brief overview of my TinyKart:

Components

  • 1/10 RC-car, likely a Traxxas Slash
  • Rpi Pico as our ESC and servo interface
  • Framework Mainboard as onboard computer
  • LD06 2D LiDAR (connected over UART to PC)
  • BNO055 9dof IMU (connected over UART to PC)
  • 2s LiPO dirty power
  • 6s(?) LiPO for control power
  • Garage door opener relay as e-stop

Layout

Here was the original layout for the old car, subject to change now that we can no longer use that one (replace any instance of NUC with mainboard, we use NUC as a synonym for ‘small PC’ for some reason).

Software

The software is split into two peices, that peice that runs on the pico, and the rest on the mainboard.

The pico component will host a uart interface, react to commands, and then control the steering servo and ESC over PWM. I’ve used this project as an excuse to try out embedded Rust, which is something I’ve quite enjoyed using.

The mainboard side of things will run ROS2 Galactic on Ubuntu 20.04. I’m quite familiar with ROS2 from past work, so I’m currently planning on using Navigation2 for path planning, primarily for simplicity as we get the rest of TinyKart off the ground. Another benifit of ROS2 is Gazebo, which should provide a nice simulation enviornment for tuning nav while the electrical gets worked on.

“Power”, or “The Hard Part”

The biggest question that comes with using the mainboard is power. This is because I need to go through USB-C PD, rather than just a plain DC barrel, which is what we tradionally use. I’ve seen conflicting reports of external battery power needs across this fourm, but the consensis seems to be somewhere between 45 and 100w - quite the range. To actually get the power from the LiPO, I’m looking into first running it though a low voltage cutoff circut, then through the estop, then finally thorugh something like this board I found on amazon. Unfortunatly, these seem quite power limited, so I would appreciate some feedback on a better way to do this. This is honestly pushing my knowlege of electronics, so I’d like to give some credit to my teammates, who are helping design much of the electrical.

A demo

Finally, here’s a demo of the microcontroller control, which is the first peice of code I’ve got completely done:

And a small explaination of how I got that set up:

I’ll be updating this thread as I progress, as well as posting links to components as we open source them for refrence.

Thanks again to Framework for this oppertunity!

Links

Pico controller code

10 Likes

This is awesome.

When I moved house 3 years ago I found out that there’s an RC car club with an international competition standard racetrack in the next village, so I was really interested and planning to do an autonomous build with alternative power sources and such just for the fun of it.

Unfortunately, when I actually looked into club membership, I found that the ‘rules’ regarding cars are so prescriptive that you’re basically only allowed to change the plastic shell on the top, and theres even a rule for that (must be an existing production car). All the internal components must be identical between cars and chosen from a list of ‘approved’ parts provided by the club.

I very quickly lost interest in the idea.

@Peter_Schofield

Yeah, stock racing can be a little limiting. It makes sense when you consider that without limiting hardware, the races can become “pay to win” if you will. We were actually originally considering running TinyKart like this, but decided against it once one of our members wanted to try running vslam off a switch joycon IR camera. I feel like letting people just go wild is much more fun, and also promotes finding neat tricks.

According to the USB power meter I bought in support of my own project, my Framework laptop with charged battery, ~100% CPU utilization and max fan, seems to draw 19.7V and 2.5-2.8A range over from a 100w USB-PD power supply. Next step is to try the board without battery to see if the consumption is the same or different. My guess is subtract .2 to .4A from the above if it’s not driving a display panel.

I cannot vouch for the accuracy of my cheap Chinese USB power tester, but it’s better than no values at all. Hope this helps.

1 Like

Thanks for the measurements, although I don’t have a battery, and from what it sounds like from across the forum, that’ll matter a lot. Presuming you do have a battery, is it physically possible to fold the battery under the board? I’m not sure how flexable the connector is, but if it is flexable enough, I could always just get one from marketplace once avalible and run purely off the interal battery. Honestly this is a much cleaner solution overall (and enphisises the mainboards advantages), but I kinda doubt it’ll be able to fold under the board, thus becoming much too large.

Alright, so a ton has gotten done now. First, I’ve got what I think is an MVP of the final software here: https://github.com/andyblarblar/TinyKart. Sim is fully working, so if anyone with ROS2 experince want’s to check that out, they can.

Here’s a short demo of a computer controlling the kart:

Secondly, we’ve designed a new chassis for a Traxxas Slash! Here’s an overview:


We’re printing it right now, so we’ll see how well it turns out. If it works well, then I’ll add the files to the github repo linked above.

Finally, we’ve made a ton of progress on the electronics. One of our members has designed and tested a buck converter with low voltage protection and a per cell readout screen for the laptop battery, which is huge. Right now it’s just in breadboard form, but seems to be testing well. For the moment being we’re using a NUC to test, as I still haven’t gotten my board and we haven’t figured out the usb-c issue yet.

We plan on testing the full kart whenever the electronics and print are done, so hopefully we’ll see this in action soon.

Can you team up with this guy here:

That way, the world record would be “World’s Fastest Autonomous RC Car”…with a Framework mainboard.

…or this guy: