Setting the scene: computer + girlfriend + tax return. Observation: it has been almost 6 years since Gaga and I are together, and we would pay less taxes if we were PACSed (In France, a PACS is a civil solidarity pact. It's some kind of small marriage)... I must get a move on!
PACS is a little less solemn than marriage (like proposal on bended knee, large diamond engagement ring, etc... ), it's now or never to make an original thing stuffed with electronics!
My thoughts went immediately to a project that I had seen on hackaday.io: the Cyborg ring! The perfect project to mix up electronic and the formalization of a relationship!
This project of Zach Fredin is totally open source (Creative Commons Attribution-ShareAlike 4.0 license). I will start from scratch and recreate the hardware with Eagle, recreate a software compatible with Arduino IDE, make some improvements on design (structure, power consumption, ...) and let the whole thing open source.
Zakqwy pic "Cyborg ring" (hackaday.io)
The schematic is built around an ATTINY85V. Its power supply range is from 1.8 to 5.5V, which make zinc-air button cells a perfect power supply (nominal voltage 1.2V so 2.4V with 2 cells). the µC will be soldered between the 2 boards composing the ring. Pins 1 to 5 on a side, 11 to 15 on the other side. µC PAD and 8 pin need to be soldered on GND.
ATTINY85 is a small 8-bit µC with only 5 GPIOs available. Four to use with LEDs if we keep one for a button. By playing on high, low and high-impedance states, we can use 8 LEDs.
We will stack two 0ohm resistors to create a bridge to link and maintain the two boards together (LEDs and µC will also help to strengthen structure). More than supports, those bridges will also be used as link to pass a signal from a board to the other like GND, button signal and reset.
BOM and schematic (.pdf and .sch formats) are available in my F0cks_CyborgRing_Hardware project on github.
ATTINY85V split in two
LEDs truth table
Board to board links and supports
Board bottoms are the outer surfaces (the visible parts) of the ring. We will put the push button on one, the µC programming pads on the second. In my design, finger diameter is around 17mm (UK size: M 1/2, USA size: 6½~7, EU size: 53~54). So you need to adapt the board to the desired diameter. If my design is good for you, you can order boards directly on oshpark.
Board tops are the inner parts of the ring (face to face surfaces). LEDs are between the 2 boards, and will have as solder supports 22ohms resistors with a 0508 package... Yes... 0508 not 0805 (pads are on the longer edges!).
BOM and board diagrams (.pdf top / bottom and .brd formats) are available in my F0cks_CyborgRing_Hardware project on github.
We need to start with the board that contains the capacitor (it's the most complicated to solder). µC and 0508 resistors must be soldered first, then... the 0201 capacitor... I'm going to change it soon, it's too boring to solder it with a soldering iron... And it's maybe useless since only the µC is connected to VCC and the power comes directly from the cells. I have put it just in case.
We're having fun soldering two 0805 resistors together to make bridges. We need 6 bridges!
Then, we're going to solder those bridges on the board. Bridges called links must not touch the button cells (they are connected to reset and switch signals). However, cells can be blocked against support bridges over them. Don't forget to solder button cell connector on the - pad. Its spring effect will keep the battery well.
Soldering µC, 0508 resistors and capacitor
Soldering bridges and cell connector on board
We only solder 0508 resistors and cell connector (on - pad) on the second board. Then we can put boards face to face and solder the µC and the bridges. Now LEDs can be soldered between each 0508 resistors. LEDs are not all in the same direction !!! They are reversed one by one! Once everything is well soldered, you can solder the push button.
Tricky part: we need to solder the PAD and the 8 pin of the µC to the GND pad. I have checked, on the ATTINY85V, PAD and 8 pin are not connected, we can't only connect PAD to GND (my code was not working correctly until I connect the 8 pin to GND). I have started by solder a filament of a multi-strand wire from the 8 pin to the PAD. Then I have soldered a piece of through-hole resistor pin from GND to the PAD.
LEDs and push button assembly
Soldering PAD and 8 pin of µC
To build my code, your IDE (arduino IDE or others) needs to be updated to include ATTINY85 libraries (Arduino IDE update example).
Software can now be flashed thanks to a programmer (USBasp for me) and avrdude. I have created a small adapter with a spring-loaded connector (you can find it in the BOM). This custom probe just needs to be pressed against programming pads of the ring and here we go!
Arduino file .ino and .hex (that can be flashed directly) are available in my F0cks_CyborgRing_Software project on github.
USBasp custom probe
I have tried to optimize my code to drastically reduce power consumption of normal and sleep modes. We need to change default fuses to switch the internal oscillator from 8Mhz to 6,4Mhz. So you need to use this command at least once:
avrdude -c usbasp -p t85 -U lfuse:w:0x43:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m -B 400
You can now flash the code:
avrdude -c usbasp -p t85 -U flash:w:cyborg_ring_software.ino.hex -B 400
Time to estimate battery life of our beast! Accroding to this datasheet of an equivalent zinc-air cell, builder gives us a capacity of 100mAh. As I put blind trust in him... I will take a margin of error of 20% and consider that capacity is 80mAh instead!
Play with fuses and sleep mode has paid! When LEDs are not blinking, power consumption is only around 150nA! So in sleep mode, autonomy can reach more than 60 years!
Now, it's going to hurt... In the blinking sequence, only one LED is lit at a time. So I have measured the consumption in normal operation with a single active LED: ~4,5mA (with full cells). Autonomy in normal mode can reach around 18 hours. Knowing that my sequence lasts 4s, it still represents 16000 sequences! (Probably a little less as the voltage of the battery will decrease gradually).
A10 datasheet capacity
Sleep mode current consumption: 140µA
Normal mode current consumption: 4,5mA
Net pic attempt...
Net pic attempt...... The return
Final installation top
Final installation bottom
Test in real conditions
I feel pretty satisfied about rendering and power consumption optimization! But some improvements will be made soon:
I tried to tropicalize the ring to make it more resistant to static electricity but especially to the wet hands. Bad idea. The deposited film remains sticky, catches dust and creates slightly dirty filaments between the LEDs. I will try another type of tropicalizing... Or not...
Oh... And by the way, she said yes!!!
zakqwy 2018-06-04 14:37:19
this is so wonderful to see, thank you for sharing. excellent idea putting all the programming pads on one side. and congratulations on your union!!
F0cks 2018-06-04 15:01:27
Thanks to YOU! You've made the 2 hardest parts of an electronic project: the idea and the components :p I am pretty proud of the power down power consumption (150nA!). Anyway, my girlfriend and I really thank you for your amazing work ;) See you soon on hackaday (or insta) for other inspiring projects!