MakeyMakey Bootloader programming over ICSP

I’ve been asked about how I programmed the bootloader so I’m putting the doco here. For all my AVR work I use a bus pirate v3 with the stk500 firmware. I have a cable I made that adapts the bus pirate to the 6 pin AVR ICSP connector.

For MakeyMakey I made an adapter cable to convert the 6 pin AVR ICSP connector to the MakeyMakey header. I prototyped the cable using individual 0.1″ socket to pin cables and then moved them to single 2×3/1×6 housings to make the cable permanent.

The MakeyMakey schematic decodes the header in two parts


A random ICSP image from google images.

The pin mapping is

orange  MISO   6x1-6   2x3-1
yellow  MOSI   6x1-5   2x3-4
green   VCC    6x1-4   2x3-2
blue    GND    6x1-3   2x3-6
purple  RESET  6x1-2   2x3-5
grey    SCK    6x1-1   2x3-3


Do you like candy? I like candy.

Here’s a very brief overview of the thought process for building something to amuse and frighten your neighbours.

I originally wrote this up on May 31st and posted it elsewhere, but I thought I’d give the VHS regulars time to explore it on their own before I ruined the surprise.

Some of the readers may recognise this big red button o’ fun:


When somebody holds it, it starts up an air raid siren that can get really loud. Unfortunately, it spins up very slowly, so people let off as soon as they figure out what the button does. That results in one tiny little blip of the siren, barely enough to bother anyone. That’s no good at all!


So for this build, I didn’t want to spend very long at it, and attempted to do everything very roughly and as quickly as possible. I found all of the appropriate components kicking around, and designed around those.

Here’s what I came up with:



I found a transformer with outputs that measure at about 12VAC. 10:1 winding ratio, I guess. After rectification and smoothing, it’s a little over 18VDC. On the right side, I used an ALA2F12, a 12V relay. The transistor is a 2N3604, just a very generic NPN BJT because this application doesn’t require anything special.

The original button was just the AC line voltage to the fuse, then through the switch to the load. Very simple.


Okay. Starting from the left:

  • Transformer outputs at 12 volts or so,
  • through the half-wave rectifier diode (1N4007 I think) – results in 12 * root 2, about 18V,
  • big filtering capacitor (200v, 820uF),
  • 1MΩ bleeder resistor so the system doesn’t hold charge indefinitely,
  • original switch (connected to the big red button),
  • 100Ω resistor(to prevent sparks)
  • into timing cap (160v, 220uF) – charges to full very quickly,
  • another bleeder resistor,
  • Rb controlling current going into the transistor’s base (more on this later),
  • BJT  base.
  • At the top: resistor controlling going into the relay coil,
  • relay coil,
  • BJT collector going to ground.


Because I’m abusing a 12V relay by driving it with 18V, I had to compensate for that a little. According to the data sheet, the coil is nominally 272Ω, taking 43mA of current. Ignoring the transistor’s collector-emitter voltage (probably ~0.2V): 18v / 43mA – 272Ω = 146Ω. So I tossed a 150Ω resistor in series with the coil, and it seems to work.


For the base of the transistor, this resistor (along with the capacitor) is what controls the active time of the system. It also controls the maximum current that can conduct through the collector-emitter junction of the 3604. Typically the gain of those are in the 70-100 range, so current going into the base should be Ib = 43mA/100 = 0.43mA. Base-emitter junction is around 0.7v, so the base resistor can be figured out by 18v – 0.7v / Ib when the base cap is fully charged. Overdrive Ib to 1mA to ensure max-on, so I used 18kΩ.

I tested everything to check timing issues, overheating, etc., and it works well. The relay gets latched for about 7 seconds, which is perfect. If I cared about being more precise with that, or wanted to change the timing values, it’s pretty simple to treat that portion as an RC circuit and tweak the resistor or capacitor values.

So I built it.

Perfect! Start to finish, including laser cutting, about seven hours. Not counting the abortive first attempt last week.

So before, when newcomers pressed the button, there was only a very short blip of the air raid siren. Now, the thing latched for a good seven seconds. And it gets very loud in that time.


