Bausätze für Maker

User Tools

Site Tools


Translations of this page:

Sidebar

Bausätze
Projekte
Verschiedenes
Bestellung

Schreib einfach eine E-Mail an:

(Zum Schutz vor Spam ist diese Adresse nicht anklickbar.)

Bits of Time

Bits of Time - An electronic hourglass

The classic concept of an hourglass taken into the modern world of electronics

Like the original antetype the electronic hourglass is started by turning it upside down. A nifty simulation of the grains of sand visualises the lapse of time and reacts naturally on the turning of the hourglass. If time has elapsed an optical alarm is issued. Depending on your needs you can implement more specific actions like pulling the tea bag out of your cup. The electronic hourglass excels on its antetype in the ability to adjust the time in intervals of 15 seconds.

How to build

You will need the usual tools for soldering electronic components. The microcontroller is an SMD type in a SO14 package. You will need the ability to solder SMD components. For soldering the controller it is best to use thin solder wire (0.5 mm) and tweezers.

Also for programming the microcontroller you need a suitable programmer (e. g. ARVisp MKII or USBasp). You should be familiar with flashing a microcontroller. If needed get instructions from the manufacturer of the programmer.

Material

sight of the interiour

  • 1 inclination switch (type SW200D or SW520D)
  • 1 microcontroller ATtiny84A (SMD)
  • 1 pin header with 2 x 3 pins
  • 3 push buttons 6 x 6 mm
  • approx. 8 cm ribbon cable, 5 conductors (not included in the kit)

A kit is available that contains all of the above mentioned items except for the ribbon cable.

Instructions

inclination switch with capacitor inclination switch

  1. On the first PixBlock use solder wick to remove excess solder from the pads for the microcontroller. Then solder the controller to the board.
  2. Assemble the three push buttons and the pin header. The pin header is the ISP connector which you will use for programming.
  3. The inclination switch is connected between GND (CON5, pin 1) and PA3 (CON5, pin 6). Attach it such that the switch is open when the hourglass is upright, and closed when the hourglass is upside down. To suppress vibrations it might be beneficial to connect a capacitor (e. g. 1 µF) in parallel with the switch.
  4. cable connecting the PixBlocks Both PixBlocks are connected with the ribbon cable, where the OUT signals of PixBlock 1 run to the IN signals of PixBlock 2.

  5. Finally you assemble the dot-matrix LEDs.



Operation

Setting time to 3 1/2 minutes

Operating the hourglass is pretty simple.

  • Push button S1 adjusts minutes.
  • Use push button S2 to adjust quarter minutes.
  • Push button S3 restarts the hourglass.

Once the hourglass has elapsed the current time setting is saved to EEPROM. This way the setting is preserved even when the Bits-of-Time are powered down.

Software

Bits of Time

The software is available on Github.

When the hourglass is started the upper bulb is filled with 54 grains of sand. According to the time setting these grains trickle down at a lower or higher rate.

The maximum time setting is defined by parameter MAX_MINUTES.

Flashing the Controller

The microcontroller needs to be “flashed” (i. e. programmed) with the “Bits of Time” software. You will need a suitable programmer (e. g. ARVisp MKII or USBasp). First set the fuses in the controller to the values given by “fuses.txt”. Then write the file “Bits_of_Time.hex” to the microcontrollers flash memory.

Calibration

Bits-of-Time uses the internal RC-oscillator of the microcontroller as a time base. Factory-provided the accuracy is 10 % or better. If you need a higher precision you have two options.

  1. You calibrate the RC-oscillator by loading an appropriate value into the OSCAL register at program start. How this is done and how to find the right OSCAL value is described in the application notes from Atmel.
  2. Adapting the parameter “CALIBRATION” in the software allows to change the time settings. If you find that the hourglass when set to 1 minute actually completes within 53 seconds then set CALIBRATION to (60.0 / 53.0) to correct the deviation.

PWM output

connector for servos

The output PA7 (CON5, pin 10) can provide a pulse-width modulation signal. PWM_MODE chooses between non-inverting and inverting modes. The prescaler setting (PWM_PRESCALER) defines the PWM frequency. With PWM_PRESCALER = 4 frequency is 61,3 Hz. This is suitable for controlling servo motors used in model making. On the PCB you have three solder pads with signals GND, Vdisplay and PA7 to which you can connect your servo.

Cases

The wodden box is only one of many possibilities.

“HorstKevinObst” has designed a very nifty 3D-printed case combining lightness with elegance. He has published his design on Thingiverse to share it with others.

Download

en/projects/bits_of_time/start.txt · Last modified: 2016/06/12 21:18 by fab4u