Dado Eletronico
Dado Eletronico
Table of Contents
Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Advertisements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
intro: Faraday For Fun: An Electronic Batteryless Dice
There has been a lot of interest in muscle powered electronic devices, due in large part to the success of Perpetual TorchPerpetual Torch, also known as battery-less
LED torch. The battery-less torch consists of a voltage generator to power the LEDs, an electronic circuit to condition and store the voltage produced by the voltage
generator and high efficiency white LEDs.
The muscle powered voltage generator is based on Faraday's law, consisting of a tube with cylindrical magnets. The tube is wound with a coil of magnet wire. As the
tube is shaken, the magnets traverse the length of the tube back and forth, thus changing the magnetic flux through the coil and the coil therefore produces an AC
voltage. We will come back to this later in the Instructable.
This Instructable shows you how to build an electronic, batterless dice. A photograph of the built unit is seen below.
Image Notes
1. Nylon Cable tie
2. Neodymium magnets
3. Coil wound with magnet wire, 1500 turns, 30 SWG
4. Charge storage capacitor, 4700uF/25V
5. Voltage regulator, LDO type, LP2950-5V
6. Microcontroller, AVR ATTiny13V
7. 3-mm Blue LEDs arranged in traditional dice pattern
8. Bridge Rectifier diodes. 1N5819
9. 2-pin connector
10. Perspex Tube
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 2: Power Supply for the Dice
Both the designs shown in the previous step need a suitable power supply which can be derived out of a wall wart, a suitable rectifier, smoothening capacitor and an
appropriate +5V regulator.
If the user desires portability of the dice, then the wall wart transformer should be replaced with a suitable battery, say a 9V battery.
Other options for the battery exist, for example, to be able to operate the dice from a single AA or AAA battery, a normal linear regulator will not work.
To derive +5V for the dice operation, a suitable boost type DC-DC converter must be used. Figure illustrates a +5V power supply suitable for the dice operation from a
wall 9V battery and the other figure shows the schematic for a +5V power supply from a 1.5V AA or AAA type battery using a TPS61070 boost DC-DC converter.
Such a tube is available from McMaster (mcmaster.com), part number: 8532K15. Magnets can be bought from amazingmagnets.com. Part # D375D.
Image Notes
1. Neodymium magnets
2. Perspex tube
3. Coil
4. 2-pin Connector
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 4: Voltage Generator Performance
How well does the muscle power voltage generator work? Here are some oscilloscope screen shots. With gentle shakes, the generator provides about 15V peak to peak.
The short circuit current is about 680mA. Quite sufficient for this project.
I used 7 high efficiency 3-mm blue LEDs in transparent packaging, arranged in the ‘dice’ form. The LEDs are controlled by an 8-pin AVR microcontroller, the ATTiny13.
The voltage output from the faraday generator is a pulsed output. This pulsed output is conditioned with the help of a resistor (1.2KOhm) and a Zener diode (4.7V). The
conditioned voltage pulses are sensed by the microcontroller to determine if the tube is being shaken. As long as the tube is shaken, the microcontroller waits. Once the
user stops shaking the tube, the microcontroller generates a random number, using an internal 8-bit timer operating in free running mode and outputs the random number
between 1 and 6, on the output LEDs. The microcontroller then again waits for the user to shake the tube again. Once the LEDs display a random number, the available
charge on the capacitor is sufficient to light the LEDs for an average time of about 10 seconds. To get a new random number, the user must shake the tube a few times
again.
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 6: Programming the Microcontroller
The Tiny13 microcontroller operates with an internal RC oscillator programmed to generate128KHz clock signal. This is the lowest clock signal that the Tiny13 can
generate internally and is chosen to minimize the current consumed by the microcontroller.
The controller is programmed in C using the AVRGCC compiler and the flow chart is shown here.
The fuse bits for the controller are also shown here.
I used STK500 to program my Tiny, but you can refer to this Instructable if you prefer an AVR Dragon programmer: http://www.instructables.com/id/Help%3a-An-
Absolute-Beginner_s-Guide-to-8-Bit-AVR-Pr/
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 7: Control Software
/*Electronic battery Less Dice*/
/*Dhananjay Gadre*/
/*20th September 2007*/
/*Tiny13 Processor @ 128KHz internal RC oscillator*/
/*7 LEDs connected as follows
LED0 - PB1
LED1, 2 - PB2
LED3, 4 - PB3
LED5, 6 - PB4
D3 D2
D5 D0 D6
D1 D4
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include<avr/pgmspace.h>
const char ledcode[] PROGMEM= {0xfc, 0xee, 0xf8, 0xf2, 0xf0, 0xe2, 0xfe};
main()
{
unsigned char temp=0;
int count=0;
while(1)
{
/*wait for pulse to go high*/
while ( (PINB & 0x01) == 0);
_delay_loop_2(50);
count=5000;
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
while ( (count > 0) && ((PINB &0x01) ==0))
{count--;
}
temp=TCNT0;
temp= temp%6;
temp =pgm_read_byte(&ledcode[temp]);
PORTB=temp;
}
Image Notes
1. Charge Storage Capacitor, 4700uF/25V
2. Voltage Regulator, an LDO LP2950-5V
3. AVR Microcontroller. ATTiny13V
4. 3-mm LEDs. Blue color.
5. Bridge Rectifier
6. Pulse Detector
7. 2-pin COnnector to connect to the Faraday Voltage Generator
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 9: Completed Assembly
The Faraday Voltage generator and the electronic dice circuit are now connector together, mechanically and electrically. The output terminals of the voltage generator
tube are connected to the 2-pin input connector of the electronic dice circuit. Both the tubes are tied together with a cable tie and for extra safety, glued together with a 2-
part epoxy. I used AralditeAraldite.
Image Notes
1. Nylon Cable tie
2. Neodymium magnets
3. Coil wound with magnet wire, 1500 turns, 30 SWG
4. Charge storage capacitor, 4700uF/25V
5. Voltage regulator, LDO type, LP2950-5V
6. Microcontroller, AVR ATTiny13V
7. 3-mm Blue LEDs arranged in traditional dice pattern
8. Bridge Rectifier diodes. 1N5819
9. 2-pin connector
10. Perspex Tube
http://www.instructables.com/id/An-Electronic-Battery-less-Dice/
Video
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
step 11: References and Design files
This project is based on my previously published articles. namely:
1. "Power Generator for Portable Applications", Circuit Cellar, October2006
2. "Kinetic Remote Control", Make:, November 2007, Issue 12.
Since the project was first prototyped, I made PCB using eagle. Here is how it looks now. Eagle schematic and board files are here. Please note that compared to the
prototype, the components on the final PCB are arranged slightly differently.
File Downloads
bl_dice.c (1 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'bl_dice.c']
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
Related Instructables
Telephone To
An Electronic, Tiny AVR Help: An God by jiovine Getting started
Battery-less A CharliePlexed Microcontroller Absolute with ubuntu and
Dice (video) by RGB LED Dice Runs on a Fruit Electronic Tic- Beginner's How to choose the AVR dragon
Battery by Gadre Tac-Toe with Guide to 8-Bit a by }{itch
Gadre by cedtlab
RGB LEDs AVR MicroController
(video) by Programming- by westfw
cedtlab AVR Dragon by
PopSci
Advertisements
Comments
40 comments Add Comment
I like the way you have sorted out the 2 dice version.
Will you be rapidly changing between the two displays (POV making it seem as though two dice) or one at a time?
If magnet wire wasn't so expensive and hard to find in New Zealand, I would try this for sure! Would most likely use a PICAXE instead as that is what I use.
Keep it up mate!
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
wize says: Mar 7, 2009. 9:26 AM REPLY
It's cooler. And it's electronic and batteryless. Its not just batteryless.
2. Your magnets are fine. Just make sure that the diamater of your magnet and the inner diamater of the tube onto which you are winding the coil are
compatible. While the magnets shoudl slide freely inside the tube, having too much gap is not advisible.
Good Luck!
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
alexgeek says: Jan 17, 2009. 7:18 PM REPLY
Thanks! If not, do many places sell it relatively cheap?
Not found many good sites that sell it.
Cheers.
;)
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/
stevenbelieven says: Oct 29, 2008. 6:10 AM REPLY
led to this application hahahaha it was all about led
AS THIS MY GAME ON A LARGE SCALE !!! IN ASIA PEACE
STEVENBELIEVEN4NOW
This project looks like a tonne of fun, and I have some long thin pcb material just waiting to be turned into something fun. Perhaps its time for me to delve
into AVRs...
I'm wondering if something similar could be built with simple digital logic.
http://www.instructables.com/id/Faraday-For-Fun-An-Electronic-Batteryless-Dice/