Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.


Member Since 23 Sep 2012
Offline Last Active Jan 31 2014 09:43 PM

Topics I've Started

Christmas Hand Bells

25 December 2012 - 06:29 AM

I love the Christmas season with all of the lights, decorations, and music – especially beautiful hand bell music. So… how could I resist making a Netduino-based Christmas Hand Bell project to make Christmas music whenever I wanted?


For the bells, I used a Kids Play 8 Note Handbell Set (Rhythm Band RBI08) I bought from Amazon. Although they are children’s bells, they are good quality and sound great. The 8 notes range from Middle C to High C without sharps or flats. It would have been nice to have the extra sharps and flats, but the 13 bell set was too large for my design. The bells are mounted to the underside of the cabinet shelves using aluminum straps and held in place using tie-wraps.

Attached File  Figure 1.jpg   30.68KB   32 downloads

To ring each bell, I used a small 24V push/pull solenoid from Adafruit. I’m only driving them with 12V, but they still work fine. I found that I had to energize the coils for at least 25 ms to get a good “ding” out of the bells. Some weren’t as powerful as others, so I had to pick the best 8 of the 10 I bought. The solenoids are arranged to strike the back lip of the bells.

Attached File  Figure 2.jpg   38.78KB   45 downloads

To add a visual effect along with the sound, I used four 12V low-current incandescent bulbs from Radio Shack to flash with the notes as they play. To give the effect of a brief pause between notes, the light is turned off 100ms early. Since I only had four lights to use, I matched them to pairs of bells: Middle C/D, E/F, G/A, and B/High C.

Of course, I used the Netduino Mini; my favorite option for embedded Netduino projects. The Mini is mounted in a specially designed circuit board for this project. I designed the board using the popular Fritzing software and had Fritzing build the board for me in Berlin. This was my first attempt to design and fabricate a circuit board. It was fun and turned out great. It really simplified assembly and my soldering time was cut significantly.

Attached File  Figure 3.jpg   50.54KB   47 downloads

I used toggle switches for power on/off control and to add a 5 second / 5 minute selectable delay between songs. Even I might go crazy hearing these bells non-stop for hours on end!

As a final touch, I wanted to mount the bells in a display cabinet that I could be proud of. I made the cabinet out of Red Oak and stained it to match our décor. I really wanted it to look nice, so I put extra time into it.

Attached File  Figure 4b.jpg   60.52KB   45 downloads

I mounted the electronics to the back of the cabinet, with a Plexiglas cover so I can see the electronics – sometimes I forget which side should face outward!

Attached File  Figure 4a.jpg   48.96KB   31 downloads


As it turns out, there are a lot of good Christmas songs available in the Middle-C / High-C range. I used a few songs from the song book that came with the bells, and several from a book called “Christmas Carols 110” for keyboards (1975, Hal Leonard Corp.) I have 26 songs in all.

I encoded the notes in a string for each song. Each note in the song is identified by a letter followed by its duration in eighth-note tics; for example, a “B” eighth note is coded as “B1” and an “F” quarter note is code as “F2” and so on. To differentiate between the two different C’s, I used the letter “H” for High C. “R” represents a rest.

Each song is in the format: string Name, integer Tempo in ms, and a string of Notes separated by spaces; such as: "O Come, O Come Emmanuel", 250, "D2 F2 A2 A2 A2 G2 B2 A2 G2 F6 G2 A2 F2 D2 F2 G2 E2 D2 C2 D6 G2 G2 D2 D2 E2 F4 E2 D2 C6 F2 G2 A2 A2 A2 G2 B2 A2 G2 F6 H2 H6 A2 A6 A2 G2 B2 A2 G2 F6 G2 A2 F2 D2 F2 G2 E2 D2 C2 D10 R4"

None of the songs have more than one note playing at the same time, so I could keep the programming simple. I considered several complicated approaches before I realized that I didn’t have to play more than one note at a time.

Attached File  HandbellChimes Code   5KB   7 downloads


