HackerBoxes Starter Workshop

The HackerBoxes Starter Workshop was designed to provide an entry point for those wishing to get started in the hobby of DIY electronics. This includes those interested in joining the HackerBoxes monthly subscription box. The Starter Workshop is available here.

Projects in the monthly subscription HackerBoxes are not exactly for beginners. They generally require some prior DIY electronics exposure, basic soldering skills, and comfort working with microcontrollers, computer platforms, operating system features, function libraries, and simple program coding. We also use all the typical hobbyists tools for building, debugging, and testing DIY electronics projects.

The Starter Workshop provides a nice set of basic tools and supplies while also leading the participant through these important Topics and Learning Objectives:

  • Identifying Common Electronic Components, Tools, and Supplies
  • Working with Solderless Breadboards and Power Supplies
  • Understanding Voltage, Current, Resistance, and Ohm’s Law
  • Using Digital Multimeters
  • Working with Voltage Dividers
  • Interfacing to Microcontroller Boards from your Computer
  • Wiring and Coding Arduino Projects (30+ Exercises)
  • Installing and Using Arduino Libraries
  • Integrating Hardware Modules into Arduino Projects
  • Using Soldering Tools and Best Soldering Practices

HackerBoxes is the monthly subscription box service for DIY electronics and computer technology. We are makers, hobbyists, and experimenters. If you would like to get this HackerBoxes Starter Workshop or receive the HackerBoxes surprise subscription box of great electronics projects in the mail each month, please visit us at HackerBoxes.com and join the revolution.

HACK THE PLANET!

Step 1: Workshop Contents

Using the images above, take a few minutes to familiarize yourself with the name and appearance of each item that is included in the HackerBoxes Starter Workshop. Even if you are following along with your own materials, this is a nice array of parts and supplies for you to make sure you have on hand. Either way, reviewing these items and their names will help us know which of the various parts to use in a particular experiment.

A very important additional thing you will need is a real sense of adventure, DIY spirit, and hacker curiosity. Starting in DIY electronics as a maker, experimenter, and creator can be an exciting challenge. While this type of hobby electronics isn't always easy, a great deal of satisfaction may be derived from sticking with it and figuring things out!

VERSION NOTICE:

On November 28, 2018, there were some subtle, but potentially confusing, changes to the contents of the HackerBoxes Starter Workshop. This Instructable has been updated to refer to Starter Workshops purchased after that date (v4). If you purchased a HackerBox Starter Workshop prior to that date, please download the PDF included here for "Starter Workshop Guide v3".

Step 2: Solderless Breadboard

Solderless breadboards are great for prototyping or experimenting with electronic circuits and systems.

This drawing illustrates the four areas of the typical solderless breadboard.

Areas A and D are "power rails" generally used to conduct the plus and minus voltages for your power supply across the entire length of the board. For example, the blue lines might be grounded (ZERO VOLTS) and the red lines might be tied to the 5V supply line (often used as LOGICAL HIGH or POSITIVE SUPPLY).

Areas B and C are "terminal strips" generally used to connect the terminal pins of various circuit components. Note that Area B is separated from Area C by a gap of exactly the distance between the two pin sides of a Dual In-Line Pin (DIP) Chip. That is why the terminal strips in Area B and Area C are not connected with each other.

Jumper Wires having pins or stripped wires on each end may be used to connect between the terminal strips as needed. The jumpers may also be used to connect the power rails into the terminal strip areas where needed.

Have a look at this great tutorial from our friends at Sparkfun introducing how to use a solderless breadboard. Note that the end of that tutorial shows some examples for building your first circuits on the breadboard using some LEDs. We will be getting to that in the next few steps, so you might want to stop when you get to that part of the breadboard tutorial.

Step 3: Powering Breadboard Projects

The Breadboard Power Supply Module plugs onto one end of the solderless breadboard to provide 3.3V or 5V to your circuits. The Power Supply Module can be powered using a micro USB cable connected any typical 5V source such as a wall outlet adapter, a USB power band, or even a computer.

