Components for this book

I have tried to use a minimum of electronic components for the code examples in this book. The emphasis after all is on the C language and the ways that a program’s C code can support the objectives of an Arduino based project. Having said that, the whole purpose of an Arduino is to provide an intelligent response to sensors and actuators. I have therefore drawn up a short list of components, add on boards and generic shields that will further the readers experience and which have a good chance of being re-used in future projects.

Everything listed is easily available from a wide variety of sources. Anyone keen to minimise their initial expenditure on parts might like to draw up their own selective list and order things directly from suppliers based in China. The best prices there usually mean a wait of a few extra days over those supplied from local sources but prices are typically very much lower. An early order could see components arriving in good time to apply them to projects as the book progresses.

Arduinos

I conducted the vast majority of my software and project tests using two Arduino Uno clones which at a little under £7 each could be considered very reasonable items. I also used an Arduino Due to run software tests on a 32bit device. Everything in this book will run on a Uno, Nano or similar 8 bit board except for the chapter detailing a skylight closer project that targets a MKR WiFi 1010.

Solderless Breadboard

I got one of these about 16cm long for less than £2

Jumper wires

Preformed jumper wires are ideal for connecting the female pinout sockets on the Arduino with components on a solderless breadboard. Jumper wires with insulated sleeves towards their ends are the best although a home-made version would do just as well. A perfect set-up would include a mix of male to male jumpers, male to female jumpers and female to female jumpers. Packs of jumper wires are available from a very wide range of suppliers. Multiple colours would be an asset.

Semiconductors and chips

1 x PN2222 transistor
1 x 1N4001 diode

1 ULN2003A chip. This is not required if you elect to get a stepper motor with one built in to a combined driver board. If you buy the chip you might find a dip 16 socket helpful although I got a better connection to the breadboard using the chip pins direct.

1 X RGB LED with a common cathode

Red, Green and Yellow LEDs. I got a box with 300 LEDS with 5 colours and two sizes for around £5 but if purchased individually buy a minimum of 2 green, 2 red and 1 yellow.

Switches

Push to make (micro) switch suitable for breadboard – 2 would be good

Resistors

5 X 330 ohms
1 X 1k ohm
2 X 20k ohms

1 Potentiometer with a nominal maximum value of perhaps 10K ohm (a higher value should be fine).

Electro-mechanical

1 X 8Ω 0.08W Miniature Speaker or similar

1 or 2 small servo motors. Look for multi-buy offers as these can drop the price to below £2 each.

A unipolar stepper motor. The widely available 5v 5 wire 28BYJ-48 which comes with a small driver board and a ULN2003 chip is great for experimentation and currently can be purchased as a multi-buy for around £2 for a motor and driver board combined.

1 or more 5 or 6 volt DC motor with leads

External power supplies

I variously used a 9 volt DC “wall wart” and a 9 volt battery with a pp3/jack adapter for direct connection to an Arduino. I also used a battery box containing four rechargeable AA batteries for an independent supply to a motor driver shield.

General

Bluetack or similar to help hold components that do not plug into a breadboard in place on a work surface.

Search for and print a good Pin Out diagram of your Arduino(s). Some are better than others, you will want one that identifies the capabilities of each pin.

While you are doing that, why not search for the data sheet for the ATMega (or other) processor used by your Arduino. This can make fascinating browsing even if a lot of the detail is a bit esoteric when first coming to grips with this microprocessor board’s capabilities.

Other components

The text also includes the following peripheral components that are worth adding to your shopping list as they should prove to be useful for later projects.

IR Speed sensor modules (each adapted with a 0.1uf ceramic capacitor and a 20K resistor).

Motor driver board – most can run multiple DC motors and some, optionally, stepper motors and servos. The chapter on the motorised skylight opener explores the use of a small board based on the TB6612FNG dual motor driver chip and these are available at low cost and can be applied across a range of DC motor projects.

An SD card reader/writer is used in one of the communications projects and one of these could prove very useful in a number of contexts.

You might like to experiment with some nRF24L01+ 2.4GHz wireless transceiver modules although, if you do, I would advise sourcing the recommended 3.3 volt boards that plug in and provide a steady power supply.

Single colour LED pin Identification (in case of need)

An LED will usually have a flat edge (might help to look from above). The pin adjacent to the flat edge will be the negative pin (cathode).

The longer pin (assuming you have not modified one or both) will be the positive pin (anode).

If all else fails have a squint into the plastic casing. You should be able to see two distinct parts, a small straight part and an L shaped part. The small pin is the positive pin and the larger (L shaped) pin the negative pin.