- AVR Tools
- Flame Runtime
- Starter Schematics
- Wearable WS2812 LEDs
R2 Assembly Instructions
MHVBoard R2 Assembly Instructions
You will need the following tools to assemble your MHVBoard:
- Soldering iron with a fine tip (25W will do)
- Solder (the PCB is ROHS compliant if you want to use lead-free solder, but lead based solder is easier to work with)
- Needle-nose pliers
- Side cutters
Carefully inspect both sides of your PCB for solder dags and scratches. If there are scratches on your board, use a multimeter set to continuity and refer to the board layout to ensure that no traces have been damaged.
We can now start construction.
D1, D2 3.6V Zener Diodes
Bend the legs of the zener diodes with your pliers and insert them into the board. Note the orientation of the diodes - the stripe on the diode should match the line on the PCB. Once inserted, bend the legs out at a 45 degree angle to hold them in position, then solder and trim the legs.
R1, R2 68 Ohm Resistors
R3 1MOhm, R4 1.5kOhm Resistors
D3 1N4004 Diode
Q1 20MHz Crystal, C3, C4 22pF Capacitors
X1 USB Socket
First, position the socket with the legs in the air. Taking your side-cutters, cut off the rear supports from the case, being careful not to damage the pins adjacent to them.
Now, carefully align the pins with the PCB and solder it into position. Note that the spacing of the pins is very tight - it is essential to use a fine tip soldering iron here, and take care not to bridge any pins with solder. After soldering, test all the connections with a multimeter to ensure that the pins are not shorted.
IC2 7805 Voltage Regulator
The 7805 voltage regulator should be installed next. Using your pliers, bend the legs gradually into a right angle, starting a bit before the legs go from thick to thin. This will allow the regulator to sit flush against the PCB, with the hole lining up with the PCB.
C5, C6 100nF Capacitors
Solder these capacitors in now, they are slightly larger and marked "104". Note that C6 and R2 are close together, but are not connected. Check there is no continuity between the legs of these devices with your multimeter.
IC1 IC Socket
Install the IC socket next. Take care to align the small notch on the end with the marking on the PCB. After inserting it, bend the protuding legs on base outwards on diagonally opposite corners to keep it in position while you solder it.
C1, C2 10uF Electrolytic Capacitors
LED1 LED and R5 1kOhm Resistor
The LED and it's 1kOhm current limiting resistor should be installed next. The LED is polarized, and will only work if installed correctly. The cathode should be oriented towards the USB socket, and is marked with a short leg and a small flat section on the case.
The 1kOhm resistor (brown-black-black-brown) should be installed vertically next to the LED.
Insert the 6 pin header into ICSP1 (JP9 - not supplied with kits as the chips are pre-programmed) - a bit of blu-tack will help hold it in position while you solder it. Next, cut the single row pin header into lengths of 3 pins, 2 pins and 4 pins, and solder them into JP5, JP6 and JP7.
For JP2, JP3, JP4 and JP8, you have a choice. If you have access to a large breadboard, you can solder single row pin headers protruding from the base of the board (you would solder these on top), so the board can be plugged directly into your breadboard. If you do not have a large breadboard, you should solder the female headers into these sockets instead.
Vin DC Jack
Position the DC Jack on the PCB and bend the pins far out to hold it securely in place. Apply a lot of solder to these connections, so that the holes are filled with solder and the jack is held firmly.
Before you install the microcontroller, the board should be tested. Connect a jumper between pins 2 & 3 of JP5 (external power) and a 7.5-16V DC plug pack to Vin. With a multimeter set to DC voltage, measure the voltage between the pins marked _5V and GND. The multimeter should read very close to 5V.
With the power still applied, connect a wire to +5V, and touch it against the end of R5, on the side closest to the edge of the PCB. Your LED should light.
IC1 Atmega328p Microcontroller
Now we can install the microcontroller into the socket. First, we need to bend the pins to fit the socket. Using a flat surface like a table, gently roll the side of the microcontroller against the surface, bending the pins inwards on both side. Only bend the pins slightly, and check against the socket to confirm you have bent them enough.
The microcontroller can now be inserted into the socket - take care to align the notch on the microcontroller with the notch on the IC socket and PCB.
If you obtained your microcontroller from us, it has already been programmed. If not, you will need to program it yourself. You will need Avrdude (under Windows, it is included in the MHV AVR Tools package), as well as the firmware (see the attachments to these instructions). Connect an ICSP programmer to ICSP1, and upload the firmware (in the example below, we use a USBASP programmer):
avrdude -c usbasp -p atmega328p -U lfuse:w:0xf7:m -U hfuse:w:0xda:m -U efuse:w:0x03:m
avrdude -c usbasp -p atmega328p -U flash:w:mhvboard_1.0.hex:i
avrdude -c usbasp -p atmega328p -U lock:w:0x2f:m
Testing (Part 2)
Power your board up (either via USB or an external plug pack). The onboard LED should start throbbing - this is the default program that we ship. Connect a jumper to the Upload jumper, and plug your board into a computer. It will probably give you a warning saying "USB Device not recognized" if you are running Windows, along with a rather ominous message about the device malfunctioning. Don't worry, this is normal! At this point, the MHVBoard is still running the default program, which does not know how to talk USB, so it will not have completed the handshake with the PC.
Press the Reset button on the MHVBoard, the LED should flicker briefly and the device should be detected as a USBASP Programmer. In Windows, you can confirm this by looking at Device Manager.
If you've reached this point, congratulations, you have a working MHVBoard. There will soon be a getting started guide to help you on your way.