R7 Assembly Instructions

Tools

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
  • Multimeter
  • Blutac

Packing List

MHVBoard R7 Packing List
Item Quantity Location
10uF electrolytic capacitor 2 C1, C2
 22pF ceramic capacitor 2 C3, C4
 100nF ceramic capacitor 2 C5, C6
 10uF tantalum capacitor 1 C7
 3.6V zener diode  2 D1, D2
1N4001 silicon rectifier diode 1 D3
1N5817 Schottky diode 1 JP5 (not on silkscreen)
28 pin narrow DIP IC socket 1 IC1
Atmega328P 1 IC1
7805 5V voltage regulator 1 IC2
AMS1117 3.3V voltage regulator 1 IC3
1x8 female pin header 2 JP1, JP2
1x6 female pin header 2 JP3, JP8
1x4 pin header 1 JP7
2x3 pin header 1 ICSP (JP9)
1x25 right angle pin header 1 JP4
10uH axial inductor 1 L1
20MHz HC49/S crystal 1 Q1
68Ohm resistor 2 R1, R2
1MOhm resistor 1 R3
1.5KOhm resistor 1 R4
1k resistor 2 R5, R6
3mm LED (random colours) 2 LED1, LED2
6x6mm pushbutton switch 1 S1
5 pin microUSB connector 1 X1
2.1mm DC jack 1 J1
micro USB cable 1  
MHVBoard R7 PCB 1  

 Once you have confirmed that you have all the components, you are ready to begin construction.

Tips

  • You can click on any of the thumbnails to view a larger version
  • Give your soldering iron a few minutes to warm up while you are preparing other materials
  • Keep your soldering iron tip clean using a damp sponge or paper towel, it should be shiny every time you go to solder a connection
  • Apply the soldering iron to the pad and leg of the component you are soldering for a second or so, then apply solder to join between the leg and pad (not the iron). This will ensure a good solder join.
  • Most components can be held in place by bending their legs outwards
  • You can use Bluetac to temporarily hold components in place whose legs cannot be bent
  • Leave a healthy coating of solder on your tip before you switch off the iron (this will protect the tip from corrosion). Clean the solder off after the iron heats up in the next session

 

PCB

 

MHVBoard R7 pcbCarefully 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.

 

IC3 AMS1117A Voltage Regulator

 

LD117 soldered onto the PCBPresoldering the LD117 pads on the PCBLD117 voltage regulator & installation positionThe AMS1117A voltage regulator is installed first, on the underside of the PCB.

The pads should be lightly tinned with a very small amount of solder, and the regulator carefully positioned over the pads.

Starting with one of the small side legs, heat it and the pad until the solder below it melts, and gently push down on the leg with a small screwdriver. You can use the screwdriver to push the regulator back into position if it shifts. Once this is done, do the same to the opposite leg, taking care that the regulator is positioned properly on the pads.

Next, solder the middle leg.

Finally solder the tab at the top. This will take a little longer.

You should now go back over each leg and add a little more solder so that the solder flows up the sides of the legs. The end result should be shiny joins, with the regulator sitting flush against the circuit board. If yours is a little messy and you want to clean it up, a hot air gun set to around 300°C will melt the solder and allow you to push the regulator into position with a screwdriver.

 

D1, D2 3.6V Zener Diodes

3.6V Zener diode installation location3.6V Zener diodesBend 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

 

Resistor installation locationResistor legs bent towards the edge of the board68 Ohm resistorsThe 68 Ohm resistors are coded blue-grey-black, and can be inserted in either direction. You can use your multimeter set to Ohms to confirm that you have the correct resistors. When bending the legs after inserting, bend them all towards the outside of the board (this will give you room to work later).

 

R3 1MOhm, R4 1.5kOhm Resistors

 

Resistor installation location1.5KOhm resistor1MOhm resistorSolder in the 1MOhm resistor (brown-black-black-yellow) into R3, and the 1.5kOhm resistor (brown-green-black-brown or brown-green-red-gold) in R4.

 

D3 1N4001/1N4004 Diode

 

1N4004 diode installation location1N4004 diodeSolder in the 1N4001/1N4004 Diode in D3, taking care to orient the stripe on the diode with the stripe on the PCB. Be careful not to mistake this diode for the 1N5817 Schottky diode supplied for JP5.

 

Q1 20MHz Crystal

 

20MHz crystal installation location20MHz crystalSolder into Q1 the 20MHz crystal (it can go in either direction). Take care not to overheat it as it is easily damaged.

 

X1 USB Socket

 

USB socket installation locationThe highlighted pins should be removedUSB SocketGreat care must be taken when installing the 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.

 

JP5 1N5817 Schottky Diode

 

Schottky diode installation locationBend the Schottky diode legs through the PCBSchottky diodeOn the PCB, this is marked as a jumper to select between USB and external power, however, instead of a jumper, you should have a 1N5817 Schottky diode.

Be careful to distinguish this from the 1N4004 diode used for D3. To install the diode, bend the leg of the stripe end over 180 degrees, and then sit the body of the diode on the pin marked "USB" of JP5. The bent leg from the stripe should be passed through the middle pin of the selection jumper.