The real purpose of this hack (and doing a write-up) is to encourage more members to go out and hack something! I haven’t seen anything really cool in a while.




SMD July – Build MakeyMakey on July 24th at VHS

2014-07-01-12-35-49a small

When Kickstarter came to VHS to talk about launching campaigns they showed MaKeyMaKey as an example. They chose well. This has to be close to the most fun you can find in a circuit. You can find out lots about it online, it is even more fun than it looks!

MaKeyMaKey is open hardware, all the information we need to build the project is available online and we’re building them at VHS this month. “The code is beerware; if you see me (or any other SparkFun employee) at the local, and you’ve found our code helpful, please buy us a round!”.

The real MaKeyMaKey is a quality product finished in a nice box with clip leads etc.  You’re getting a bag of parts here and a cheap chinese pcb.  It works, it looks a bit substandard compared to the real thing, but it works well and you built it!

The parts on this board are mostly 0603 so the soldering is reasonably difficult.  The pins on the IC are 0.8mm apart, this is the same as the cpu on the internet of things board and not that hard (the very fine pitch stuff is usually 0.5mm or even 0.4mm spacing).  Please consider a beginners class before this one if this is your first time.  If you’ve made any of the other projects in our workshops you’ll be fine.  Please plan on coming for 2 weeks or doing some homework, there are a lot of parts on this board.

The socket connectors like the ones on the real MakeyMakey are quite expensive so I’ve added them as an additional option – you can see one in the photo below, there is just 1 at the bottom.  If you don’t choose them you’ll get pins like the 3 shown in the photo below to keep the cost down.  Both work fine, there is more risk of a short to something metal with the pins.

There are only 11 tickets for sale at the moment.  I’ll rerun next month with another 10 tickets – there seems to be a shortage on the cpus at the moment.  If there is more demand than that, I’ll do another pcb run (takes 4 weeks).

2014-07-01-12-35-27 small

If you want clip leads, I suggest these on ebay for $2.30 inc. shipping, they fit the holes in MaKeyMaKey nicely.

Refunds are possible, please contact me – you may need to find someone else to do the project or do it another time.

What: SMD soldering workshop
Where:VHS 270 E 1st Ave
When:July 24th at 7pm
Cost:$18.50 plus eventbrite fees

LED Wall of awesome nearly funded!

by Dan Royer

Several weeks ago our wonderful wall of LEDs returned to it’s Burning Man owners. It was 10×42 pixels and loved by all.

To replace it I’m running my third VHS funding drive. (The first was an 3D printer filament group buy, the second was the group quadcopter buy with Jon G.)

Every $30 will pay for one 8×8 panel of LEDs and a power supply. Just like the old wall it will be totally programmable through the Raspberry Pi. When the parts arrive I will host a group build party for all donors at VHS. Come decorate and assemble your panel in an afternoon of fun. Rainbows everywhere!

See two new panels

I’m also accepting $60 order of one-for-vhs-and-one-for-you. Take what you learn home and apply it to your next project. Burning Man? BITF? Bike Rave? Work less party? Halloween? So many good reasons! Please make clear this is what you want or I will assume you are donating two panels.

Minimum Goal

The minimum goal is to get 6×2 panels ($360) for a new wall that’s 48×16 LEDs.
Achieved 2014-07-08

Stretch Goals

If we get more donors than needed we’ll put the pixels closer together for a more detailed picture.
6×3 panels ($540)
12×2 panels ($720)
12×3 panels ($1080)
12×4 panels ($1440)

Donate Before…

This funding drive will end 2014-07-21.

Send your donation via Paypal to dan at marginallyclever dot com, or cash/credit card in person at VHS on Tuesdays from 20:00 to 22:00.

MakerLabs Grand Opening

MakerLabsOur good friends at MakerLabs are having their Grand Opening party (in collaboration with Aurora Digitalis) this Friday to introduce the world to their brand new makerspace, and the VHS horde is invited!

“After 9pm on Friday the 4th, we’ll be turning on many projectors, a whole bunch of sound and transforming the MakerLabs into a futuristic experience. There will be interactive installations, a wearable augmented-reality maze, blinky things and so much more.”

