Arduino projects as an intro to Embedded Systems programming


https://www.flickr.com/photos/bekathwia/6185361743

Embedded Systems can be hard to wrap your head around if you’ve never worked with them before. Debugging is difficult without using trial and error, because there often is no debugger built in on the system you’re working with. But, embedded software is everywhere around us! If you’ve ever used an elevator or an automated sink or even a microwave….you’ve used an embedded software product!

Because of its prevalence and usefulness, it’s vital for software engineers to have at least some degree of familiarity with computer architecture and circuitry. I’ve been working with Arduino for two years now, and with what I’ve learned through my various projects, here are some resources and projects I’d recommend for anyone interested in learning to use one of the coolest open source products out there: the Arduino!


Kits and Materials

At the top of the list, I have to put Arduino themselves (https://www.arduino.cc). They provide all of the great technical details you could ever need about their products, and you can purchase directly from them. They offer a lot of their products in bundles and kits that make ensuring your parts are compatible even easier. You can even buy a robot arm kit from them, the Arduino Braccio. If you’re just starting out, I’d recommend using an Arduino Nano to get the basics down before moving on to the Uno. Or, dive in head first and go straight for the ARM-processor Due, you do you. I’d recommend their plant watering kit for beginners:

https://store-usa.arduino.cc/products/plant-watering-kit?gclid=CjwKCAiArY2fBhB9EiwAWqHK6txGuN4rjeh_2Rf565O6HpqB9RuvX-yljlg6ybb5bDVFzYNztfLXIxoCnNUQAvD_BwE

My second favorite resource is Sparkfun! They carry a lot more than just Arduino parts, you can also get Raspberry Pi parts and many other electronic parts from them. I once purchased the guys of a keychain camera from them for a project and they had a video on how to hotwire the camera. There are so many fun things, like the MyoWare Muscle Sensor which can detect muscle activity using electromyography. Another system of Sparkfun’s that makes implementing hardware super easy is their Qwiic cable system. Qwiic is a universal connector that allows you to plug and play I2C components, making wiring them up wrong impossible. Sparkfun also sells their own version of the Arduino, called the Redboard. If you’re interested in vehicles, I’d recommend their RedBot car kit:

https://www.sparkfun.com/products/12649

Similar to Sparkfun, is Adafruit. They also produce parts of their own, as well as supplying various other parts for your projects. Especially when it comes to visual displays like miniature LCD screens, LEDs and light strips, Adafruit is your best friend for fun and wacky parts. They also supply the Black Magic probe, which is, amazingly, a debugger for Embedded Systems!

https://www.adafruit.com/product/3839

Lastly, Microcenter! They don’t have physical stores in every state, but if you have one near you, then use it! Usually the employees are passionate and knowledgeable, and they have a wide selection of parts you didn’t even know existed. My local store has an entire wall just full of different LEDs for small projects like Arduino, Raspberry Pi, and custom RC vehicles. Sometimes it’s nice to go in person to see a part before placing a purchase, and sometimes Microcenter can be a bane because you walk out with 3 other parts you didn’t come looking for. Either way, I’d highly recommend them.

Tools

Moving on to tools, a standard list of tools you might want are the following:

  • Soldering Iron and solder
  • Flush wire cutters
  • Jumper wires, Qwiic cables, breadboard wires, or 18g tinned copper wire
  • Electrical tape
  • A breadboard
  • Logic level converters to adjust from 3.3V to 5V and/or vice versa
  • LEDs of varying size and colors
  • A set of resistors and diodes
  • Small size phillips-head screw driver set
  • Small size socket wrench set
  • various screws, nuts, bolts, and washers (generally M3-sized)

These are tools I’ve used on a pretty regular basis with all of my Arduino projects. You’ll of course also want a power supply, such as a portable phone charger, a bank of double-A batteries, or a wall plug. If you have a lot of cables going on in your project, then you may also want to look into some zip ties for cable management’s sake.

Projects and Ideas

As your very first project, it’s hard to go wrong with Blink(). In my experience, Blink is like Arduino’s version of Hello World. You hook up an LED and some resistors to a breadboard, add an Arduino board and some power, and make the LED blink. The resistors are important so you don’t make the LED explode from overpowering it, but this code will be the basis of all other Arduino code you’ll write.

A Fritzing diagram of the hardware setup for Blink
The Arduino-provided code from Blink(), which is a part of public domain

Arduino, of course, has their own project hub, which I cannot recommend enough. There is such a wide variety there, so check it out for yourself: https://projecthub.arduino.cc

Once you’ve mastered Blink, you can start to introduce more complex sensors. Interested in making your own speed detector? Just get a time of flight distance sensor and measure how far away an object is, wait for a set amount of time, measure again, and calculate the speed based on time and distance!

https://blog.arduino.cc/2021/06/29/diy-radar-speed-sign-looks-and-works-like-the-real-thing/

Or maybe you’re interested in the weather? Get an air quality sensor and measure the readings multiple times a day. Have the Arduino board report this data to the Arduino IO app and you can see from your phone what the air quality is at any given time!

https://www.hackster.io/Daini/iot-wireless-weather-station-using-arduino-04ab0b

One last project I have to recommend, simply because it is so inspiring (at least to me, personally), is a cubic LED matrix, programmed with “animations.” See the video below by Malt Whiskey on Youtube:

https://www.youtube.com/watch?v=ciaFar8nfHc

Once you’ve got a single sensor down, it’s easy to start adding more sensors, and suddenly you’re creating complex and interdependent systems that can perform truly amazing tasks, like autonomous cars, motion-triggered sprinklers, and a robot arm that waves when you wave!

So, if you’re interested then seek and ye shall find, because the internet is your oyster!

https://www.rs-online.com/designspark/building-braccio-the-tinkerkit-robot-arm
Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *