Related lists

Description

The MoonLander is meant to be a small, low-cost dev board for the LPC824 Cortex-M0+ processor. It has on-board Li-Poly battery charging, microUSB for power, charging, data transfer and potentially programming using the CP2110 USB-UART IC. It has a 2x7 2mm expansion header, providing all the standard goodies like GPIO, ADC inputs, PWM outputs, SPI and I2C buses. It currently has one general purpose green LED, a reset button, and a general use button which can also puts the LPC824 into ISP mode.

Details

There's a few reasons I'm working on this besides just creating yet another little ARM Cortex-M dev board:

I've had plans in the works for a beefier Cortex-M0+ board for a while now, and this is, in a way, a first step towards that

I really like NXP's Cortex-M parts, and the LPC8xx series is especially cool considering the low price and plentiful features (the LPC824 being the "top of the" LPC8xx)

It's an excuse for me to start playing with the CP2110 HID USB-UART IC, which is one of the cheapest USB-UART chips I could find, and is HID based so it doesn't need any drivers (and it's easy to do more than just plain old USB-UART with it)

It's a chance to see if it's actually annoying to use 2mm expansion headers instead of 2.54mm

Components

1×
LPC824
32-bit ARM Cortex-M0+ microcontroller

1×
CP2110
Single-chip HID USB-UART bridge

Project Logs

I put together a quick project with the MoonLander for the OSHPark #BringAHack dinner after Maker Faire, which I called the BICORDER. All the code is up on Github. It was a good chance to test out the board - the one annoying thing was not having a base board to adapt it to a 0.1" header for easy breadboarding, so I ended up soldering temporary wires for prototyping then had to remove those to wire it up in the case. I'm still happy with the 2mm pitch for the I/O, I just need to make up an adapter board (I actually have a board already, I just gotta sort out getting the right height headers and standoffs).

Use Boost.Thread to implement a receive thread that fills an RX buffer on the stack (it seems the hidapi interrupt buffer is pretty limited and I keep dropping data, I think I need to read from it pretty frequently)

Data logging template where user sets the wake up interval with a define then fills in user code to execute on wakeup

Simple APIs for peripherals, including EEPROM

A library for a serial command interface compatible with the GUI (? - which could include EEPROM read/write commands)

The idea is to make something cross-platform and easy to use - it would be possible for anyone to download a firmware binary, plug in the board and upload.

Another possibility would be to hack it into the Arduino IDE, which is something JeeLabs worked on a bit: http://jeelabs.org/2015/10/14/arduino-ide-w-lpc824/ - they ran into a problem with using the RTS & DTR signals to trigger the bootloader using an FTDI converter, but I think it should be doable with the CP2110 and some custom bootloader code? I don't know, I've never looked into adding new platforms to Arduino (and I'd rather not use Arduino anyways - ultimately I want this to be a platform for simple, very-low-power applications, and Arduino is far from ideal for that).

I think I've just about finished rev B of the PCB - the main changes I've made are:

I routed a couple of the CP2110 GPIO outputs to the LPC824 reset and ISP entry pins so the ROM bootloader can be entered without the user pressing a button

I added an I2C EEPROM, which can be used for data logging and it's contents can be dumped over the USB-UART bridge

I was originally planning on including some sensors on board for a sort of all-in-one "IoT" platform, but I think it's more important to keep the cost down. The EEPROM is a fairly inexpensive part, and I think it's worth the $0.20 or so to add data logging as a core functionality.

One of the big reasons I made this board was to check out the CP2110 HID USB-UART IC. At $1.85 in single quantity (CP2110 from Digi-Key), it pretty much blows the ~$4.50 FT232 out of the water price-wise. Also cool is that it is HID based, and therefore doesn't actually require any drivers to communicate with it (Silicon Labs also make the $1.80 CP2104 USB-UART bridge that requires a driver and would be a more direct competitor for the FT232).

Being HID based, the CP2110 doesn't just show up as a serial port when you plug it into your computer, so I've been working on a quick and dirty C library to control it here (using hidapi). My next step will be to use that API to implement the serial ROM bootloader in the LCP824 to program it over USB. In the next hardware revision I'll probably have the reset and ISP entry pins controlled directly by a couple CP2110 GPIO pins, which will allow the programming software to reset the LPC824 into the bootloader itself.

Discussions

Become a Hackaday.io Member

Just wondering - why not use a microcontroller with inbuilt USB bootloader/use the factory bootloader? Many arm chips have this nowadays, either with a ROM bootloader or they come pre-flashed from the factory with a bootloader. An example would be the Freescale/NXP MKL27Z (although there is probably an equivalent NXP part): http://www.digikey.com/product-detail/en/freescale-semiconductor-nxp/MKL27Z32VFM4/MKL27Z32VFM4-ND/5361438 . Bootloader is in ROM so you can't lock yourself out (unless you set the appropriate fuse bits).

$2.32 in quantity 1

I guess if you made another version of the board without the usb uart section then it would be worth it, to keep 'deployed product' costs down.

Yeah, I've gone back and forth on that a bit. I have plans for a more feature-rich board using a fancier NXP cortex-m0 that does have a ROM USB bootloader. But feature creep was creeping, so I decided to start with a minimal board for the LPC824 to keep it real low cost.

I thought about leaving the USB-UART chip off the board for price, but I hate the idea of having a USB port that's just for battery charging, and it's pretty low cost itself.

I figure if anything it's worth it for now just to get the software for the CP2110 together, as it's a pretty cheap powerful USB-UART IC. I have some plans for a set of boards for the CP2110 by itself as well.

@Pete yeah, it will need standoffs as is. A press fit would be nice, but it's pretty dense and it would be hard to route 7 signals to the other side of the board without going to 4 layers (which would bring the price up).

Why even look at 2mm headers? Are they cheaper than 2.54mm, or is there some other reason? I'm not trying to be funny; just trying to figure out what the point is in breaking with what the majority of breadboards and IDC cables support..

Physical size - breadboard-friendly single row 0.1" headers tend to make PCBs pretty big. I'm more into the module-ish idea of a main board that's real small and has a good amount of IO connections, so dual row at a smaller pitch seems to make sense.

I'm imagining a connector on the bottom side so this could be plugged down onto a base board as a CPU+power module, sort of Intel Edison style, except in the $10-15 range so it might actually make some sense to plug it into a 'product' and leave it there.

It's a little annoying for breadboard use, but it wouldn't cost much to make an add-on board that adapted to 0.1" headers for prototyping.