Intro: Arduinos for Beginners Workshop
This is a guide to running a workshop in the basics of Arduinos, suitable for small groups to classrooms. I originally ran it as a workshop for 6 to 9 first year university students, but it could be run for students from around 14 years and older.
It took my group of students about three to four hours to go from no programming or electronics experience to building arduino controlled cars. The goal of this workshop is to encourage students who might be intimidated by arduinos to feel more comfortable in using them in later projects as well as helping them to understand exactly what sort of projects an arduino makes possible.
Step 1: You Will Need...
Equipment you will need:
- A glue gun
- A soldering iron
For each group of 2/3 students, you will need:
- the laser cut car parts(This can also be cut out of thick cardboard by hand. There are also companies that will laser cut files for you then post the cut products back to you.)
- two resistors (220 ohms)
- two motors that run at 5V
- two transistors
- two LEDs
- a breadboard
- wires for the breadboard
- wire for soldering
- an Arduino (We used Funduino Unos)
- Some wire for an axel
- Laptop or computer with the arduino software installed and internet access
- rubber bands for the wheels
- Printed handout
Step 2: Introduction Talk and First Exercise
Distribute the handouts and each group's set of equipment. By going through the handout and explaining each step, you can cover the basics of electronics and programming. Most students in the UK have already learnt the basics of electronics in their GCSE physics and many students nowadays have already learnt some basics of programming.
When you have finished the introductory talk, get the students to try making the LED blink. The code for this is in the handouts and with minor supervision then you can have each group wire up their own circuit. By then challenging them to make the LED blink SOS in morse code, they will teach themselves how to vary the delay time and how to adjust variables to customise code for their own purpose.
The most common errors I found were typos in the code from forgetting the semicolon or forgetting that programming is case sensitive, or uploading errors when the port was set incorrectly. If the port option is greyed out under the tools menu, restart the program while the arduino board is plugged into the computer and this should solve this error.
Step 3: Second Exercise
When they have one LED blinking in morse code, the next step is to have them programming two LEDs to blink separately. There is the code for this in the handouts, and this should lead them into connecting the LEDs into two separate pins. Try and lead them into grounding a row at the bottom of the breadboard so that only one GND pin is used on the arduino board itself. Once the students have completed this, make them take a break. I tended to send them off for half an hour, since without this they would lose interest within about half an hour of this point.
Step 4: Soldering and Assembly
The next step is to get everyone to solder wires onto the motors. I used enamel coated copper wire, so I had everyone first scratch the enamel off the ends with a scalpel. If you have a large group and cannot supervise everyone then you can also remove the enamel with sandpaper, or use another kind of wire. Keep students using the soldering iron under supervision at this point, since the soldering iron is hot and students may not expect the solder to melt as quickly as it does.
At this point, you can also have students start to assemble their cars with the motors inside. This will slow down the number of students trying to get to the soldering iron at once and make it more manageable.
Step 5: LEDs to Motors
The code to make an LED blink is identical to the code needed to pulse a motor on and off. When you have explained this to the students, they mostly tend to then catch on that they already have the code written to move the motors (and therefore each of the back, powered wheels) independently. Some students might need more help understanding this idea – the main issue I found was the students would name their variables LEDPin, then assume the computer knew an LED was attached. A quick demonstration by swapping the LED for a motor tended to fix this very quickly.
When the students have the motors working, they can solder on the transistors and resistors to make a reasonably permanent circuit that can be plugged into the arduino. The cars can now be decorated and the students can race them or try and steer them along a pre-drawn track. It is worth sticking the rubber bands to the wheels to help provide more grip or else the cars might not move particularly well.