Saturday, February 5, 2011

Treadmill Desk (Sort of)

About a month ago I read a post on my instructor David's (@DavidElectron) Twitter feed about "Treadmill Desks". Though I do make a point of getting out for a half-hour walk every day, the promise of being able to be productive while exercising was certainly enticing. In the weeks that followed I checked Craigslist periodically in search of a treadmill within my price range. I had pretty much given up hope on finding anything within my price range (< $100) when I lucked out and picked up a decent machine for a whopping $40. Cosmetically it's seen better days, but it seems to work okay and that's all I ask.

A trip to Rona this afternoon left me with everything I needed, and within fifteen minutes I had my "desk" assembled and in use.


Low tech? You bet! But you can't argue with results. Though typing while running isn't really in the cards, hammering out the odd short message while going for a jog is certainly manageable, and the rig works well for watching lectures and videos on YouTube.


The next step is, of course, to hack the controller on the treadmill and interface it to my computer. The controller looks sophisticated enough that it might have some sort of internal serial interface that can be tapped. Failing that, a simple optical pick-up and a small dot on the belt would be a cheap and easy way to get the data I'm after (speed and distance traveled). This particular treadmill also has a manual incline adjustment, so the addition of a tilt sensor to measure the angle the machine is set to is also in the cards. Though I can't afford one now, adding in heart rate data from one of those wireless wristwatch pulse sensors would be pretty nifty too. What can I say? I like collecting data!

The original controller uses a slide pot to adjust the speed of the treadmill, which while being user-friendly is still "old school" in my books. Having the treadmill automatically adjust its speed to create a more uniform workout would be neat, although the idea of implementing the speed control through software seems to have "Therac-25" written all over it...

That's about all that's new up here; at school we're gearing up for midterms so I doubt I'll be posting again until after reading break. Enough vegging in front of the mainframe, time to hop on the running machine and knock off a few Pat Hoppe videos before I pass out for the night.

Wednesday, January 19, 2011

Ten-Minute Shoe Drier

Hi All,

Sorry I haven't written anything yet this year, I hit the ground running with school and haven't really had much time for any side projects, although the number of directories in the "Projects" folder on my computer is steadily growing.

Have wet shoes, two spare computer fans and an old shuttle PC? Make a shoe drier!

 Extremely crude and low-tech, but does the job!

The picture really says it all. The Shuttle PC is serving as nothing more that a power supply for two, 12V 120mm case fans. The fans happen to fit nice and tight in my shoes, and are oriented so that the air is drawn in through the fabric of the shoe and blown out the top.

Not fancy, but it works like a hot (dry?) damn, and setup took less than fifteen minutes.

Credits:

Brad Hall - Thanks for the Fans!
Okanagan College - Thanks for the old Shuttle PC!

That's all for now. The projects from December as well as a few new ones will hopefully see a bit of attention over weekends, I'll keep you all posted.

Happy Travels,

Jamie.

Sunday, December 12, 2010

15 Minutes of Fame, Some Comics, and a pair of Headphones

'Morning everyone,

Just a quick update before I hit the books in preparation for my last week of exams.

Last week had it's trials and tribulations, but there certainly were highlights. I was down in the dumps after a less-than-stellar performance on a C programming final exam, but was soon back on cloud nine when a friend told me that my Bluetooth Thermometer project had been featured on Hack-a-Day. Very exciting!

Though it is not fairing nearly as well (yet), I created an Instructable that details the Arduino Bracket.

Though I have spent the majority of the weekend studying, I did manage to scrawl out a few new comics and post them here. As I was reviewing I came across a number of goofy little sketches and scribbles hiding amongst all the circuits and math notes. I went over them in black Sharpie, scanned them, and have posted them on my site for your enjoyment (or amusement). One quick look should make it blatantly obvious why I am in electronic engineering and not arts ;-).


Now - Some Electronics! Here are my current top electronics projects:


