Introduction: Colerful Battery Powered Mini Potion Pendant With Charging Shelf

About: I want to learn anything to then try everything

I enjoy building stuff of any kind. Especally if it involves electronics, soldering and small components, but also woodworking and many more. Really annything that turns labor into art. So someone inspired me to build something potion like. Best fitting was a size of a ornament so it could maybe be worn as a neclace form example. I first thought about these cool chemical oscillation reactions for a magical effect but they sadly do not last forever. An other option was Tritium gas which you can get in small vials. They last 10 years while they loose only half of the brightness (related to the nuclear decay, they are completly safe though :D). But these dont come in any form factor. So the last option was electronics. From some very cheap bluetooth earbuds from Aliexpress i had tiny lithium batteries that would fit in small glass bottles i have seen online. There are small SMD LEDs wich automatically change color evvery second, but i wanted more control over the color so i ended up using the smallest microcontroller i knew, the ATTINY10. To control it a button may be too big. For that i had touch sensors from a TP223 module. And here the journey of creation began....

Supplies

All the needed parts:

Potion pcb:

  • ATTINY10 microcontroller
  • TP223 touch sensor
  • SMD DIP switch
  • SMD capacitor 0603 100nF
  • sk6805 2020 addressable LED

LiPo protection:

  • 401010 LiPo battery
  • DW01 and FS8205A
  • SMD resistor 100Ω & 1kΩ

Charging shelf:

  • USB Type C port
  • ATTINY84
  • TP4056 LiPo charging IC
  • SMD resistor / resistor array 10kΩ
  • SMD capacitor 10µF, 4.7µF
  • Optocoupler PS2802-4
  • Side emitting LED 0602
  • 0.42" SSD1306 OLED Display
  • Pogo pin 2x5.4mm
  • 3x3x1mm neodymium magnet

additional stuff:

  • Small glass bottles
  • Epoxy resin
  • Neon powder sky blue
  • Ring hook screw thingy
  • Nickel strip for magnetic connection
  • USBasp for programing

The main tools i used were:

  • Fusion 360 (free) to design the 3D prints and a Printer of cause to print them
  • EasyEDA for all the PCBs and ordered them from JLCPCB
  • Arduino IDE
  • Pikosecond laser marking system (not nececary and not really available for private use but helpful)
  • Soldering iron
  • Patience!!

Step 1: Potion PCB

To fit the PCB and later the Battery inside the glass i cut a hole in the bottom of it. This was done with a pikosecond laser i had access to (not your typical comercial laser). This process might also be possible with a milling machine or glass drill bit. The hole size is 10 mm in diameter ! The circuit is controlled by an ATTINY10 microcontroller to fit the small form factor. It gets an input from a TP223 touch sensor an then switches between different color modes. The positive Voltage of the LED is also put HIGH by the ATTINY to reduce power consumption when in off stage. I also tried to put the ATTINY into sleep mode when the LED is turned off but i did not get it to work properly. The LED is attached with thin copper wire so it can be placed inside of the kork that closes the bottle later. Then i also glued am small metal rectangele on the bottom side so the whole potion can be hold in place by the magnets of the charging circuit afterwards.


I used this code from GitHub and the ATTIN10Core with a USBasp programmer to upload the code:

https://gist.github.com/MichMich/32ca143709ef9391f1f16c88a824188e

https://github.com/technoblogy/attiny10core

Step 2: LiPo Protection

Because the battery wont be acessable later i also had to fit a under-voltage protection inside the glass bottle. For this i used the standard DW01A circuit an even salvaged all the part from these cheap TP5040 modules. The PCB was also engraved with a laser. I had a very thin copper clad plate that does not need a lot of space and get directly attached to the battery. (Thin PCBs are a lot more expensive on JLCPCB and luckily it does not have to be double sided)

I also wanted to laser engrave the glass bottle but with the battery inside there was not enough contrast to see it. So i ended up laser marking the battery itself (to get even more details in the project :D). A sticker of some sort would of couse also work.

Step 3: Putting the Potion Together

Last step for the potion is to solder everything together and put it inside the glass bottle. I drilled a hole through the kork to then hide the LED in and especially because when filling the bottle up with epoxy all remaining air bubble can escape through it. I also mixed some glowing powder into the epoxy to also have a glowing efffect even when the LED is off. For pouring in the epox, the bottom seams can be covered with hot glue, which is easy to remove again. Before the resin is fully dried and all air escaped i sealed off the top of the kork with residue from the drilling done beforehand. And lastly a hook is screwed in so the potion can be attached to a necklace or other.

Step 4: Charging Shelf

Of course we need a way to charge the battery. For this i also designed a PCB with two charging circuits with TP4056. Both are connected to a ATTINY84 with a optocoupler so the charging state can be read out. The optocoupler replaces the normal charge and standby LEDs. The ATTINY can also power a small OLED display which later shows a pixelart of a potion. For the charging state i also animated a few frames where u see the potion filling up. The shelf itself was designed with Fusion360 and printed out.

To connect the potion with the charging circuitry i used magnets and a spring loaded connectors (pogo pin). For this purpose there are two exposed contacts on the potion pcb that get pressed against the connector. This is also why the metal plate is glued on to the potion in step one.

To programm the ATTINY its pins are routed to the USB-C connecter to make uploading code easy.

Step 5: Enjoy

After a dozend of failed iteration (like with every diy project) its finally done. I thank every person that inspires me to build such things and get me to learn new skills every day.

So writing this instructable i want to give back the inspiration i alway get from these kind of comunitys and i hope i can share more projects in the future