Main, skip to top

Morse Code Bicycle Safety Blinker

Front View of Morse Code Bicycle Safety Blinker

$3 in parts
Runs 4 days on 2 AA's

Tired of the boring steady blink? Sport a blinker that will get the attention of any old school ham radio operator! Check the Youtube video of the action.

This is my first project using an AVR microcontroller and really the first embedded systems project I've done since college. I had two options for programming languages C and assembly. I chose assembly because I was familiar (at least with the 8051) and because it is well documented in the datasheets. Another advantage of assembly is the ability to know exactly what is going on especially when using a device simulator.
Tools Needed: Parts Needed:
Soldering Iron
USBtinyISP
Breadboard
Computer
Free Software
#22 Solid Hookup Wire
Wire Strippers
Needle Nose Pliers
Tactile Switch
ATTiny85v Microcontroller
Bright RED LED
9V Battery Clip
2xAA Battery Holder
#24 Stranded Wire (similar to that on the battery clip)
Useful Datasheets:
Battery Holder
LED
Tactile Switch
ATTiny85v Microprocessor
  • Step One: Install the USBtinyISP Drivers. I've found the LadyADA writeup to be quite adequate.
  • Step Two: Install WinAVR. This Ladyada writeup is also worth a look.
  • Step Three: Install AVR Studio 4 (requires registration).
    • Don't bother to install the Jungo USB Driver.
  • Step Four: Write your program in AVRStudio.
    • Open Start -> Programs -> Atmel AVR Tools -> AVR Studio 4
    • Select New Project
    • Select ATMEL AVR Assembler
    • Give your project a descriptive name and choose a folder. Remember the folder name, you will need it later.
    • Choose a debug platform, if you aren't sure use AVR Simulator.
    • Choose the target device. ATtiny85.
    • Copy and paste the code. If you're brave feel free to tweak it a little.
    • Press F7 to compile the code.
  • Step Five: Program Fuses (this needs to be done once per IC)
    • Check out the The Engbedded AVR Fuse Calculator.
    • Choose the ATTiny85 AVR Part. (There is no ATtiny85v option).
      • Feature Configuration
      • Select "WD. Osc. 128 kHz; Start-up time PWRDWN/RESET: 6CK/14CK + 64ms: [CKSEL=100 SUT=10]
      • A slow clock requires less battery power.
      • Uncheck "Divide clock by 8 internally; [CKDIV8=0]
      • Check "Serial program downloading (SPI) enabled; [SPIEN=0]"
      • All other's should be unchecked.
      • Brown-out detection should be disabled.
    • No changes will be made to the Manual Fuse Bits section
    • Under Current settings copy down the generated AVRDUDE arguments
      • These should look suspeciously like -U lfuse:w:0xE4:m -u hfuse:w:0xdf:m -U efuse:w:0xff:m
    • Stuff to watch out for:
      • Any Clock selection beginning with EXT (you will need a crystal to program your chip)
      • Forgetting to check serial program (SPI) enabled. (Chip is bricked).
      • Disabling reset to gain an extra pin. (Chip is bricked, reset needed for programming.)
    • Open a DOS Prompt and execute the following command: avrdude -p attiny85 -P USB -c USBTINY -U lfuse:w:0xe4:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
  • Step Six: Breadboard the programmer and microprocessor.
    • Set the processor on the breadboard across the channel.
    • Press the pins into the breadboard by gently pressing on the processor.
    • Use #22 solid wire to connect the pins on the processor to the ones on the programmer's 6 pin cable.
    • Keep in mind that your processor may have a dot above pin 1 rather than the notch shown.
  • Step Seven: Program the microprocessor
    • Open Dos and change to the folder your project resides in.
    • type: avrdude -p attiny85 -P USB -c USBTINY -U flash:w:my_project.hex -B 10000 (the -B 10000) slows down the programmer for the slow clock speed.
  • Step: Eight: Connect up the circuit
    • This is much easier to do on the breadboard to get started.
Advanced Concepts
Integrating USBTinyISP w/AVR Studio
The Simulator (See AVR Studio Help Screens)

In this case I mounted the whole deal to a Fi'zik - Saddle Attachment system.

Random Invention Idea

A device that is sewn either into a diaper or underpants for young children. This device uses dissimilar metal wires of a small diameter woven into the material in such a way that they do not contact the skin but when the cloth they are sewn into becomes damp, they will produce a small amount of power that will alert the parent using a light or more likely a low power buzzer.

A second way to accomplish this would be using a small battery that attempts to push a current through similar wires as above to activate a buzzer.

A third way would be using a special stitch that would cause wires to either come together or separate due to the expansion of the diaper as it absorbs liquid.

The whole point of this would be to alert the parent that the diaper is ready for changing. Any additional delay will probably moisten the clothing.

Plants along the Garrison Creek Trail

As a fun Sabbath project, I've been trying to photograph and identify various plants along the nature trail behind our housing development. Obviously many of the plants aren't all that exciting. In fact this could probably be relabeled, "Common Weeds of College Place". But I'm learning fun things about plants in the process.

Flax (Linum usitatissimum)
Blooms late spring (May). Bright blue flowers. Grows to nearly 3ft tall. Useful for it's edible seeds and fibers.

Common Mullein (Verbascum thapsus)
Tall 5' to 6' in height. Produces velvety leaves and yellow flowers. Prefers sunny areas.

Wild Teasel (Dipsacus fullonum)
019 Tall 5' to 6' in height. Each plant produces multiple purple flowers. These flowers are unique due to long spines that grow up around the flower. Prefers sunny areas.

Elderberry (Sambucus nigra)
019 Large bush with small bluish white berries.

Cleavers (Galium aparine)
Cleavers Rapidly spreading vine with sticky leaves and seed pods. Produces small white flowers. One of the inspirations for the creation of Velcro.

Poison Hemlock (Conium maculatum)
031 Tall plant with small white flowers and roughly triangular divided leaves. Very Poisonous, leave this plant alone!

Bittersweet Nightshade (Solanum dulcamara)
031 Upright plant, with purple shooting star type flowers. Mid to late summer Red and Green berries grow. Berries are attached to the stem by a five pointed star shaped sepal. Not as poisonous as Deadly Nightshade, but it is still wise to avoid ingesting any part of this plant.

Mint (Mentha)
031 Toothed leaves, growing in groups of two that may also be combined with two flowering stalks. Square stem with small white flowers. Each flower has 2 fused lobes on top and 3 fused lobes on the bottom. Leaf smells decidedly "minty" when crushed. Appearance is very similar to stinging nettle, which does not smell minty and has small spines on the stalk and undersides of the leaves.

Common Mallow (Malva Neglecta)
031 Rounded leaves with seed pods that resemble buttons or cheeses. These seed pods are edible containing a relatively large amount of protein and fat

Orange Jewelweed (Impatiens capensis)
031 Native to North America. This plant has been used as a traditional remedy for Poison Ivy. It produces pods that, when ripe, explode at the slightest touch. This gives them another nick-name, Touch-Me-Not.

Why?

Tags:

This morning I asked Laura what makes the two's so terrible. She told me it might be because they walk around the house repeating "Why?" over and over again. But, she did this with in ear shot of Peter. About a minute later we hear Peter roaming the kitchen saying "Why?, why" Why?" Oops!

Christmas Cardcast

Tags:

Merry Christmas everybody!

If you would like to hear our Christmas Card Podcast, here you go!

Bottom, skip to top