Sunday, September 26, 2010

Solar-Powered Bluetooth Thermometer (With Support for Laser-Beam Guitars)

This morning I decided that I wanted to know how warm it was outside, and I figured that since I might want the same information in the future it would be a good idea to build a thermometer. A wireless thermometer. A Bluetooth wireless thermometer. A solar-powered Bluetooth wireless thermometer. Yes, that's it!

Below is a photo of what I rigged up, it's not working yet (firmware) but it's a start. In the top-left you can see the Sure Bluetooth module that I picked up of eBay some time ago. With nothing more than +3.3V, this little champ emulates a Bluetooth serial port, which you can communicate with in more or less the same fashion as you would with a real RS-232 COM port. All of the pairing, PIN, and security nonsense is taken care of by the Bluetooth stack on your PC. The big gotcha with this module is that it is fixed at 9600 baud, making it too slow for many applications. My plan was to read the temperature every fifteen minutes and fire it into my PC through the "make believe" COM port; 9600 baud is MORE than ample for what I need.

The actual temperature measurement and A2D conversion is done by a Dallas Semiconductor DS1820B 1-Wire Digital Thermometer. This device sends the temperature data to the 8-pin PIC12F675 microcontroller that takes care of getting the data from the thermometer and sending it on its merry way to my PC through the Bluetooth link.

That pretty much sums it up; coming in from stage right we have +3.3V(ish) from an LM317 based power supply.

Once I get a working version together I'll draft up some schematics and post them here along with the PIC firmware. My eventual plan is to have a small (40mm x 40mm) PCB that includes everything onboard. The Bluetooth module will then plug into a female 10-pin 2.54mm header socket at the back to make a "double-decker" assembly.

Other Considerations:

- Crystals are temperature dependent; will this cause a problem for this circuit?
- How much power does the Bluetooth link consume in standby?
- How big will the solar cell need to be?
- How big will the battery/supercap need to be?

Saturday, September 25, 2010

Wattching Power Consumption

A few photos of the little rig I cooked up to monitor "Vampire" power usage in my apartment. Unfortunately, the CT (current transformer) I have can only measure currents down about 1A, so it doesn't look like this will give me the information I'm after...

How it Works:
Current transformers measure the magnetic field generated by an alternating current passing through a wire and output a proportional DC voltage. The chuck of plywood has an electrical box on it with a plain-old outlet, and a cord from an old microwave. The hot wire from the cord takes a detour out of the electrical box, through the CT, and then back into the box to the outlet. The two red and black wires carry the 0-5VDC output signal from the CT to my DMM (Fluke 89).

The Neilsen-Kuljian A100-1 CT that I have has three scales, and when set to the 0-10A scale outputs a DC voltage from 0-5V (i.e. 5A AC = 2.5VDC).

Knowing the current drawn by a particular appliance, we can then take this reading (for the toaster oven ~9A) and multiply it by the AC line voltage (I measured it to be 122VAC RMS), and this will give us the power consumption in Watts.

Toaster Oven Math:

Voltage Reading from the CT: 4.53V DC

Which works out to: 4.83V / 5.00V (range of the CT) = 0.966 = 96.6% of 10A = 9.66A

Being ELEN students, we know that P = IV, so therefore:

9.66A * 122VAC = 11078.52W

So there you have it folks; if you ever cared how much power I use to cook my toast in the morning there's your answer.

***CORRECTION: As Brad pointed out, it was in fact not George Ohm who came up with the relationship P = IV. I have not looked into this formula's history too deeply, however I would assume that James Watt came up with some variant of it that was then adapted. My apologies for misleading anyone on this. So in summary: The science is right, the names are wrong.

Thursday, September 16, 2010

Breadmaker Hero - For Black & Decker

Just a concept I'm working on. If Microsoft can have Xbox Live I don't see why I can't have BreadBox live. Just think: competing against other lazy chefs to see who can make the best peach flower cake, or the best pizza dough...

Wednesday, September 15, 2010

The Rutland Special

In addition to the world's first (soon to be) Ethernet-enabled bread maker, I am also now the proud owner of the world's most ghetto netbook. I picked this puppy up on Castanet (Kelowna's version of Craigslist) for a whopping $80, which is more that I should have paid, but I must point out that when I bought it, it was still in one piece. After I got it home I found out that the DC power jack was busted, and wrapping the cord around the machine wouldn't do the trick. Not worried about losing points for style, I busted it open, hacked the end off the power adapter, and hardwired the adapter right into the laptop. The battery is toast anyway it will always need AC, and since this thing is just supposed to act as a gateway between mine and my landlord's network I wasn't worried about portability. In summary, don't ask me to fix your laptop.

Monday, September 13, 2010


Here's an idea I've been kicking around with for quite some time now: A small, custom USB keyboard with pre-defined functions for doing math on your PC. The buttons would allow easy input of things like radicals, sums, exponents, fractions, and other miscellaneous formulae. The box would also have a three-position toggle switch to let you effortlessly select between normal, super, and sub-script input. Other buttons might include hard-to-find logical operators like "not equal", "greater-than or equal to", etc.

Anyways, I've managed to get the hardware more or less hacked together (on paper at least) but I'm kind of stuck for the software. My idea was to base it around the PIC18F4455 because it has USB on board and supports a whole whack of HID-related classes out of the box. I'm not sure what kind of software would be required on the PC side; the actual characters ("Not Equal To") should just have ASCII codes that can be fired into the keyboard buffer, but I'm not sure how you'd carry out functions such as selecting super- or sub-script.

If anyone has any ideas or input I'd be interested in hearing from you. Though this was meant to be sort of a personal project there are lots of scientists, engineers, and math teachers out there who have computers and like to do math on them, and they might be interested in an alternative to entering ASCII codes directly...


Oh - and in other news: I wasn't paying attention this morning and I accidentally blew up the WizNet Webserver for the bread maker, so the internet connectivity portion is on hold for a while. The PIC firmware still needs a lot of work (i.e. it doesn't even run yet) so that and school should keep me busy in the mean time...


A quick photo of the BreadBox development setup. In the top right is my "jail broken" Kitchen Aide bread maker, in front of it is my tablet PC hooked up to the breadboard (no pun intended) on the left hand side with a USB-Serial converter. On the board I have a PIC16F627A microcontroller that will be running the bread maker through a few transistors (at the moment I'm controlling the motor and heater through a pair of TIP31c's, however the final version will likely use a MOSFET of some variety). The too-short serial cable is tying the USB-Serial adapter to the PIC via a small board I etched containing an ADM202J (same as a MAX232) in an SO16 package. The first step will be reverse-engineering the recipes that are already loaded into the bread maker and storing them in text files. Stay tuned...

Friday, September 10, 2010

Bloggin' in the Okanagan: Yeah - I like that!

Nothing new to report on my end; I managed to get a little bit of work done this on BreadBox (the Ethernet-enabled bread maker), but it's still a long way off. Right now I'm in Vancouver visiting the folks; when I get home on Sunday I'll try and throw a few pics up, in addition to a more complete description of the scope of the project.

Tuesday, September 7, 2010

We have blag!

Alright everyone! We have blag! And by that I mean I have a blog. If I'm boring, please stop reading. If I'm interesting, you probably have nothing better going on and might as well keep reading.

For those of you who just tuned in, my name is Jamie and at the moment I live in Kelowna, British Columbia, Canada.

I threw (am in the process of throwing) this blog together to share some of the projects I've been cooking up in my spare time. Not really true blog material, but it's sure as hell easier than making a real website, and this is about all the effort you can really expect out of a guy from Cloverdale.