====== LPC812 Node ====== ===== Introduction ===== The LPC812 is a 32-bit ARM Cortex-M0+ chip which is cheap, easily available and relatively easy to solder with just a standard iron. It contains a bootloader and so can be programmed over serial. Onboard it has: * 16 kB of flash memory * 4 kB of data memory * CRC engine * one I²C-bus interface * three USARTs * two SPI interfaces * multi-rate timer * self wakeup timer * state-configurable timer * one comparator * function-configurable I/O ports through a switch matrix * 18 general purpose I/O pins. ===== MK1 (v1.0) ===== This is a double sided board (LPC812 on front and RFM69 footprint on the back) with all the pins broken out, space for a diode and large capacitor and a prototyping area. It was designed to be a chance to try and create a solar powered capacitor node (though the capacitor was really too small to be helpful) and so doesn't have a regulator. This can be added easily taking advantage of the protoboard section. ==== Required Components ==== * EtnaNode v1.0 * LPC812M101JD20FP MCU, 32BIT, CORTEX-M0+, 30MHZ, SOIC-20 * RFM69W or RFM69HW * Extras including headers, caps and a diode (but not essential) {{:guides:etnaboardmk1.png?200|}} {{:guides:etnaboardmk1pic.png?200|}} {{:guides:etnaboardmk1sch.png?200|}} ===== MK2 (v1.1) ===== Similar to MK1, smaller and slight reorganisation of pins - moved one SPI pin to allow access to ACMP which means that we can measure voltage using the comparator. Also removed diode and cap and instead added MCP1700 voltage regulator and caps. Ordered through dirtyPCB which meant that the protoboard section didn't come out as planned (just as vias). Also added JP1 header (VCC, Tx, Rx, GND) which makes it easy to add a GPS module. ==== Required Components ==== * EtnaNode v1.1 * LPC812M101JD20FP MCU, 32BIT, CORTEX-M0+, 30MHZ, SOIC-20 * RFM69W or RFM69HW * MCP1700 Voltage Regulator * 2x 1.0uF capacitors {{:guides:etnaboardmk2.png?200|}} {{:guides:etnaboardmk2sch.png?200|}} * On the serial header (at the bottom of the board) the pins are incorrectly labeled and should read (from left to right) Rx, Tx, GND ===== Erebus (v1.1) ===== New board design again with a LPC812 and RFM69, smaller PCB size and instead of standard voltage regulator the use of a DC/DC stepup convertor. The step up is set to output 3.3v and the board can boot from as low as 0.8V. Ordered PCBs from dirtypcb and have built up 1 board, found an error where I haven't connected the SHDN pin on the step up which needs to be pulled up to function. ==== Components ==== * ErebusNode v1.1 * LPC812M101JD20FP MCU, 32BIT, CORTEX-M0+, 30MHZ, SOIC-20 * RFM69 or RFM69HW * LTC3525ESC6-3.3 (DC/DC Step Up) * WURTH ELEKTRONIK 744053100 Power Inductor * 1uF capacitor * 10uF capacitor {{:guides:erebusbrd1.1.png?200|}} {{:guides:erebus1.1.png?200|}} ==== Headers ==== === JP1 === - GND - VIN === JP2 === - VCC - PIO0_17 (UART1_RX) - PIO0_13 (UART1_TX) - NC - PIO0_10 - GND === JP3 === - Reset - PIO0_12 (ISP) - GND - GND - PIO0_4 (TX) - PIO0_0 (RX) ==== Improvements ==== * Wire up SHDN line * Perhaps switch to an easier to solder DC/DC converter * Connect up pin 4 on JP2 ===== Compiling the Firmware ===== * Install the gcc-arm-embedded toolchain * On OS X using homebrew brew tap ARMmbed/homebrew-formulae brew install arm-none-eabi-gcc * Get the latest codebase from [[https://github.com/jamescoxon/LPC812]] * Go to //src// directory and rename //settings.h.example// to //settings.h// * Edit //settings.h// and add your node_ID, location and here you can adjust your settings with the various #defines. If you are using the MK2 or above board then you'll need to select this as it has slightly different pin configurations * Next build the firmware make clean make ===== Flashing the LPC812 ===== * This can be done using 3.3v usb-serial. * Connect up Rx, Tx and Ground and the with a jumper bring the ISP to ground, on the board they are adjacent to each other. * Install lpc21isp * On OS X using homebrew brew install lpc21isp * Using lpc21isp you can upload the code using this command (remember you'll need to change the location of the hex file and your usb-serial device: lpc21isp -hex -term ~/Development/LPC812/src/ukhasnet.hex /dev/tty.usbserial-DA01G60L 115200 14746 * lpc21isp will then wait for the board to boot up before it flashes the LPC812, this can be triggered by applying power to the board or resetting the micro (this is the most reliable). The reset pin is pin 4 of the LPC812 and bring this to ground for 1 second will successfully reset the micro and if the ISP pin is being grounded then will boot into ISP mode allowing it to be flashed.