Wireless sensors
23-Feb-10
I am working on a few new projects, many of them are directly related to home brewing in one way or another. I have discovered that having a brewery in my garage means that I need to keep track of the temperature in many locations. As a result I am planning on building small wireless battery powered sensors that are able to transmit back temperature data. Hopefully I will be able to have everything run from 3v and use some clever programing to make it very power efficient. The other issue is cost. I dont want each sensor to cost $20+ as I will easily need 5-10 to start.

Here is my basic idea so far. Use an ATiny85 (8pinDIP package) that runs from 2.7 to 5.5V @ 10mhz, a TMP36 temperature sensor that will also run at 2.7 to 5.5V and a 315MHz RF Link Transmitter that can run from 1.5-12v. These three parts will be combined together with a 3v watch battery and a custom PCB and hopefully some efficient code to make the sensors reliable and low power. I am hoping the ATiny85 can handle using its output pins to supply the RF Transmitter and the TMP36 with power directly enabling me to turn them on and off to save power.



Here is the basic pseudo code for how I plan to have these operate. Since they are transmit only they have no way of knowing if the base receiving device has a good transmission. For that reason we need to implement error checking and collision avoidance.

Power up ATiny
- Wait a second for TMP36 to power up
- Take a reading from TMP36
- Wait a second
- Loop through taking readings 5 times
- Take average reading/compair for reading inaccuracy
- Turn on transmitter
- Wait for it to power up
- Create a packet of data to be sent
[ StartByte ID_Of_Sensor_Bytes Temperature_Reading_From_Sensor_Bytes CRC_Checksum_of_ID_+_Temp EndByte]
- Transmit packet
- Wait a random number of seconds in case of a collision
- Transmit packet again and wait again 5 times incase of collision
- Power down transmitter
- Put ATiny into low power sleep mode for 5-10 minutes


The receiver could be any type of micro controller and would receive the data packets, grab the ID of the sensor and the temperature reading and then do something useful with it like display to an LCD or post the data to a web server. The web server would be able to assign "names" to the sensor such as "Kegerator" so that it is easily readable. I am also hoping to get the cost around $10 for the finished product. The Sparkfun transmitters come in the mail today so the fun is about to begin!
Posted By Brett at 10:48am - Permalink - Comments [0]

iPhone Tech Talk
01-Dec-09
I am currently at the NYC Apple iPhone Tech Talk conference. It is a fun and useful series of talks and sessions all about developing for the iPhone. I learned a bunch of cool things last year and I hope to learn some more cool things this year.

I also had a chance to visit the new Broadway Apple store. It was huge inside. Lots of fun to play with the new 27" iMac. Hoping to go to a few more fun places like B&H while I am here. Follow me on twitter @pcmofo for more updates from the Tech Talk.

Posted By Brett at 9:51am - Permalink - Comments [0]

RFIDLock Instructabe
17-Nov-09
I put up an Instructable on how to build my RFID door lock. Yes, I could have posted it to my web site but Instructables.com is a really great how-to site and reaches a much larger audience. So click on the link above if you want to see all of the details. I am embedding the YouTube video link below if you just want to see the latest video demo of it installed and a brief explanation.

And yes, my project is entered in a contest at instructables.com. So please click the link above and visit the site this week to vote for my project!

Posted By Brett at 8:41am - Permalink - Comments [0]

RFID lock
08-Oct-09
I have been working on building a RFID door lock based on the Arduino Pro Mini. The Pro Mini is a super small version of the Arduino made by Spark Fun and comes in a few varieties. I chose the 328 5v version as it has the most memory and 5v was easy to work with. The overall size of the Pro Mini is about half a stick of gum, and just as thick. Here is a picture of my test setup.

RFID

I separated the 3 different sections of the circuit onto three small bread boards. These are all outlined in blue. On the top left we have the actual reading portion of the circuit which would be located on the outside of the door. To the right of that is the Arduino which will be on the inside of the door for security reasons. At the bottom is a bread board with a single LED which is filling in for the physical door lock as it is impractical to test with the actual lock at this time.