Be sure to line the positive and negative pins up to the correct power rails. If they seem backwards, rotate the power supply to the other end of the breadboard.

Each of the two power rails can be independently switched to either 5V or 3.3V. Note that 3.3V is sometimes shown in shorthand as 3V3. Similarly, a 4.7 ohm resistor may sometimes be labeled as 4R7.

For now, set both of the 3.3V/5V jumpers to 5V since we will be working with 5V Direct Current (DC). Wikipedia can tell us more about Direct Current.

Step 4: A Simple Breadboard Circuit

So let's build our first simple circuit on the solderless breadboard. The circuit in the schematic allows current to flow from a 5VDC source through an LED (light emitting diode), through a 1,000 Ohm resistor, through a switch, and finally to ground.

Of course the current only flows when the switch is closed or pressed. The LED will only work in one direction. If it doesn't light up when you close the switch, try flipping it around. Once the LED is in the correct position, you will note that the long pin goes towards the positive (+5V) power terminal.

The 1,000 Ohm Resistor is also called a 1K resistor and features colored stripes in the order brown, black, and red.

Step 5: Resistance and Resistors

So what's up with the resistor that we used in our first circuit?

A resistor is a two-terminal component that implements electrical resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines, among many other things. Fixed resistors have resistances that only change slightly with temperature, time or operating voltage. Variable resistors can be used to adjust circuit elements (such as a volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or chemical activity. (see Wikipedia)

Resistors are measured in the unit OHMS, which we will learn more about shortly.

The resistor we used inline with the LED was to limit the current flowing the LED so that it did not overheat and burnout. Think of it like a safety valve.

Step 6: Digital Multimeter

The digital multimeter (DMM) is an electronic measuring instrument that combines several measurement functions in one unit. A typical multimeter can measure voltage, current, and resistance. DMMs have a numeric display for representing the measured value. The DMM in the HackerBoxes Starter Workshop comes with its own test probes and the workshop also includes a pair of clip leads for when you need to work handsfree.

Here is a great video about how to use your multimeter.

Step 7: Measuring Resistance

Using a digital multimeter, and a pair of clip leads, put a resistor between the clips and plug the leads into the COM (common) and Ohms terminals. Set the range dial on the value of ohms just greater than your resistor, or start that the highest resistance and work your way down until something measures. The illustrated example shows a 1K resistor that actually measures at 0.950 K, which is not unusual at all. Work through some examples on a resistor color code chart to compare the marked (nominal value) with the measured (experimental) value. Note the tolerance band. A lot of resistors are +/- 5% or even +/-10%, so a 100 ohm resister may actually measure as 90 ohms or 110 ohms.

Step 8: Voltage and Current

Voltage is the difference in electric potential energy between two points. To make an analogy, when talking about mass, gravitational potential can be thought of as how high something has been raised off the ground and thus how much energy it has to release when it falls to the ground. Similarly, a charge at 5V potential has more energy to expend getting to 0V (ground) than does a charge at only 2V. Voltage is sometimes called "electrical pressure" because it is a bit like water pressure. To give the tap water in your house pressure as it flows out of the faucet, water is often pumped uphill to a water tower. The higher the tower (gravitational potential above the ground), the more pressure or the harder water can push through the pipe. Similarly, the more voltage (electrical potential raised above ground), the harder the electrons can push through the wires.

Electrical current is very similar to the notion of water current in a river or a pipe. Current is how much stuff (electrons in this case) flow through per unit time. Gallons-per-minute of water or charges-per-second of electricity.

Resistance can be thought of as the “tightness” of the pipe. The narrower the pipe is (higher resistance), the less current flows through for a given potential (voltage). You can make more current flow through a pipe by pushing it harder (higher voltage) or opening the pipe up (less resistance). This relationship is given by Ohm's Law: V = I x R where voltage (in volts) equals current (in amperes) times resistance (in ohms).

There are a lot of great tutorials online about voltage, current, and Ohm's Law. Here is a nice example.

Step 9: Measure Voltage and Current

Construct a simple circuit that just has a resistor between 5V and GND. This circuit isn't doing much but converting electricity into a tiny amount of heat. 5V of potential is being "dropped" across the resistor. To measure this voltage drop, we can put a clip on each side of the resistor. This will show 5V, which makes sense because one side the resistor is connected to 5V and the other to GND (0V) for a potential difference of 5V-0V or 5V. Note that voltage is always measured across some load (a resistor in this case) that is dropping the voltage being measured.

In order to measure current, the circuit must be opened up and the meter inserted within the circuit. This allows the meter to sense the current flowing through the circuit. Note that current is always measured inline requiring the circuit to be opened up first.

Step 10: Potentiometers and Voltage Dividers

A voltage divider produces an output voltage that is a fraction of its input voltage. Here is a great video about voltage dividers.

A potentiometer is a three-terminal resistor with a sliding or rotating contact that forms an adjustable voltage divider. If only two terminals are used, one end and the wiper, the potentiometer acts as a variable resistor or rheostat.

Step 11: Microprocessors and Microcontrollers

Step 12: Arduino Open-Source Ecosystem

Arduino is an open-source hardware and software concept that makes it easy to get started working with microcontrollers. The Arduino user community designs and manufactures open-source hardware and open-source software to enable microcontroller-based solutions for building digital devices and interactive objects that can sense and control physical devices. Due to the open-source nature of the Arduino ecosystem, there are many, many variations on Arduino programs, libraries, and hardware. Arduinos are readily available, and of course they have countless tools, libraries, and tutorials available online.

Arduino is the perfect sandbox for hardware hackers to play in, but it also means that we have to be flexible and ready to explore, find solutions, figure out what works, how it works, and what we can do with it.

Start by installing the Arduino Integrated Development Environment (IDE). You can download it at Arduino.cc

You might want to check out this introductory video about the Arduino IDE. It jumps ahead to some of the topics we will address in later steps, but seeing the same ideas covered from different perspectives can be very helpful.

Step 13: Arduino Nano Microcontroller Plaform

The Arduino Nano is a great choice for learning about microcontrollers platforms. The included Arduino Nano module comes with header pins suitable for plugging into a solderless breadboard. For this step, all that is needed is the Arduino Nano module and a microUSB cable. Power is supplied to the Nano through the microUSB cable, which is also how programs are loaded from your computer into the Nano.

The Arduino Nano is a surface-mount, breadboard-friendly, miniaturized Arduino board with integrated USB. It is amazingly full-featured and easy to hack.

Features:

  • Microcontroller: Atmel ATmega328P
  • Voltage: 5V
  • Digital I/O Pins: 14 (6 PWM)
  • Analog Input Pins: 8
  • DC Current per I/O Pin: 40 mA
  • Flash Memory: 32 KB (2KB for bootloader)
  • SRAM: 2 KB
  • EEPROM: 1 KB
  • Clock Speed: 16 MHz
  • Dimensions: 17mm x 43mm

This particular variant of the Arduino Nano is the black Robotdyn design. Arduino Nanos feature a built-in USB/Serial bridge chip. On this particular variant, the bridge chip is the CH340G.

USB Device Driver

Your computer's operating system requires a Device Driver to communicate with the CH340G USB/Serial chip. The driver allows the IDE to communicate with the Arduino board. The specific device driver that is needed depends upon both the OS version and also the type of USB/Serial chip. For the CH340 USB/Serial chips, there are drivers available for many operating systems (UNIX, Mac OS X, or Windows). The maker of the CH340 supplies those drivers here. The Google translated version might be helpful.

Step 14: Your First Arduino Program in a Blink

Plug the Nano into the MicroUSB cable and the other end of the cable into a USB port on the computer. An LED on the board should start to blink. This is actually running a tiny program that is preloaded onto the Nano.

Now, launch the Arduino IDE software.

Once you get into the IDE, navigate to tools>board. Select "Arduino Nano" in the under the listed board types.

Next, you need to select the PORT for the board. This will look different depending upon your USB driver. It may have a name with "wchusb" in it. If the appropriate USB/Serial device is not showing up in the IDE under PORTS, it helps to unplug the USB cable, wait thirty seconds or so, and then plug it back in. Maybe even try a different USB port. This can force the operating system to notice that something has changed and initiate the associated USB driver.

Finally, load up a piece of example code:

File->Examples->Basics->Blink

This is actually the code that was preloaded onto the Nano and should be running right now to slowly blink the blue LED. Accordingly, if we load this example code, nothing will change. Instead, let's modify the code a little bit.

Looking closely at the program, you can see that it turns the LED on, waits 1000 milliseconds (one second), turns the LED off, waits another second, and then does it all again - forever.

Modify the code by changing both of the "delay(1000)" statements to "delay(100)". This modification will cause the LED to blink ten times faster, right?

Let's load the modified code into the Nano by clicking the UPLOAD button (the arrow icon) just above your modified code. Watch below the code for the status info: "compiling" and then "uploading". Eventually, the IDE should indicate "Uploading Complete" and your LED should be blinking faster.

If so, congratulations! You have just hacked your first piece of embedded code.

Once your fast-blink version is loaded and running, why not see if you can you change the code again to cause the LED to blink fast twice and then wait a couple of seconds before repeating? Give it a try! How about some other patterns? Once you succeed at visualizing a desired outcome, coding it, and observing it to work as planned, you have taken an enormous step toward becoming a competent hardware hacker.

Step 15: Your First Arduino Circuit

Disconnect the USB power from the Arduino Nano.

Remove the Power Supply Module form the Solderless Breadboard.

Plug the Nano onto the Breadboard and wire up an LED and 1K resistor as shown.

The same blink program can be used by changing the output pin from the one defined as "Builtin LED" to "Pin 2".

Can you make the flashing operate both the onboard and external LED at the same time?

Can you make the two LEDs alternate?

Step 16: Online Book - Introduction to Arduino

We suggest using the very well-written book entitled Introduction to Arduino by Alan Smith. At the link you can access a PDF version that Alan shares online. If you would like to have your own hard copy of the book, please consider supporting Alan by purchasing one here for only $8.99.

There are a number of sections in the Introduction to Arduino book that we recommend exploring using the components included in your HackerBoxes Starter Workshop. Some of of these sections are listed here, but certainly feel free to explore this material to any extent that you wish and at your own pace.

  • 2.1 “Blinky” Light Patterns
  • 2.2 IF Statements
  • 2.3 ELSE Statements
  • 2.4 WHILE statements
  • 2.5 What is True?
  • 2.6 Combinations
  • 2.7 FOR statements
  • 2.8 Our New Circuit
  • 2.9 Introducing Arrays
  • 3.1 Pushbuttons
  • 3.2 Potentiometers
  • 3.3 RGB LEDs
  • 4.1 A Sound Circuit (using Piezo Buzzer)
  • 4.2 Simple Musical Note
  • 4.3 Music
  • 4.4 Music with functions
  • 5.1 Serial Monitor
  • 5.2 Measuring Temperature
  • 7.1 Sensors Galore
  • 7.2 Light Sensor

If you'd like more ideas for experiments and projects, try Google searches for topics along with the word "Arduino" such as: "Arduino Mario Brothers Theme," "Arduino Door Bell," "Arduino Cat Toy," and so forth. Also, reach out to the HackerBoxes community on social media or in the comments below.

The Arduino UNO vs. NANO

This book, along with many other online Arduino resources, shows examples using the Arduino UNO board. The NANO is simply a more compact and breadboard-friendly version of the UNO. They are both based on the ATmega328 microcontroller making them more or less functionally equivalent.

Step 17: Introduction to Soldering

The Starter Workshop includes a nice set of the basic tools needed for soldering:

  • Soldering Iron
  • Soldering Iron Stand
  • Soldering Iron Tip Cleaner
  • Solder
  • Desoldering Wick

If you are new to soldering, there are a lot of great guides and videos online about soldering. Here is one example. If you feel that you need additional assistance, try to find a local makers group or hacker space in your area. Also, amateur radio clubs are always excellent sources of electronics experience.

Wear safety glasses while soldering.

You will also want to have some Isopropyl alcohol and swabs for cleaning the brownish flux residue left behind on your solder joints. If left in place, this residue will eventually corrode the metal within the connection.

Additional useful soldering tools that you may want to look into as you progress include a flux pen, a lighted magnifier (or stereo microscope), and possibly a heat gun for reflow and SMT work. When you get to the point where you need these tools, you will know when and why.

Step 18: Micro Flush-Cut Wire Cutters

These type of wire cutters are useful for a lot of things, but especially when soldering through hole leaded components. Once such components are soldered to the PCB, you will want to ship the leads off of the back very close the board. These are perfect tool.

Wear safety glasses while cutting. Even the manufacturer of these cutters included this very wise warning for their use: "WARNING: FLYING LEADS CAN RESULT IN EYE INJURY. PROPER EYE PROTECTION MUST BE WORN."

Step 19: LED Dice - Soldering Kit

This LED Dice kit is a great chance to practice some through-hole soldering techniques. Hopefully, in the end, you will have a cool random dice thrown toy to play with, but don't put too much pressure on yourself if you are new to soldering.

You can take a look at the schematic and the silkscreen legends on the PCB to guide you in placing the correct components into the correct vias.

  • Start with the resistors. There are different values of resistors, so make sure the correct values go into the appropriate positions. You can read the color bands and use the included color code card. We also recommend double checking the values with a meter. Resistors are not polarized and may be inserted in either direction.
  • Next, there are two capacitors. C1 is an electrolytic can-style capacitor. It is polarized so makes sure the plus and minus leads end up in the correct holes. C2 is a little brownish ceramic capacitor. The leads of C2 are not polarized and may be inserted in either orientation.
  • The LEDs are polarized and will not light up if connected in reverse. Check the flat portion of the circle on the silkscreen against the base of the plastic LED diffuser lens. Also, the longer lead of the LED is positive.
  • With the transistors, note that there are two different kinds. They are not interchangeable even though they looks almost identical. Their pins are also polarized. Again, check the flat portion of the circle on the silkscreen against the flat face of the transistor body.
  • DIP (dual in-line package) chips and chip sockets are oriented by a small half-circle on end. Make sure these line up with the similar marking on the PCB silkscreen. If your kit includes chip sockets, solder those to the board and then let them cool for a 20 seconds before inserting the chips in the correct orientation. If you are not using sockets, be VERY careful to not overhead the chip leads. Heat then very quickly and just enough to melt solder.
  • The push button should old fit in one way. It operates the same if rotated 180 degrees, so that is no worry.
  • Note that the power jack and power lead have a positive wire and minus wire. The power supply requirement is 4.5-6 volts DC, so the 5V output from the UNO, the YwRobot supply, or any other 5V DC supply may be used.

Step 20: Hack the Planet

We hope you are enjoying the HackerBoxes Starter Workshop. This Workshop was designed to be a fun and thorough introduction to hobbyist electronics. Now that you've been exposed to these foundational skills, we hope that you will consider subscribing to HackerBoxes to have great projects delivered right to your mailbox each month. Please join us by SUBSCRIBING HERE.

Please share your success in the comments below and/or on the HackerBoxes Facebook Group. Certainly let us know if you have any questions or need some help with anything. Thank you for being part of the HackerBoxes adventure. Let's make something great!

Share

Recommendations

  • Big and Small Contest

    Big and Small Contest
  • PCB Contest

    PCB Contest
  • Toys Contest

    Toys Contest

Discussions

0
None
ZearoCool

1 year ago

I have been looking for something just like this for my son. He's at the age to start tinkering. So I will be purchasing as soon as I clear it with the other half haha.
"Zero Cool? Crashed fifteen hundred and seven computers in one day? Biggest crash in history, front page New York Times August 10th, 1988. I thought you was black man. YO THIS IS ZERO COOL!"