Project 1: ThermoPhones:
Like many people, I have the bad habit of turning the volume on my iPod down almost all the way and leaving the device running on a table so that it is good and dead the next time I want to listen to some tunes. The other night I was out for a walk and a plausible solution hit me - make the headphones heat-sensitive!

Figure 1.0: iPhone Headphones with Thermistor Epoxied

 It's not much, but it is a start. I wired the thermistor up to an Arduino for prototyping convenience, and was able to see a 10c difference between when the headphones were sitting on my desk and when they were in my ear. The idea is that when the microcontroller sees a temperature drop of, lets say 5c in less than one minute, it issues a "pause" command to the iPod. Since it is looking for a change in temperature, it shouldn't have too much trouble when the user goes outside, but this might require further investigation.

Ultimately, the controlling would be done by a tiny microcontroller such as a PIC10F200, and the entire thing should be able to leech enough power to operate from the iPhone/iPod. Hopefully I'll have a chance to get some work done on this project over the Christmas holidays.



Project 2: Auto Rear Window Defogger
Everyone knows that I hate all things manual, and that I consider something as trivial as pushing the button to turn on the rear window defogger in my car to be manual labor. It's not because I'm lazy, it's because the year is 2010. It really shouldn't be that difficult for the car to figure out if the window is frosty, and for it to take action if it is.

Figure 1.1: IR RX/TX pair on a Breadboard with an Arduino (and bracket!)

This project is also still in diapers, but really shouldn't be too difficult to get going. The basic idea is that it will bounce a beam of infrared light off the inside of the car window, and the amount of light received back by the phototransistor will change depending on how clear the window is. If the window is foggy/frosty, more light should be reflected, telling the microcontroller to turn the defogger on. Once the reflected light drops below a certain threshold, it means the window is clear, and defogger should be shut off.

The above circuit is just a rough draft, ultimately it will need some degree of filtering and other noise reduction measures, and of course a relay to control the actual heater. Once I get the voltage levels tweaked and the basic system operating I will port the code over to Hitech C and burn it onto a PIC microcontroller; most likely a PIC12F675. If all goes well the entire board should be less than 50mm x 50mm, which shouldn't be too noticeable in my back window.

That's all I've got for now - I don't know how much progress I'll make on either project this week, but over Christmas I should at least be able to get some of the code written and the hardware designed.

If I don't have a chance to post anything before then, Merry Christmas, Happy Haunakah, メリークリスマス, Joyeux Noel, Feliz Navidad, Geseënde Kersfees, Gun Tso Sun Tan'Gung Haw Sun,  and I'd like to extend the warm wishes to anyone I've missed :-).

Friday, November 26, 2010

Bluetooth Thermometer R3.0 - Up and Running

Happy Friday Everyone,

After another busy week at The OC it was time to kick back, relax, and do some hardware design. After several miserable lab periods spent debugging R2.0 hardware I discovered that for some reason the PIC16F628 was not willing to run off the 3.3V power supply on the board, even though the datasheet claims that supply voltages as low as 3.0V are fine.

Not wanting to waste any more time, I swapped the PIC16F628 out for the PIC12F675 used in the original design. It was such a substantial change that I ended up scrapping the old PCB file and starting from scratch, and after a quick three hours in Altium Designer I had my revised schematic and PCB layout.

Figure 1.0: A 3D Rendering of the New PCB


The design transferred perfectly to copper the first time, bringing the total fabrication time down to just over an hour. Right now I'm just waiting for the new Sure Bluetooth Module to arrive in the mail; in the mean time I have a few wires going from the PCB to a breadboard with the one lonely module I do have jammed into the side.

Figure 1.1: Completed PCB with Bluetooth Module on the Side


I spent a little more time hacking away at the firmware; unfortunately I won't be able to implement any of the configuration options I was hoping to due to the minute amount of memory in the PIC12F675.

