Thinking of getting Raspberry Pi for Robotics?
As I started looking into purchasing a Raspberry Pi for robotics projects, I thought I had done enough research, I had looked into the different variants of it, the versioning scheme, read the reviews on Amazon and I thought I had it all figured out. After a couple of days of thinking about it, I placed the order to get a new Raspberry Pi 4 64-bit with 4Gb RAM. I knew I was taking a little bit of a chance since most of the tutorials for installing Ubuntu and ROS2 on it were talking about Raspberry Pi 2 or 3. But I figured I’m going to figure out what needs to be figured out and why not buy the latest version of it.
Here are some of the quick things I learned along the way from placing an order and finally getting the Ubuntu running on the Raspberry Pi 4.
In my initial Order I ordered following things as suggested on Canonical Blog to build your first robot.
- Raspberry Pi 4
- a Power Bank — I had seen the videos of folks running the robot with a rechargeable power bank and I thought that was cool instead of burning use and throw batteries. I went with PowerAdd EngergyCell 10000 which was around $16 bucks. However, I would say go with something that has USB-C power built-in. See my lessons learned #1. This one PowerAdd 20000 from same company is for about 10 bucks more and has USB-C and double the power capacity so it would last longer while using with the Pi or robots.
- Two Micro SD Cards each 32 Gb — there was a deal for two Sandisk cards for $15 bucks
- Wireless Controller [X-Box or PS controller] as suggested in the same article. Make sure to check the back of the transparent packaging as the tiny wireless USB receiver is easy to miss and accidentally get thrown away in trash.
- In addition, I had ordered the robot kit suggested in the Canonical Blog from The Pi Hut [UK].
I knew that the UK order would take sometime to arrive as I didn’t use faster shipping and I figured I’d get the Raspberry Pi up and running with Ubuntu until it arrives.
Here are all the things I did wrong and hope if you are jumping into it, you can benefit from my experience:
- Lesson #1 — I found out the hard way that Raspberry Pi 4 only comes with USB-C power jack. So the power bank I had bought would have been useless. Fortunately, I got a couple of USB-C cables and was able to still use the same power bank with it.
- Lesson #2 — The Raspberry Pi 4 I purchased was barebones version as I didn’t want to spend a lot on a full kit. Basically, it came with the Pi itself, nothing else.
- Lesson #3 — While working on the Raspberry Pi, I actually dropped the whole thing on floor because the power cable was pulling it down from the table and I didn’t have anything to hold it down or put some weight on the cable so it didn’t pull it down with its weight. Amazing how lightweight the Raspberry Pi itself is, so you have be careful. Fortunately, nothing bad happened and it is still running fine. I learned that investing in a good case to hold the Raspberry Pi is very important to avoid mishaps like that.
- Lesson #4 — I was hoping to SSH into the Raspberry Pi when it powered up. However, I ran into several networking issues due to the way my router was setup and really needed to see on screen what was happening as I booted the Pi. I would definitely recommend getting a mini-HDMI cable to connect with your monitor and a USB Keyboard. The monitor/keyboard came in very handy in troubleshooting all sorts of issues in the beginning.
After everything said and done this is what I would recommend you think about when you place your order so you don’t have to wait around for all that stuff to arrive:
- USB-C Power Supply — Definitely plan on including USB-C Power Supply for Raspberry Pi. I ordered this one from CanaKit. Its pretty basic but it works well and comes with a power ON/OFF switch that you can add between the power cable and Pi which allows you to turn it on/off without unhooking the power cable. This one is great while working with the computer as you don’t have to worry about recharging the power bank and it will plug right into power outlet.
- mini-HDMI Cables from CanaKit — this was one of the lessons learned earlier and I would have been better off ordering this in first place. I was pleasantly surprised to find this for about $10 which included two cables.
- Raspberry Pi 4 Case with Fan & Heatsink — I know it sounds a bit too fancy but after dropping it down from table once I would rather protect my investment and keep the Pi in good shape. I ordered this one by iUniker. I was delighted to install Raspberry Pi in it. The whole product was put together with a lot of care for end user. It came with screws to hold the Pi to the case, a fan with all wiring included, heatsinks for 4 main chips on the Pi board. They even included a screwdriver with magnetic ability to lift the tiny screws easily. The case itself is beautiful and everything was high quality. All the parts snapped-in easily and if you made a mistake you could switch it around without breaking anything. The cutouts for all input/outputs like power, HDMI, USB and SD Card access were perfectly placed and they included a very nice and easy to follow instruction manual with it. I got the Raspberry Pi installed and running in it, in less than 15–20 mins. Kudos to these guys, it’s a really great product.
- [Optional] USB-C Cables — I also ordered these USB-C cables from Anker to see if I can get the power bank to work with Pi and make it more portable to install it on top of the robot. Good news is the Anker cables worked perfectly with the power bank and it was able to power up Raspberry Pi 4 without any issues. I purchased 3-ft ones to keep the clutter to minimum and I’m glad I did because they are just right. The quality of cables is superb and they came with a good quality tie to keep it organized. Always been happy with Anker products, they normally do a great job with product and packaging.
The only other thing I would have done different about the Raspberry Pi itself is to order one with some more RAM. I got 4 Gb one but wouldn’t mind getting 8 Gb version to begin with. I’m mostly planning to run Ubuntu in server mode so it should be pretty lightweight but if you are planning to run Ubuntu Desktop on it, it may need some more memory. The price difference is not that much and you are not going to purchase the Pi too many times so might as well error on side of getting more RAM than less.
That’s it. Hope your experience of getting Raspberry Pi up and running for your robotics projects goes more smoothly than mine did!!
Next time I’ll go over my experience of installing and getting Ubuntu server up and running on the Raspberry Pi 4.
Here are some of the pictures of components.