Sounds like an experience you don’t want to miss.  If you agree, you’ll want to RSVP as space is limited!

Arduino Open Night – July 10th @ 7PM



On Thursday 10th we’re having a Arduino Open night at VHS, 7pm ish.  Bring your Arduino(s) down and talk to fellow hackers about the projects you’re making with them.  Struggling with a sketch, bring it down and lets see what we can do for you.  Don’t have an Arduino?  No problem, Lees Electronics or Dan Royer’s vending machine can help you.  Prefer bare metal, no problem, lets talk AVR shall we?

What: Arduino Open Night
Where: VHS Bunker, 270 E 1st Ave, Vancouver
When: Thursday 10th July at 7pm or so
Cost: Free

PS: Did you know there are Arduino available in the VHS vending machine?

Canada Day Open House Tentatively Cancelled

Unfortunately, because of Canada Day (and the nice weather), we currently don’t know if we’ll have enough keyholders to keep the space open for our regular open house tonight. As such, tonight’s open house is tentatively cancelled.

Before heading down, please check our Twitter, Facebook, blog or to see if we are open tonight.

Our apologies for the late update!

SMD Soldering Beginner Workshop


This is a beginners SMD workshop. You’ll be taken through a technique for solder smd components and then get a chance to build the board shown in the photo.  The price is the cost of the parts including battery.

People should have some soldering experience – the focus will be on SMD soldering, not soldering in general.  All tools and materials will be provided.  Please consider bringing your own soldering iron with a fine tip – it is easier if you can keep working with the same tool.  Whilst anyone is welcome, first time SMD solderers are preferred.  There will be an advanced workshop on July 24, tickets and cost TBD.

If you are unable to attend you can receive a refund up to 1 week beforehand, after that you can receive your parts or nominate someone to attend in your place.

There are limited tickets for this event as this is the first run of this circuit.  There will be more of these events in the near future.

When: July 17 at 7pm
Where: VHS Bunker. 270 E 1st Ave
Cost: $4.50 plus eventbrite fee

Eventbrite - SMD 101 - basic smd soldering workshop

Schlage BE365 deadbolt hacking

We have a keypad dead bolt on the front door that has been slated for adaption to rfid for ages.  About 6 months ago we dismantled the lock and tapped the wiring to the solenoid.  The solenoid is tiny, it doesn’t open the lock, just engages the knob so human power can open the lock (hence you get 2 years on a 9V battery).  The tapping was tricky, we had to use wirewrap wire to pass the signal through the tiny wire channel from the outside of the door to the rear panel.  The lock has been functioning for 6 months with this tap in place so the job was successful.


This weekend we finally put a scope on the wiring to the solenoid to characterise it so we can emulate the keypad electronics with an Arduino.  This scope trace shows the bolt being withdraw by the keypad electronics.  It applies 5V in one direction, waits about 10s for someone to unlock the door and then applies 5V in the other direction to disengage the knob from the bolt.  As the scope trace shows, it is 5V @ 100ms, easy to emulate.


The goal is for the powered down state to revert to keypad usage ie. we can give out keypad codes over the phone when the power/internet are out.  Here is the schematic of the shield we’ve built.  It turns out that the voltage applied is actually 5V but the rest of the original design is still appropriate.

Next week hopefully we’ll get the shield installed and wired up to the Pi managing the system.

Maker Faire 2014 – Soldering Workshop Kit Instructions

Thanks to everyone for another great Maker Faire this year.  We hope to see everyone there in 2015 for the big 5th year of the Vancouver Mini Maker Faire!

The VHS soldering workshop area was popular as always, especially thanks to the new line following robot kit this year (we sold out Sunday afternoon!).  We also had lots of people learning to solder the blinky LED badge kits

If you didn’t get a chance to build a kit this year, don’t worry, you can come to VHS on one of our open nights and use one of our soldering irons.  We have lots of the blinky badge kits leftover ($3), and we will have a few of the Line following robot kits ($20) available this evening as well.

Here are the instructions for the kits:
Line Following Robot Instructions
Blinky Instructions