Labview OpenPMU Assembly

Power Supply

Connect a 12V (1A) power supply to the screw terminals beside the 7805 Voltage Regulator. From left to right, facing you, the pinout is as follows:

1. Ground
2. 12V

The power supply range of the board is 9V to 18V, but 12V is recommended. Higher voltages will cause the 7805 to overheat!

Programming the PIC

The PIC needs to be programmed with the sampling trigger programme. This programme generates 10 Hz, 20 Hz and 50 Hz sampling triggers, disciplined to the 1PPS signal from the GPS Engine by means of a PLL.

IMPORTANT: Before you proceed, make sure the NI-DAQ is disconnected from the PCB. The ICD2 programmer uses voltages that can damage the NI-DAQ.
  1. Download and install MPLAB 8.5 or higher from www.microchip.com
  2. Download and install the C18 Compiler from www.microchip.com
    • Install to "C:\Program Files\Microchip\MCC18\"
    • Tick all the boxes the installer presents (e.g. for 'Path' and setting as default compiler)
  3. Download the code and MPLAB workspace here.
  4. Open the file "techbenh.mcw".
  5. Check that the source code builds correctly.
    • If you get error messages, check that MPLAB is not looking for MCC18 at "C:\Program Files (x86)\". If you get this error, go to the menu "Project > Build Options > Project" and under the "Directories" tab change the "Library Search Path" and the "Include Search Path" to use either "C:\Program Files\" or "C:\Program Files (x86)\" depending on your operating system version.
  6. Attach your programmer (e.g. ICD2).
    • Note the OpenPMU board uses a custom programmer header (see below).
  7. Check that your programmer can connect to the target (18F252).
    • Disconnect the ribbon cable to the NI-DAQ if this is connected. The NI-DAQ prevents the ICD2 from controlling the MCLR line.
  8. Programme the target.

Custom Programmer Header

The OpenPMU board does not use the standard Microchip programmer pinout. Instead, from left to right the pinout is:

1. Ground
2. Vcc
3. MCLR
4. PGC
5. PGD

The pinout of the ICD2 itself can be readily found by Google search.

Testing

To test that programming has been successful, connect your PCB to your PC's COM port. Open "HyperTerminal" and set the connection for (4800/8/N/1):
  • 4800 Baud
  • 8 data bits
  • No Stop Bit
  • 1-parity bit
  • No Flow Control
If programming has been successful, when you reset the PIC you will see a splash screen on HyperTerminal saying "Nova Robotics".

Connecting the GPS Engine

The following instructions refer to the Garmin GPS-18x Engine.

The GPS sensor cable is terminated in a small PCB connector. Cut this off, and trim the wires to leave sufficient ends to connect to the 2.54mm screw terminal connector on the PCB. The pinout of the PCB connector from left to right (i.e. facing you) is as follows:

No. Signal Colour
1 RS232 in Green
2 RS232 out White
3 1PPS Yellow
4 Vcc (5V) Red
5 Ground Black


Note: There are two black wires from the sensor. Connect both together to screw terminal 5.

The sensor will take up to tens of minutes to acquire location the first time it is powered on, after a long period without use, or if you take it to a new location. The 1PPS output will not "tick" until a location has been acquired. On subsequent power ups, you should notice the GPS sensor finds location quickly. It is suggested on first power up, you place the sensor somewhere it has a clear view of the sky (e.g. on a window ledge).

Testing

Connect to HyperTerminal as per the instructions in the previous section. If the GPS sensor is correctly configured, and a location has been acquired, the PIC will output the Date and Time to the screen (once, after first time location is acquired), and an asterisk will be created each time the 1PPS line "ticks".

Connecting the NI-DAQ

A drill hole is marked on the PCB to allow for a mounting post for the USB-6009-OEM. Use a nylon bolt to attach the NI-DAQ to this mounting position. Make a 34-way ribbon cable, approximately 10 cm in length, and attach this between the NI-DAQ and the PCB. Fold the excess ribbon cable and secure with a cable tie.

Connect the NI-DAQ to your PC via a USB cable. You can test that the NI-DAQ is operating using "Measurement & Automation Explorer". Alternatively, download the "PMU Tester" here (warning, this is in alpha stages).

Last edited Feb 13, 2012 at 8:19 PM by clockdoctor, version 1

Comments

No comments yet.