chipKIT® Development Platform

Inspired by Arduino™

Big things in small packages

Created Fri, 26 Dec 2014 22:57:02 +0000 by majenko


Fri, 26 Dec 2014 22:57:02 +0000

Just to prove that big things can come in small packages, I set out to design myself the smallest (yet still useful) PIC32 board I could.

Modelled around the DigiSpark which uses a lowly ATTiny chip, I came up with this design:


On there you have a PIC32MX250F128B (50MHz) in a 28-pin QFN package, 3.3V regulator, two buttons (one reset, one program), 8MHz clock chip, one user controlled LED (no room for a power LED).

There's a 16 pin IO header, including SPI, I2C, Serial (most of those remappable of course).

I don't know if it'll work yet - I've just ordered some prototype boards to try it out. I'll let you know if I did it right ;)

Oh, and I made it so the top 8 pins of the header should be pin-compatible with the little nRF24L01 modules I've been playing with.


Sat, 27 Dec 2014 00:20:23 +0000

That board looks amazing, Great work on that. Interested in hearing about this in the future.


Sat, 27 Dec 2014 14:00:06 +0000

Nice board!

no room for a power LED

There is, of course :)


Sat, 27 Dec 2014 14:20:59 +0000

I'm sure if I were to start using 0603 LEDs instead of 0805 I could fit one it. Maybe use some 0402 resistors instead of the 0603 to save even more space as well...

But then, if you want a power LED, just turn the user LED on as your first operation ;)

Jacob Christ

Sat, 27 Dec 2014 17:13:44 +0000

I like it.


Mon, 29 Dec 2014 18:18:38 +0000

This looks great! Please let us know, when you get it running.



Tue, 13 Jan 2015 14:53:46 +0000

Today my first prototype boards arrived, and I have built one up. I already know there are errors in the design which I have already corrected, but I opted to delay ordering the new version until I had confirmed the proof of concept with this known bad design.

And here is one built up:


And you know what? Even with the faults it still works :)

Here it is plugged in to give you a better idea of the size:


Because 2mm PCBs are wildly expensive for prototyping I had to really just go for a 1.6mm one, hence the massive amounts of solder blobbed on the USB connector. The finished product will be 2mm thick PCB, black resist, and ENIG.

Once I have finished my little re-design, including adding things like external power input etc, I will get the next protos on order (also 1.6mm as I'm not rich, but it's fine for prototype testing), then we'll see about getting these bad boys out there to the masses :)


Tue, 13 Jan 2015 15:47:06 +0000

I've already found a good use for it... I have just turned this one into a USB->TTL Serial adaptor for programming Arduino, chipKIT, etc boards. It's a special one though, with extra outputs.

It has one output that goes low when the serial is connected (as DTR would), one that goes high when it's connected (the opposite of DTR), and one that outputs a 50ms low pulse whenever the serial connects or disconnects.

The latter is the biggie - it can connect straight to a RESET pin (with a resistor to limit current is a good idea, especially on 5V boards) with no pesky capacitor needed.

And this is all the code that's needed:

static const int PIN_DTRS = 8;
static const int PIN_DTRP = 12;
static const int PIN_DTRN = 13;

