Propeller Clock: With a Propeller Chip! – “Digital” style POV clock

Everyone loves Propeller clocks! Now there is one powered by a Propeller Chip! If you don’t know what a “Propeller Clock” or a “POV clock” is, look at the images below. Also, FYI, POV stands for “Persistence of Vision”.

This is the Propeller Clock (or POV clock as it will now be referred to) in action.

This is a side view of the POV clock setup, complete with motor.

This is the POV clock from center view, as it looks like when you are looking at the time.

The POV clock is mounted on a CD, as shown here.

Here is the motor that spins the clock. It is powered by a separate power source and the motor has been taken out of a CD player, so it even has the attachment for spinning the CD on it, which is ideal for this setup.

As you can see in the pictures above, the hardware consists of a Propstick USB (the smallest Propeller module I had on hand), 2 AA batteries, and a row of SMD LEDs soldered on a piece of protoboard. I used wires out of an old 25-pin parallel port cable to lead to the LEDs, as it was very thin and did the job right. I didn’t bother soldering the 40 pin header the Propstick is plugged into on a Protoboard, and I just used wire wrap to get all 20 wires hooked up. The only other components I used was a 100 ohm resistor leading to the anode of all the LEDs, and a terminal block to connect to the power. The whole setup was mounted on an old CD, so that it could be used with a CD motor and could be taken off easily for modification.
In a project like this you would think the biggest electronic concern would be programming, but actually the hardest thing to get working was the power. Considering how weight plays a big part in how fast it will move and therefore how convincing the effect is, it is, you would want a smaller battery. So you may be wondering why I went with the heavy AA cells? Well, any other batteries couldn’t supply enough current and the Propeller would reset. I originally used a small 12V battery that weighed only a few grams, but the Propeller was resetting once every second. I then added the 100 ohm resistor so that the LEDs wouldn’t draw as much current, but it still reset once every 6 seconds. I eventually found that the only power source that would NOT reset the Propeller chip was 2 AA cells, which is what I ended up using. Of course, now I have the weight problem. Fortunately I found that it can handle the imbalance if I mounted the motor in a stable plywood casing, as seen in the picture above.

From a programming standpoint it is really quite simple. It has numbers and a colon (“:”) stored as longs in the data block, and they are directly accessed by the pins. There is no RTC on this clock, which means it has to be set in program and never turned off, but it keeps accurate time. When I get my RTC from Jameco I will use it instead, as it retains the time and is much more accurate. In the meantime, though, this is a good “proof of concept project”. I’ll post the modified code when I get it. Anyway, back to the program. It basically starts the timekeeping cog, then enters a repeat loop where it pulses out the numbers, then waits until it has made a full revolution, and repeats. It is really that simple. Designing the numbers in binary and tweaking the “pulse” and “wait” values was the hardest part of programming this project.

I have uploaded a video here
, but due to the low framerate of my camera, it didn’t turn out so well. Skip ahead to where it isn’t blurry.

Click here to download the source code

Thanks for reading! Please comment and subscribe to my RSS!

Posted in Completed Projects, Propeller | 12 Comments

Playing around with Android Programming


If you are wondering where I’ve been for the last few weeks, in addition to numerous other things, I have been studying the Android OS and native programming language for the sole purpose of one day creating and Android app that works, even though I have no Android to run it on. You may be wondering if programming an Android is anything like programming a microcontroller. IT’S NOT. Even if you are a great microcontroller programmer, which I am not, you will still have trouble switching to the totally different environment of the Android. I set my goals for the Android low, the first app I’m aiming to make only involves counters, buttons, and text boxes. I still don’t have a working version, though.
But that aside, let me give a quick review of Android programming.