A simple on/off switch controls power to the set. After powering up, the software plays the scale to verify the operation of the bells and lights, waits 5 seconds, then begins playing songs. The software randomly selects a song from the list of available songs, but doesn’t repeat any of the last 5 songs.

The song is “played” by splitting the song string into an array of individual note strings using the split operation (space delimiter) and then using a foreach statement to sequence through each of the notes in the note array.

Each note is played by energizing the appropriate solenoid for 30 ms then delaying for the remainder the note (Tempo times the duration, minus 30ms). The appropriate light is energized when the note sounds, and turns off 100ms before it is scheduled to end.

Following the song, the software pauses either 5 seconds or 5 minutes (depending on the toggle switch) and then plays another song at random.


(pardon my thumb…)

A Moon Phase Clock

29 November 2012 - 04:02 AM

I’m not sure about you – but ever since watching the Apollo 11 mission in 1969, I’ve been obsessed with the moon. Combine that with my obsession for cool electronic gadgets and Netduinos, and you get the following project: a Moon Phase Clock. And what better time to post this project than during a full moon!

I thought it would be fun to make a clock that showed the current phase of the moon. The project turned out nicely and is currently mounted on the wall of my wife’s first grade classroom. The students are fascinated by it and refer to it often. See Figure 1.

Operation: The shapes of the moon (i.e., the lunar phases) are caused by the light shining on the moon and the position of the Earth relative to the sun and moon throughout the lunar cycle. For my moon, I decided to have 8 lighted segments; which allows me to depict 16 different moon phases, from a New Moon (fully dark), to a Full Moon (fully lit), and back to the New Moon again.

As described in http://www.moonconne...on_phases.phtml the synodic period, or lunation, is exactly 29.5305882 days. It's the time required for the moon to move to the same position (same phase) as seen by an observer on earth.

For my project, the 29.5305882 day synodic period is divided into 16 clock phases, each 1.8456617625 days; or 44 hours 17 minutes and 45.176 seconds; or 159465.2 seconds long. My clock uses a counter to keep track of the time, and advances to the next phase after each 159465 second interval.

Construction: I used an old wall clock for the chassis and put a picture of the moon under the plastic front as shown in Figure 1. The face of the clock is segmented into 8 sections, each with a pair of bright LEDs, as shown in Figure 2.

For the electronics, I used a Netduino Mini mounted on a Radio Shack circuit card. Each of the 8 LED moon phase segments is powered by a GPIO output pin connected to an NPN transistor. The Phase Advance switch shorts a GPIO input pin to ground to allow me to set the clock. This is shown in Figure 3.

On startup, the software initializes its program variables, performs a simple LED test to verify that the lights work, sets the clock to a New Moon (no lights lit), and starts a counter to keep track of the time. When the time for a phase elapses (159465 seconds, as explained above), the software advances the phase and turns the next LED segment on or off, depending on whether the moon is waxing or waning. The user may also advance the phase by pressing the Phase Advance button. The code is included in Attachment 1.

Netduino as a [Network] Peer - Morse Code Chat Room !

11 November 2012 - 05:26 AM

Here's anexcerpt from a presentation I made on options for embedded net-enabled softwareapplications (using a Netduino).

The purpose here was to see how easy it would be to use the Netduino as anetwork peer. I had fun writing the morse code software and creating a "morse code chat room."

Summary: you'll have to read it to see!


Device as a [Network] Server

11 November 2012 - 05:23 AM

Here's anexcerpt from a presentation I made on options for embedded net-enabled softwareapplications (using a Netduino).

The purpose here was to see how easy it would be to use the Netduino as anetwork server. (I especially liked the Magic 8 Ball.)

Summary: you'll have to read it to see!


Netduino as a [Network] Client

11 November 2012 - 05:18 AM

Here's anexcerpt from a presentation I made on options for embedded net-enabled softwareapplications (using a Netduino).

The purpose here was to see how easy it would be to use the Netduino as anetwork client.

Summary: you'll have to read it to see!


home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.