void setup() {
	pinMode(PIN_LED1, OUTPUT);
	digitalWrite(PIN_DTRS, HIGH);
	digitalWrite(PIN_DTRP, LOW);
	digitalWrite(PIN_DTRN, HIGH);
	digitalWrite(PIN_LED1, LOW);

void loop() {
	static uint32_t led_ts = millis();
	static uint32_t pulse_ts = millis();

	static boolean connected = false;
	if (Serial) {
		digitalWrite(PIN_DTRP, HIGH);
		digitalWrite(PIN_DTRN, LOW);
		if (!connected) {
			connected = true;
			digitalWrite(PIN_DTRS, LOW);
			pulse_ts = millis();
	} else {
		if (connected) {
			connected = false;
			digitalWrite(PIN_DTRS, LOW);
			pulse_ts = millis();
		digitalWrite(PIN_DTRP, LOW);
		digitalWrite(PIN_DTRN, HIGH);
	if (Serial.available()) {
		digitalWrite(PIN_LED1, HIGH);
		led_ts = millis();
	if (Serial0.available()) {
		if (Serial) {
		digitalWrite(PIN_LED1, HIGH);
		led_ts = millis();

	if (millis() - led_ts > 50) {
		led_ts = millis();
		digitalWrite(PIN_LED1, LOW);

	if (millis() - pulse_ts > 50) {
		pulse_ts = millis();
		digitalWrite(PIN_DTRS, HIGH);


Tue, 13 Jan 2015 23:17:39 +0000

Way, way cool. This is a great little board! Nice work.



Thu, 29 Jan 2015 15:05:48 +0000

Next round of prototypes have arrived. And they work great. [attachment=0]Proto2sm.jpg[/attachment]

Now, I have this zany idea to try and get rid of the PROG button and have everything rolled into the reset button, but I'm struggling to come up with just the right circuit for it... ideas are welcome.

What I have at the moment is a simple RC delay circuit between the reset and program input pins. Tap the reset button for a reset, or press it longer for entry into the bootloader. That side of it works a charm, and only takes 2 components. However, it bites me in the ass from powerup. Because the program capacitor is empty when you first power it up it takes time for it to get to a high voltage, which means the program button is effectively pressed when the power is applied - and so it always enters the bootloader at powerup. Also the circuit also delays the MCLR rising at powerup slightly, so it appears that the chip sees the power up not as a power-on reset but an MCLR-reset (I tried examining the POR bit to skip the bootloader at power up to no avail).

So if someone can come up with how to get around this with a minimum of components and cost, it would make things much nicer.

I know I very easily could do it with a little PIC10 as a reset controller, and in SOT-23 would be the same size as the regulator at the top there, but it adds an extra chip that needs programming to the board, which I really don't want to have to do, especially as there isn't really room for an ICSP header for it, so little test pads on the underside would be needed, and programming with those is a right royal pain (pogo pins and a jig would be needed... urgh).

Even better would be if there were a really small chip that already does what I want - maybe a press-and-release for reset, and press-and-hold for bootloader, but I haven't managed to find one yet - anyone know of one?


Thu, 29 Jan 2015 21:20:24 +0000

Any plans to put these on Ebay when you are happy with the design?



Thu, 29 Jan 2015 21:25:04 +0000

Absolutely, yes. When I get some spare cash available (soon I hope) I'm going to be ordering a big batch of 2mm boards in black and ENIG and go into full production with them. If I keep it as 2 buttons (which I am now leaning towards) then I'm happy with the design and I can order as soon as I can afford it :)


Fri, 30 Jan 2015 17:19:31 +0000


Any thoughts to list them on Ebay for pre-order to help generate some up-front production funds? Is that possible on Ebay? Any Idea what the asking price will be?

Do you have your own reflow setup? Jealous! :D :D



Fri, 30 Jan 2015 18:23:14 +0000

Nah, you can't do that kind of thing with eBay. I think it even breaks their T&C if you even suggest it ;)

I made my own reflow oven. It doesn't take much to do. You just need a toaster oven, some relays, a thermocouple, and a PIC32 board.


Sat, 31 Jan 2015 18:09:15 +0000

Oh well...had to ask.... will wait to order. Need at least one for each of my nrf24l01 modules.

I have an article on building an oven. Need to dig it out and and see what it takes.



Wed, 11 Feb 2015 06:57:29 +0000

Next round of prototypes have arrived. And they work great. Now, I have this zany idea to try and get rid of the PROG button and have everything rolled into the reset button, but I'm struggling to come up with just the right circuit for it... ideas are welcome.

Can we do like on the Digispark : having the boot loader mode to start at power-up and wait for 5 sec to see if an upload is coming then quit the boot loader mode ?


Sun, 03 May 2015 19:32:56 +0000

Any status update on this project?



Sun, 03 May 2015 23:01:45 +0000

I have had a handful of prototypes with Microchip for a while now trying them out, but Sharon's been too busy doing "work" to really play with them. I'm really waiting for some feedback from them to see if they find any obvious problems that I have overlooked before I order a batch of real boards.


Mon, 04 May 2015 05:46:36 +0000

Hey!! :P

Sent from my iPhone using Tapatalk


Mon, 04 May 2015 09:31:16 +0000

Well, because I need 2mm PCB it costs more, so to keep the costs down I need to order lots (300 of 'em) so I need to ensure they're spot on before I order - I'd hate to waste 300 boards...


Mon, 04 May 2015 09:47:30 +0000

Some kind of voltage supervisor IC then? There's plenty out there that will assert reset for ~150-500ms after power lines setup, which could give your program capacitor time to charge.


Mon, 04 May 2015 13:38:48 +0000

I've decided to knock that idea on the head - just sticking with buttons, it's simpler. It'll get too complex and too expensive otherwise, and with limited space it'd need to be a really small solution.