Finally, use a pair of needle nose pliers to bend the leg from the middle through the hole marked "EXT", and then pull it tight. Finally, solder the diode in place and trim the legs.

 

S1 Pushbutton

 

Pushbutton switch installation locationPushbutton switchThe reset button should be installed into S1 (note the the orientation of the legs will only let the switch be installed in a way that makes sense - don't force it). You may need to use a little bluetac to hold the switch in place while you solder it.

 

IC2 7805 Voltage Regulator

 

7805 voltage regulator installation location7805 voltage regulatorThe 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.

 

C3, C4 22pF Capacitors

 

22pF capacitor installation location22pF capacitorSolder these ceramic capacitors next. They are slightly smaller than the other ones, and are marked "22P".

 

C5, C6 100nF Capacitors

 

100nF capacitor installation location100nF capacitorNow solder the 100nF ceramic capacitors. They are slightly larger, and are marked "104".

When installing the capacitors, bend the legs of C6 away from resistor R2, this will make it easier to solder.

 

IC1 IC Socket

 

IC socket installation locationIC socketInstall 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.

 

LED1, LED2 Power and Indicator LEDs

 

LED installation locationLEDsThe 2 LEDs should be installed next. LED1 is an indicator LED, while LED2 is used to show when the board is powered. You may omit either of these if you like (they are not essential).

2 LEDs are supplied in your kit, a white LED and a coloured LED. The white LED looks yellow if you look down it, while the coloured LED is clear. Since the white LED is brighter than the coloured one, I suggest that is installed in LED1 (the indicator LED), leaving the dimmer LED as the power LED.

LEDs are polarised. When installing, align the flat edge of the LED with the stripe on the circuit board.

R5, R6 1KOhm resistors

 

LED installation location1K resistorsThese 2 resistors current limit the LEDs, and are colour coded brown-black-brown-black.

Bend the legs of them over, and install them vertically next to their associated LEDs.

 

L1 100uH Inductor

 

100uH inductor installation location100uH inductorBend the leg of the inductor over and install it in L1. It looks like a resistor, but has a green body and is colour coded brown-black-black-silver.

 

10uF Tantalum Capacitor

 

10uF tantalum capacitor installation location10uF tantalum capacitorThe tantalum capacitor should be installed next. Note that the capacitor is polarised, and should be installed with the positive marking "+" oriented towards the bottom (near the reset pin of JP8).

 

JP1, JP2, JP3, JP7, JP8, JP9 Pin headers

 

pinheader installation locationspinheadersNow install the pin headers. If they are a little loose, you can use a bit of blutac to temporarily hold them in place while you solder them.

The 2 1x8 pin female headers are first installed into JP1 & JP2.

The 2 1x6 pin headers are installed into JP3 and JP8. To help keep JP3 and JP8 straight while soldering, you can plug the right-angle connector into them temporarily.

Finally, install the 2x3 pin header into JP9, and the 1x4 header into JP7.

 

Vin DC Jack

 

DC jack installation locationDC jackPosition 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.

 

C1, C2 10uF electrolytic capacitors

 

10uF electrolytic capacitor installation locations10uF electrolytic capacitorsInstall the 10uF electrolytic capacitors next. These devices are polarised and have the negative pin marked. The negative pin should be installed towards the stripe on the PCB.

 

JP4 Right Angle Connector

 

Right angle header installation locationRight angle headerIf you plan on using your MHVBoard with a breadboard, install the right angle connector into JP4.

 

Testing

Before you install the microcontroller, the board should be tested.

Connect a 7.5-16V DC plug pack to Vin. The power LED (LED2) should light.

With a multimeter set to DC voltage, measure the voltage between the pins marked +5V and GND (you may need to insert a jumper wire into the socket to measure this easily). The multimeter should read very close to 5V.

Next, measure the voltage between the pins marked +3.3V and ground. The multimeter should very close to 3.3V.

With the power still applied, connect a jumper wire between +5V and B5/13 on JP2. The indicator LED (LED1) should light.

 

IC1 Atmega328p Microcontroller

 

ATMega328P microcontrollerNow 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.

Programming

If you obtained your microcontroller from us, it has already been programmed. If not, you may 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. 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:main.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). LED1 should start throbbing - this is the default program that we ship.

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.

If you are running Windows, you will need to download the USBasp drivers, available from the author of USBasp. Linux & Mac machines do not need additional drivers.

If you are running a 64 bit version of Windows Vista/7, you will need to sign the drivers before installation:

  • Download Driver Signature Enforcement Overrider
  • Extract the USBasp drivers
  • Run Driver Signature Enforcement Overrider as Administrator
  • Put your computer into Test Mode (this allows self-signed drivers to run)
  • Sign all the DLL and SYS files in the extracted USBasp driver package
  • Optionally, remove the watermarks from your system (Test Mode will show "test mode" in the bottom right of your desktop)

If you are running Windows 8, follow the instructions here to disable driver signature enforcement.

 

 

MHVBoard R7 completedIf you've reached this point, congratulations, you have a working MHVBoard.