I want to improve my posture. The difficulty with this goal is that whenever you’re reminded of it, you straighten up (yeah, I saw you) but five minutes later you’re absorbed in something and hunched over again. I wanted something to give me little reminders throughout the day – not audio, which I’d miss, or computer-based, where I might not be, but a vibration alert on a bracelet.
There are some products like this, but they’re big and clunky and poorly reviewed. There are also watch platforms ready for hacking – but although they have hundreds of features already, they either don’t have vibrating alerts, or they’re not available yet. (They are also expensive and huge.)
The gadget I want doesn’t exist. No problem; I’ll just make one*.
I found a PIC microcontroller in Charlie’s parts box, and once I’d started getting some sense out of it**, I put together the circuit and code to do what I wanted:
- vibrate once every N minutes
- sleep the rest of the time, to reduce power consumption
- time adjustable, through a variable resistor
Somewhere around this point, I learned about the Durr, which is “a shivering unisex bracelet that investigates our perception of 5 minutes”. It’s more art piece than gadget, so you can’t alter the time, but it probably would have done the job. However, it’s sold out, and anyway I’ve nearly finished my prototype.
The circuit is split into three parts, connected by multicore wire, to allow it to bend a little. This design probably won’t last long, but for a prototype that’s ok. Stripboard also has plenty of holes, which means sewing it to a bit of fabric (or lashing down the motor with thread) works nicely.
Well, it’s ugly but it works. Time will tell whether it’s worth developing the prototype further. It could be made much smaller with SMD components, although the power source and motor put some limits on that. I’m picturing a version on linked blue or purple circuit boards, jewel-like under a blob of clear resin; something like this, but functional***.
* As usual, I am not the first to have this idea.
** Ah, PICs. What is supposed to happen when you power up a PIC12f675 is this: as part of the initialisation, jump to the very end of the user memory (address 0x3FF), where you’ll find a value for calibrating the oscillator and an instruction (RETLW, or 0x34) to take that value and return to finish the initialisation.
What sometimes happens: as part of in the initialisation, jump to the very end of the user memory, where you’ll find zeros because that location has been accidentally wiped. That’s a NOP. Increment the PC – and because we’re at the very end of the memory space, wrap around to zero. At location zero is the initialisation routine. As part of the initialisation, jump to the very end of the user memory, where you’ll find… that your PIC is now stuck in this broken initialisation loop and no amount of debugging your code will recover it. Fortunately, the grumpy forum regulars have seen it all before.
*** I mean, who’d want to wear jewellery you didn’t have the circuit diagram for? ;-)