2. Basic Wiring


The Hack-E-Bot is very versatile when it comes to wiring, but there are a few basic things you will want do to make things a bit easier.

This will contain basic wiring text and images for the Hack-E-Bot using the Adafruit Trinket.

What is a breadboard and how does it work?

A Breadboard is used to easily connect wires and components. Each hole in a row or column is connected so that when you plug a component like a resister into one hole, it will connect to a wire that is plugged into the same row.

This shows how the pin holes on a breadboard are connected.

This shows how the pin holes on a breadboard are connected.

You will notice that there are many groups of pin holes on the Hack-E-Bot’s breadboard. You will see 4 groups of 5 pin holes that run vertically on the left and right sides of the breadboard. All 4 groups on the left are connected to each other and all 4 groups on the right side are connected, but the left and right sides are not connected to each other. This means that if you plug a wire into the top left most pin hole, it will be connected to a wire plugged into the bottom hole on the same side.

There are also two columns of 5 pin holes separated by a rectangular indent in the center of the breadboard. These pin holes are connected horizontally, but they are separated in the middle where the rectangular indent is. If you look at how the micro-controller’s pins are laid out, you will see that the pins on the left side do different things than the pins on the right side. The breadboard is made so that if you plug a component like a micro-controller into the center of the breadboard, the pin holes on the left side will not connect to the pin holes on the right side. That is a good thing because bad things can happen when you connect the wrong pins together.

The Hack-E-Bot uses a breadboard so that you can easily change the micro-controller and add extra components without having to use any special tools or learn to solder. Breadboards use jumper wires to make many connections. You may have noticed that all of the wires that came with your Hack-E-Bot have small metal pins on them. The small micro-controller also has many small pins on the bottom. Those pins are spaced so that they will line up with the holes on the breadboard.

 

Establish a Common Power and Ground

  Use the pin holes on the left and right sides, columns Y and X, to establish a common connection to the power supply.

1
Plug the Red power wire from the Battery box into the right side, column X, of the breadboard.
2
Plug the Black ground wire from the Battery box into the left side, column Y, of the breadboard.

 

Wires 1

Connect Power to the Microcontroller

The included Pro Trinket has 2 wires attached to it for Power (Red) and Ground (Black). Be careful to connect these wires up to the right spots or they may damage your robots' brain.

1
Connect the Pro Trinkets' Red power wire to the right side, column X, of the breadboard.
2
Connect the Pro Trinkets' Black ground wire to the left side, column Y, of the breadboard.

Wires 2

Connect the Servos

1
The Servos use common Power (Red) and Ground (Brown) wires. These wires should be connected to the Power, column X, and Ground, column Y, rows of the breadboard.
2
Each of the Servos have a Signal (Orange) wire that is used to control the servo so that your robot can move around. The Signal (Orange) wire from the Right Servo should be connected to PIN #5 on the Pro Trinket.
3
The Signal (Orange) wire from the Left Servo should be connected to PIN #6 on the Pro Trinket.

Wires 3

Connect the Sonar Sensor

1
The Sonar sensor plugs into the small black connector in front of the breadboard with the two round sensors facing forward like eyes.
2
This connector leads to the 4 wires that run under the top disk of the robot. Connect the Power (Red) and Ground (Black) wires to the Power, column X, and Ground, column Y, rows on the breadboard.
3
The Sonar has a Trigger PIN that is connected to the Blue wire. This should be connected to PIN #3 on the Pro Trinket.
4
The Echo PIN, from the sensor, listens for the sound that was sent out by the Trigger PIN after it bounces off of an object. The Echo PIN uses the Green wire and should be connected to PIN #4 on the Pro Trinket.
Wires 4