So let me explain each part starting with the reader. The heart of the reading portion of the circuit is the ID-20 RFID card reader. This thing is pretty cool because it handles all of the card reading and error checking that has to do with RFID. It's pretty strait forward to connect, power, ground, and serial output going into the micro controller(yellow->blue wires). It also has a (+) signal when a valid card is read. This signal is wired to a transistor to protect the reader, and the transistor turns on the buzzer. In effect, swiping any RFID card, regardless if it is a valid key or not, will result in a short beep to tell you it read the card. In the middle of the board is a RGB led and near the top right corner you can see the appropriate resistors and red, green, and blue wires connecting to the arduino. More on the LEDs functions in just a bit.

To the right is the brains, the micro controller, in this case, the 5v Arduino Pro Mini 328. The arduino basically takes serial data IN on its RX pin (blue, top right) from the ID-20 reader and determines if the card is valid or not. If it is valid then it tells the green portion of the RGB led to turn on and stay on for 5 seconds. It also tells the Lock to do the same. In this test setup, the RGB led would turn green and the LED at the bottom would also turn on, both stay on for 5 seconds then turn off. If the card is invalid, the RGB led flashes red three times.

Thats the basic operation of the circuit. I am working on a number of other features and improvements. One is the concept of a "master" card. This card, if read, would change the reader from validation/unlock mode into a "program" mode where it would learn new ID cards. After swiping the master card the RGB led begins to quickly cycle through Red Green Blue to indicate it is now in programing mode. The next ID card that is read, that is not on the list of valid cards, is then added to the list of valid cards. Swiping the master card again returns the reader to normal validation mode. This code is nearly complete and I hope to have a video up soon. A few other features I am working on relate to checking the codes as they are coming in to make sure the transmission was successful (check sum) and handling erasing ID's from the controller. One of my goals is to have NO buttons to control functions and rely only on RFID cards. Stay tuned for some more updates!
Posted By Brett at 10:11am - Permalink - Comments [0]

The Lost Symbol
21-09-09
I picked up a copy of Dan Browns new book The Lost Symbol. Personally, I enjoyed his other books, like deception point and digital fortress more than the Da Vinci code. I guess I am just into puzzles and codes. I just finished reading the book this weekend and decided to get on figuring out all of the secret hidden codes. I'm posting them here for everyone to see. If you want to figure them out for your self then stop reading here....

The most obvious and easy to solve code is the ] v [ ^ symbols on the back cover of the book running down the sides of the reviews. Whats intresting about these codes is that if you turn the book their meaning changes. Using the simple reference chart found in the book it is easily deciphered into the following message

ALL GREAT TRUTHS
BEGIN AS BLASPHEMIES

The next obvious code is the 4x4 square of numbers. Again, using the book for a reference it is easy to rearrange the letters to create the following message

YOUR MIND IS THE KEY

Near the spine of the book are the following sets of numbers.

22-65-22-97-27
22-23-44-1-133-97-65-44

These, like other Dan Brown books, represent chapter numbers, taking the first letter of each of the chapters creates the following message

POPE PANTHEON

This does not mean much until you go to google maps and look at the vatican. You can clearly see that the outer walls of the Pantheon create a circle with the center forming an inner circle. Or as Dan Brown refers to in his book, a circumpunct. Notably, in the center of the Pantheon is an egyptian obelisk, as is made reference to numerous times throughout the book.

The final code is the secret telephone number to call to win one of 33 signed copies. The code was super easy to break. It was more difficult to find all of the faint letters. Its safe to assume that 33 other people have already discovered this simple code so I am entering the results here. Calling the number plays a voice mail message with instructions on how to receive your copy. Hidden in pale pinkish lettering are the letters A-J with a number next to each. Ordering the 10 letters alphabetically creates a phone number, ie A2, B1, C3 = area code 202. Here is the full number.

A2 B1 C2 D7 E8 F2 G9 H5 I1 J5

212-782-9515

And that wraps up all of the codes I found in the book. If you found any other ones please send me an email and let me know!
Posted By Brett at 12:19pm - Permalink - Comments [0]

Sanguino
16-Mar-09
I have been playing with a Sanguino development board this weekend. It is a pretty nice chip, a big brother of the popular arduino but with more I/O's and more memory etc. I plan on building an extensive project with it in the coming weeks and months. Here is a quick video of it in action with a test program I wrote.

Posted By Brett at 8:47am - Permalink - Comments [0]