Project: Firefly jar
Project: Firefly jar
This magic jar contains little LED "fireflies" which light up in random patterns. It's a perfect gift or ornament for a desk, a night table, etc. The jar uses very little power and will run for years on a single battery.
There's no visible switches or mechanisms on the jar, it operates with a little magnetic "key" and by sensing when somebody touches the lid.
Every jar is as individual as the maker, you can decorate it however you want. Here we only cover the electronics that make it work.
The "brain" of our jar is an Atmel Tiny85. The Tiny85 es from the same family as the Mega328 chip found in an Arduino Uno but it only has 5 I/O pins instead of 20.
Here we see the chip's pins:
Pin 1 ("Reset") is marked by a little dot on the chip. It's vitally important to orient the chip correctly when we use it. The chip could be damaged (or even drestroyed!) if we connect it backwards.
In our jar, three of the pins control the LEDs and two of them are used for sensors (one for the magnetic switch and one for the touch sensor).
We will need the following components to build the jar:
|
Note: We use the low voltage ('V') version of the Tiny85 because we're working with a 3V battery. Do not use the normal version of the chip.
We also need a jam jar with a metal lid and some stuff to decorate it. Try to find an interesting shape jar (eg. hexagonal). Fancy jars distort light and people have to look a bit closer to see what's inside. :-)