Feature

Badge of Horror

SIMON Ludborzs

Issue 3, September 2017

Ingenious use of circuit board material, some clever engineering, a little PIC code, these badges are WICKED!

As with many seasonal projects we attempt, Simon ended up running a little late for Halloween 2015. But he got them finished, which now makes him early for Halloween 2017! We were impressed by how compact his creations were, as well as the creative use of PCB material to make the entire unit, so we caught up with Simon to find out more.

We were quickly impressed by your creativity here. What inspired you to make your own Halloween badges?

I had a bunch of 16F648s wasting away in a drawer, some inspiration from the kids, and a need for a simple project to give CircuitMaker a good run. Why did I have a bunch of 16F648s lying around? They were leftovers as my home projects have all migrated towards Arduino/ESP8266. Also, I use my home projects to learn “things” I don’t get to do at work. So for this project, I wanted to experiment with low sleep currents in a battery operated device. Even with 20+ years as an engineer, I had never implemented a soft power button.

Home projects definitely provide a great basis for projects without a commercial interest. Soft power buttons are so common in commercial products, but definitely not so much in hobbyist projects. The finished units look so intriguing - are they simply etched double-sided PCB material?

Yes. I had experimented with shining LEDs through etched FR4 in the past.

That’s a clever use of PCB material without making it overly complex. Did you make the boards yourself?

Prototypes, yes; but I have access to a PCB mill at work (LPKF Protomat). It’s a nice machine but a lack of solder mask and SMD doesn’t mix well! Final boards were from Elecrow, and I loaded the parts myself. I also used a homemade solder stencil and frying-pan reflow.

front of badge
Simon's PIC-powered Halloween Badges
back of badge
The back of the badge contains a battery, PIC micro, LEDs, and power switch.

Reflow definitely makes things easier, but it’s quite a skill to do it reliably! Aside from a lithium battery and LEDs, what other components are used to make it work?

Resistors and the PIC16F648. Some ‘tricks’ with the PIC were explored, such as internal weak pull-ups.

That’s a really lean component count! There’s a five-way terminal - is that a programming interface we can see there?

Correct.

That’s awesome; onboard updates will make for some upgrade versatility. We can see a bunch of SMD on there - do you have much experience with surface mount soldering, and did it present any challenges?

I’ve been hand soldering SMD for over 15 years now, but yes, it still presents challenges. 0603 is my limit for hand soldering and doing that on a milled PCB without a solder mask is a chore, and it requires lots of desoldering braid. Using a stencil/paste/reflow I was able to load all 13 boards (I only ordered 10 but Elecrow gave me three bonus boards) in around the same time it took to hand solder the prototype (give or take a Coopers Pale Ale!).

You mentioned you had to learn about low-current sleep. Can you explain what you learned, and any challenges you had?

RTFM, which means “Read The F**king Manual”! I laid out the design “just like I always do” (internal pull-up resistors, chasing minimum parts count), but didn’t read up what would use the least amount of current. It turned out that external pull-downs were better in this case! Another challenge was how to measure sub-microamp currents. To do this I built my own current shunt amplifier.

Schematic
The schematic for the badges.

Every microamp counts when you’re running from a little battery, that’s for sure. What were people’s first reactions to the working badges?

The kids love ‘em! I nailed the target audience there, first shot! Adults, unfortunately, don’t really get it though.

Well, it was the kids’ idea in the first place! If you were designing from scratch again, what would you change?

The choice of micro; I’d use something that is supported by the Arduino IDE so others can modify them easily.

That makes sense - PIC code can be a bit of a pain to programme. What are you working on now?

It’s long list, which in no particular order includes:

  • Multi-channel multi-meter
  • Another IoT Garage Door opener (ESP8266 based, HTML)
  • A deluxe version of the Garage Door Opener that can double as a home watering controller (ESP8266 based, HTML, CSS, Javascript)
  • “Learn to solder” kits for the kids
  • An “Atari Punk” replica and a “LED Colour Mixer” (all analogue)
  • Raspberry Pi “power hat” to control shutdown (for use in a RetroPi box)
  • WiFi control of “Crossfit Timer” (to replace a lost remote control for my local gym - more ESP goodness, using Bootstrap)

Looking at that list, perhaps I need to focus on “finishing things I’ve started”!

Many of us can relate to that situation. But hey, who doesn’t love having 14 projects on the go at once!