Bricktronics Shield Parts List
This is a list of all the parts used in the Bricktronics Shield, along with a little bit of explanation about what each part does in the circuit.
- (1) Bricktronics Shield Printed Circuit Board – PCB
- (1) Push Button – SW1
- (2) 0.1uF Ceramic Capacitors – C1, C3
- (1) DPDT Slide Switch – SW2
- (1) MCP23017 I/O Expander Chip and Socket – U1
- (1) L293D Motor Driver Chip – U2
- (2) 100 kΩ resistors – R6, R7
- (2) 1 kΩ Resistors
- (1 each) 47uF and 100uF Electrolytic Capacitors
- (6) NXT-compatible Sockets
- (2) TIP120 Transistors – Q4, Q5
- (2) Female headers, 4 pins
- (4) Shorting Jumpers
- (1) Breakaway male headers
- (2) 1N4001 Protection Diodes
What does each part do?
There’s more information about the design of the Bricktronics Shield at the Design page.
Bricktronics Shield PCB (Back to list)
The Bricktronics Shield PCB is a professionally made printed circuit board with soldermask for easy soldering and silkscreen printing for easy assembly.
The push button acts the same as the reset button on the Arduino board. The specific pushbutton we use is the B3F-1000 by Omron Electronics.
0.1 uF Ceramic Capacitors (Back to list)
The 0.1 uF ceramic capacitors are used to help smooth-out spikes and ripples in the power supply voltage caused by sudden current draws from motors or sensors.
DPDT Slide Switch (Back to list)
The I/O Expander chip connects to the Arduino using the common I2C bus, which consists of two signal lines, SDA and SCL. On newer Arduino boards (“Revision 3” and newer), there are two extra pins dedicated to these two signals, but on older Arduino boards their functionality is shared with other uses on the original I2C pins. To support both older and newer Arduino boards, use this switch to select the proper source of SDA and SCL.
MCP23017 I/O Expander Chip and Socket (Back to list)
The MCP23017 chip is an I/O Expander, meaning that it connects to the Arduino using only two pins (using the very common I2C bus) and provides up to 16 pins that can be read from and written to over the I2C bus. This allows the Arduino to effectively control many more pins that it could originally. Since each sensor and motor has up to six connections, we needed the I/O Expander chip to help the Arduino deal with that many connections. While it seems like I/O Expanders are totally awesome and infinitely useful, the main disadvantage of using one is that there is that it takes more time to read or write a value on one of the pins, since each operation requires a complete I2C bus transaction, whereas using a “real” Arduino pin can take as little as a single AVR instruction. This means that we use “real” Arduino pins for jobs that require higher-speed I/O (such as interfacing with the color sensor and reading the motor quadrature encoder signals) and can use the I/O expander’s “slower” pins for less time-critical jobs such as enabling and disabling the motor channels. To avoid damaging the chip itself, as well as enabling easy replacement of the chip, we include a chip socket that is soldered into the board, and the chip itself is simply pressed into the socket. Be sure the align the notch on the socket with the notch drawn on the board, and align the notch or dot on the chip with the notch on the socket and board.
L293D Motor Driver Chip (Back to list)
The L293D is a very popular and common motor driving chip, consisting of four half-H-bridges (effectively two full H-bridges). An H-bridge circuit consists of four transistor switches that allows electricity to flow in either direction through a load, such as the motors we are driving on the Bricktronics Shield.
As shown in the image above, if switches S1 and S4 are closed, the current flows through the motor from left to right. If switches S2 and S3 are instead closed, the current flows the opposite direction through the motor. By controlling which switches are open and which are closed, the Arduino can drive the motor to rotate in either direction. It is very important to never have switches S1 and S2 or S3 and S4 closed at the same time, since that would cause a short-circuit between the motor voltage and ground! Since the Arduino cannot provide much current per pin (only enough to light an LED!) the L293D provides the big transistors that are needed to switch the higher current demanded by the motor (up to 600mA, about 20 LEDs-worth!). By switching the control signals on and off very rapidly, the Arduino can drive the motor at different rotation speeds.
100 kΩ Resistors (Back to list)
Resistors are a basic circuit component that resist the flow of electricity by generating a voltage in proportion to the current flowing through it and the resistance value of the resistor it self. It is a simple linear relationship expressed with Ohm’s Law: voltage = current * resistance. The 100k resistors are used in a “pull-down” role, where they make the L293D’s motor enable pins have a “default value” of 0 volts (Logic Low). This makes it so that the motors should be disabled when the Arduino is not actively driving the enable signal to 5 volts (Logic High).
1 kΩ Resistors (Back to list)
Resistors are a basic circuit component that resist the flow of electricity by generating a voltage in proportion to the current flowing through it and the resistance value of the resistor it self. It is a simple linear relationship expressed with Ohm’s Law: voltage = current * resistance. The 1k resistors are used with the TIP120 transistors’ input signal lines to help protect the Arduino pins that drive their input signals from excessive current draw. The way this works is that if, for some reason, too much current is trying to be drawn from the pin, the small resistance here would generate a voltage that would prevent any more current from flowing. This sort of protection resistor is fairly common, and you see it in many interface circuits where high speed or high power transfer is not required.
47uF and 100 uF Electrolytic Capacitors (Back to list)
The 47 uF and 100 uF electrolytic capacitors are used to help smooth-out spikes and ripples in the power supply voltage caused by sudden current draws from motors or sensors. These capacitors are much larger than the smaller ceramic capacitors also included, and are better at helping supply larger currents to help reduce power supply voltage spikes and ripples. Electrolytic capacitors are polarized, which means that it is very important to connect them in the correct orientation (long lead = positive)!
NXT-compatible Socket (Back to list)
To interface with the NXT motors and sensors, we use a custom made NXT-compatible socket that can be soldered right to the Bricktronics Shield PCB. It features the custom offset RJ11-style telephone plug socket port, and will work with the existing cables included with your NXT robotics set. These sockets are also available on their own as Bricktronics NXT-Compatible Sockets, as well as part of the Bricktronics Breakout Board.
TIP120 Darlington Transistors (Back to list)
The TIP120 is a Darlington transitor, which is a pair of transistors connected together internally. The TIP120 can switch higher-current loads, and is used on the Bricktronics Shield to enable us to control non-LEGO motors, such as switching the air pump on and off in the Chocolate Milk Maker project.
Female headers, 4 pins (Back to list)
The 4-pin female headers are used to allow you to easily connect external loads to the TIP120 transistors.
Breakaway Male Headers (Back to list)
The breakaway male header pins are used for three purposes on the Bricktronics Shield. First, they are used to connect the shield to your Arduino. Second, they are used with sensor sockets 3 and 4 to enable the use of the ultrasonic and color sensor (which require slightly-different connections to the sensors). Third, they are used with the motor driver chip to enable you to plug in the LEGO power functions (PF) motors.
Shorting Jumpers (Back to list)
Sensor ports 3 and 4 include a 5-pin header bank and two shorting jumpers each, to allow the ports to interface with an ultrasonic or color sensor, which require slightly-different connections to the Arduino. The shorting jumpers will connect the two pins it is placed over (hence the name “shorting”), and they are used to selectively connect pins on sensor ports 3 and 4 to the correct Arduino pins based on the desired sensor type (button, color, or ultrasonic).
1N4001 Protection Diodes (Back to list)
When switching an “inductive” load (a coil of wire) such as a motor, when you disconnect the switch, the coil’s magnetic field continues to push current through the motor coils. If the opened transistor switch is the only place for this excess current to go, the transistor could be severely damaged. To prevent this sort of damage, we use a diode, which is a circuit device that only lets current flow through it in one direction. We originally intended to have this diode be placed right on the Bricktronics Shield, but revision 1.03 has a small bug and the diode would not be properly connected if you solder it onto the board. Instead, simply connect it across the leads of your inductive load instead of placing it on the PCB, like in this great article from bildr: High-power control with Arduino and TIP120. On PCB revision v1.04 and higher, you can solder the diodes right into their position on the circuit board.