That's all for now - With any luck I'll be able to post the firmware, schematics, gerbers, and PCB layout on my website. 

Saturday, November 20, 2010

Bluetooth Thermometer R2.0

Afternoon,

It's been a fair while since I've posted anything - Things at school are starting to wind down (or up, depending on how you look at it) in preparation for the end of the semester, which is now a mere two weeks away.

The Bluetooth thermometer project I started a couple months back has recently been revived and will be making a cameo appearance as my final project for my Introduction to Electronics course. Since it is now a school project and I can actually justify investing time in it, I have decided to make quite a few changes, including a new microcontroller, a firmware overhaul, and finally a PCB.

Figure 1.0: R2.0 PCB Partially Populated

After playing Altium for four hours straight, I finally had a schematic and layout that I was happy with, and transferred it to copper. Top left is the ICSP port and the power connector sitting beside the PIC16F628 MCU. The power supply is in the top right, and in the bottom center you can see where the Bluetooth module will sit. At the moment there are wires carrying +3V3, GND, TX, and RX to a breadboard that has my old Bluetooth module in it. Once I know the layout is good I'll solder one of the new modules I've ordered straight onto the PCB, but at $15 a module that won't be happening until all the bugs are gone and the layout is finalized.

Unfortunately, things don't appear to be off to a great start: as things stand I can't even program the PIC. I'm not sure why, but the programmer isn't able to communicate with the board. I did manage to get it to work once, but that was it. Everything seems to check out okay, but I have a feeling there's a short hiding somewhere.

Schematics, Gerbers, Firmware, and the whole 8.226 meters will posted on my website: www.jamiemaloway.com/projects/bluetooth-thermometer

Friday, November 5, 2010

Arduino Piano (No Floppy Drives Involved - I Promise!)

Sorry for the lack of updates - This past week was a busy one, with much time being spent with the ELEN Workgroup.

So - Circuits: This is a bit of an extension on a project for my Introduction to Electronics course. The original design was a simple, twelve-note Arduino-based polyphonic synthesizer that used an Altera FPGA demo board to MUX the inputs together into a four-bit number.


Along the bottom you can see a row of twelve SPDT momentary push button switches wired up as active-high inputs to the Freeduino board on the left. Switches one through six are wired up to the analog inputs; which can actually be used as digital inputs through the "digitalRead" command using the pin numbers 14-19. The remaining six switches are connected to digital inputs two through seven, with pins ten through thirteen constituting the "data bus" between the two Arduinos.

The Arduino on the left is running David's (my instructor) original synthesizer code. The software decodes the four-bit binary number it sees from the "keyboard" and plays the corresponding note through a DAC over the SPI bus. The pot dangling off the right side of the board is used to fine-tune the synthesizer pitch, and the speaker in the middle-right produces rich, high-fidelity audio comparable to the output of singing greeting cards and the score of most video games from the 1980s'.

I'm still hacking away at the firmware: I'm having trouble figuring out how to encode the number read from the keyboard as a binary number correctly. Perhaps it a solution will jump out at me tomorrow morning...

Oh - and one last thing:

"I ALWAYS have coffee when I watch radar. Everybody knows that!"

Friday, October 29, 2010

Arduino Floppy Drive Shield

Just when you thought it couldn't get any worse. Have you ever wanted to hook a 3.5" floppy drive up to an Arduino?

No?

Well, I have...

Figure 1.0: Taking Something Horrible and Making It Worse

Don't worry - At the moment this is nothing more than a stupid picture and a hunk of protoboard jammed into the top of an unsuspecting Arduino. Implementing a floppy drive controller in software would be a bit of a challenge, however there is no reason it couldn't be done; though some(most) would argue it shouldn't.

For some reason floppy drives make me smile whenever I see them. I'm not sure whether it's their uselessly small data storage capacity or that satisfying "ka-chunck" sound when loading a diskette into a drive, but there's something there that you just can't get with USB flash drives.