PROS:
(1: GUI interface for designing the user interface on the Android device.
(2: Very nice IDE with good error checking
(3: Writes in Java, which once you know the language that knowledge can be applied to also make Blackberry apps
(4: Includes a simulator, so even if you don’t own an Android, you can test it with a virtual one on your PC
(5: Uses Eclipse, which can also be used to program the Blackberry

CONS:
(1: Java is a very hard language to get used to if you have only written in SPIN, Python, and similar languages. It should be an easy transition from C or C++.
(2: You have to import EVERYTHING YOU USE in the main Java file, instead of it doing it automatically when you add the feature in the GUI editor.
(3: The GUI editor doesn’t allow you to have more than 1 feature in line unless you change the layout. This can be annoying if you want a button next to a textbox, or something similar.
(4: The Emulator takes a long time to load, about 5 minutes per debugging, which gets tedious to test minor updates
(5: Starting a new project is a long process and is easy to screw up if you enter, say, the wrong Android version and “Mini SDK number”.
(6: Eclipse is fully featured and therefore has a heavy processor draw on your computer, especially slower ones, and takes a few minutes to start up after you click the icon
(7: Installing all the software to program the Android is a PAIN and is a process also easy to screw up.

Here is what I use for reference.
The Android Developers Site
The Hackaday Android tutorial

I’ll update if I make any more progress with the Android, (other than making a list of pros and cons!!) but for now, I’ve started working on another project with good ol’ microcontrollers. If it works, I’ll post a writeup about it. If it doesn’t, well, I’ll still post something about it.

Anyway, thanks for reading! Subscribe to my RSS!

Posted in Experiments, Ongoing Projects | 3 Comments

Digital Measuring Tape – AKA poor man’s mini-rangefinder

This is one of those small-but-valuable projects. Simple, but useful. The guts of it is basically a Propeller module cut out of the middle of a Protoboard, (I’ve used this before, Jeff Ledger has an article on it on warrentyvoid.com) a PING ultrasonic sensor, a 3 digit 7 segment LED display, and a PowerTwig from WBA consulting. The whole thing is powered by a 9 volt battery.


Sorry for the fuzzy picture

The program is straightforward, it reads the data from the PING with the default PING object, than converts the value to decimal and displays it (using multiplexing) to the 3 digit 7 segment LED display. The code does have limitations, though, that should be overcome with some experimenting. For starters, it only reads up to 125 inches, when the PING could probably read up to 25 feet. This [I believe] is due to a code size limitation; the amount of microseconds 1 long of data can hold. I’ll be working on it, setting up a terminal to log the amount of ticks from the PING and measuring (in feet) the distance to make sure the data is consistent.
If I modify the hardware it would be to, oh, ADD AN OFF SWITCH! Currently you have to pull the battery to cut the power because I didn’t have any small switches on hand to use for this project. I may also add a pushbutton and an accelerometer, then it would allow you to turn it to “level mode” for the full carpenter’s tool!
If you want to build one in a similar case, be sure to note that to fit the powertwig in, you kind of have to bend it around the curve of the plastic. Also be careful with the Dremel when you make your cut for the display so that you don’t have to cover up your “slip marks” with a nicely placed label and logo like I did!

I call this the “Poor mans mini-rangefinder” because it only costs about $50 to prototype: $30 for the PING, $10 for the Propeller setup (free if you use a scraped board like I did) , and $10 for the Powertwig. Of course this is assuming you already have a case and display, but even these don’t amount to much.

If you want the extremely versatile code for this project, you can download it here or on the Downloads page:

Digital Measuring Tape Source Code (.spin)

Thanks for reading! If you enjoyed it, please subscribe to my RSS!

Posted in Completed Projects, Ongoing Projects, Propeller | 2 Comments

RFID Employee Time Clock – Version 3

Yes, count them, 3. Over the past year this project has had 3 hardware reversions and 6 software reversions before it finally works the way it is supposed to. It also looks pretty nice, too.

I specified this as an “Employee” time clock so as to not be confused with an alarm-clock setup.

The RFID Employee Time Clock is designed for small businesses to log what time their employees enter and leave, add up the total working time, and print it out at the end of each week. Doesn’t sound hard, does it? Think again. First of all you’re are designing for a person that has minimal knowledge about computers, and doesn’t want to wait to get what he is after.
Last year when I created Version 1 of this device, I used a monochrome LCD for display (an obsolete part, not so great for mass production. :-) ), an RFID scanner for data entry (this remains), and 2 LEDs for displaying the current state of the card. The object used a Propeller chip and 7 out of 8 cogs. The data was stored on the 64k boot EEPROM and the program was riddled with EEPROM address errors. The data was read to the computer via a ratty Visual Basic program which also had consistent errors. In November of last year I just ditched the old one and created a new one with the Propeller Schmartboard that had a keypad for code entry in place of the RFID reader. This device even went so far as to place second in the Schmartboard MCU challenge Parallax Propeller Segment. However, I still didn’t like the way it worked, and I really like the RFID idea. So again I ditched it and recreated the original board without the obsolete LCD, and with an SD card in place of the EEPROM and VB program. Now it is working nicely in fully reproducible state. It keeps time with a DS1302 RTC.

When the SD card is inserted into the device and the device is plugged in, it copies an autorun file and a batch file to the SD card which will clear out the expendable directories and launch the HTML table having the time on it into the preferred web browser. The time is arranged into a table and stored to the SD card as a .htm file that can be opened and printed in the default web browser. All you have to do is pop in the SD card and run the batch file, it even handles the cleanup for you and deletes the timekeeping files so that it will be reset to zero when you put it back in.
I’d go into detail about what the code does, but since source code is worth 10,000 words (who needs pictures?), you can download the source code here.

RFID Time Clock Source Code (.spin)

I am planning on making this into an actual marketable product if I ever get the chance. I just need to clear up one small bug before the source code is perfect. Any comments or questions are appreciated.

Thanks to all my readers!

Posted in Completed Projects, Propeller | 7 Comments

Lilypad + Propeller Chip

I recently purchased Sparkfun’s Lilypad bobbin because I’ve always been fascinated that you could integrate circuits into clothing. However, Auduino-happy Sparkfun doesn’t make a Propeller board for the Lilypad system, so it looked like I’d have to make my own. It was tricky finding something small enough that has through holes with no pins in them, but I eventually settled for Jeff Ledger’s Protoboard hack. I’m sorry that I have no pictures of this hack yet, but I may add some later. I didn’t leave all the space around the edge of the chip as in Jeff’s hack, but I cut down to the 2 rows of connected pins to decrease space. I left enough space at the bottom to solder the programming header and connected it as shown on Warrenty Void.

I found the Propeller setup worked when powered with a 3V coin cell battery.

Now let’s move on to the interface. As cool as single LEDs look, I wanted something, well, MORE. I was thinking a small display. Preferably, an LED matrix. However, once again, Sparkfun doesn’t make one (I’m not bashing Sparkfun now, just illustrating my love of doing it myself). Since I only had the bobbin and thread, I decided to attempt soldering 25 SMD LEDs to the bobbin, which is actually a little protoboard. I first took all of the thread off of the bobbin, which takes longer then you would think, as there is about 5 times more thread on the bobbin than is shown in the picture on the Sparkfun website. I then started to solder the LEDs in a 5X5 matrix. The cool thing is, all the holes are connected by traces, so if you cut the traces right, you only need a few wires to make the matrix!
To solder the LEDs to the protoboard, you put a small solder ball on one hole, then move the SMD LED over to it with your finger while keeping the solder molten. It should bond to the LED. If it needs adjusted melt the solder again and move the LED into place with your fingernail. Now apply solder to the other side, but you don’t need much, as most of it goes through the hole anyway.
Now repeat this step 24 times. To get the layout you want, attach them so that all columns have the polarity facing the same direction, and all rows have alike polarities facing each other (e.g. + to +, – to -, etc). After you get them soldered, (I did it before they were soldered) cut the traces. You want to cut the spaces in between the columns of negative polarity, and the spaces between the rows of positive polarity. Now for wiring. Connect all the positive ROWS together with short wires.
Tada! After hours of work you have a small but cool looking SMD LED matrix, ready to be sewn into a hat or shirt pocket. And best of all: It’s PROPELLER POWERED!!!
Here’s my result:

One more note: About the conductive thread. It looks good, it feels good, but it is impossible to work with. It doesn’t fit through the holes in the protoboard easily, when heat from solder is applied it dissolves, and when you try to wet it to straighten it out it just rolls off. It’s also hard to find a needle that it fits through, so if I ever actually get it embedded into something, it will take days to make all the connections.
Other than that, this is a pretty cool project!

Posted in Widgets | 2 Comments

Microcontrolled Technology blog is now up!

If you are reading this, you must have found it. Welcome to the Microcontrolled blog! If you don’t know me, you can check out my Parallax Forums profile

You can also check my YouTube channel

I’ll be posting [almost] all my projects here now, so check often!

Posted in General | 5 Comments