Logo

“The reason why worry kills more people than work is that more people worry than work.” - Robert Frost


Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 975

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 975

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 975

Warning: mktime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 975

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1163

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/FeedForAll_XMLParser.inc.php on line 1344

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 846

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 847

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 848

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 849

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 917

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 918

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 919

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 920

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 917

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 918

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 919

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 920

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 917

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 918

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 919

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 920

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 917

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 918

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 919

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hooovahh/public_html/rss2html/rss2html.php on line 920
Pic 3

Hooovahh's Blog



New Micro, New Project


12/16/2014 03:46 PM

New Micro, New Project

So I've discovered my new favorite microcontroller.  It's the Teensy, and right now it is version 3.1.  I've used the Teensy on a few small projects at work, and love how powerful it is, in such a small form factor, while being cheap, and Arduino IDE compatible.  After using the Teensy on a few projects, I doubt I'll ever go back to an Arduino, unless some new awesome version comes out.

Anyway so I have this time off of work, and I wanted to give my self a project using the Teensy while I am off.  I didn't know what I wanted to do but I had a few ideas.  I saw the powerful audio library made for the Teensy and thought that would be a fun start.  I also saw some neat LED matrix boards and thought about some kind of bright sign of some kind.  And lastly I knew I wanted to incorporate the ESP8266 WIFI chip.  This is the dirt cheap WIFI chip from China that has been getting more support from communities, and figured it would be the cheapest way to add wireless to any microcontroller project, assuming a WIFI network exists in the area to connect to.

So with all this in mind, I decided to make some kind of scrolling marquee sign, which could be updated over WIFI.  Later I decided to add the audio capabilities for performing FFTs, to visualize the audio being played on my TV.

Parts List

Teensy 3.1 Microcontroller $20
16X32 LED Matrix $25 X 2 = $50
SmartMatrix Shield for Teensy $15
5V 10A Power Supply $25
ESP8266 WIFI Module $5
Various small electronic components (LM317T Voltage Regulator, 220 Ohm, 330 Ohm, and 4.7K Ohm Resistors, small perf board, capacitor, and push button) less than $10.

Total $125 or so

Wiring

So the construction of the project is relatively simple.  Put together the SmartMatrix Shield for the Teensy, and attach it to one of the 16X32 LED matrix boards using any of the methods described in the instructions.  Then connect the second matrix board to the other with provided ribbon cable.  Powering this setup is easy because our 10A power supply is more than enough for our LEDs, and plugs right into our shield.

A push button was added to switch between modes, and is mostly optional but I had one and figured I'd put it to use.  Wire it so that between ground, and the DI pin is a relativly large resistor.  I used a 4.7K ohm.  Also in my wiring I used DI 15.  Then wire the 3.3V out of the Teensy to one side of the push button, and the other side goes to DI 15.  Now when the button is off ground will be going to the digital, and when it is pressed the digital will see 3.3V which is a high.

I also wired a headphone jack to A2 so that the audio can be visualized in an audio spectrum.

Lastly the WIFI module.  This needs to be powered by 3.3V, but draws too much for the 3.3V from the Teensy.  I tried some large capacitors and it would some times work, but had other issues and in the end I just bought a LM317T voltage regulator to convert my 5V from my power supply, to the 3.3V the WIFI board needed.  Using a value of 220 Ohm for R1 and 330 Ohm for R2 should give an output of 3.13V, plus a small amount for a compensation current.  A different regulator could be used but this is what Radio Shack had.  Then the TX and RX need to be wired up.

Below is very crude drawing of the wiring.  Note that the 5V and Gnd are wired to the Teensy using the shield, and are only shown to have the wiring make sense and shouldn't be wired up if that shield is used.



Software

In my mind this is where it gets interesting.  So the SmartMatrix boards I bought have a working library and demo which generally was designed to work with a single 32x32 matrix board.  I first had to make sure a single 16x32 worked, then looked into making the software support 16x64.  Luckily some work had been done to support multiple boards being daisy chained together, but they were for much older revisions of the library, which didn't have the audio example I wanted.  So I took the newest revision of the library, and updated it with the changes others had made for the older versions to support the wide display.

After this it looked like all the already made functions for text scrolling, and object drawing works on 16x64.  I then looked at the audio example and modified it to support 32 FFT categories instead of 16.  I also added some tweaks to it to dynamically change the scale to help with varying audio levels, and to try to detect when there is no audio, instead of displaying noise.

Next was the ESP8266.  This supports many AT commands and behaves more or less like a serial port, where commands are issued, and then you then parse each byte one at a time to determine what the reply is.  After some examples I was able to connect to my WIFI and get an IP address.  I then sent the commands to allow it to accept connections on port 4040, and then parsed the requested URL and turned that into the text to be displayed.

With these changes now when I turn on my device, it will connect to my WIFI and start displaying the assigned IP address on the scrolling LEDs.  If I navigate to the IP address like in this example it would update the text to be scrolled to "Hello World."

http://192.168.0.119:4040/Hello_World

This is of course only if my device connected successfully and only if the IP address was correct.  At the moment it doesn't support all special characters, and it replaces all underscores with spaces.  I didn't take the time to support replacing "%20" with a space.  It will continue to scroll that text over and over until new text is sent.  Also at the moment the display is limited to 70 characters or less.

All of the source and libraries used can be downloaded from here.  Arduino IDE version 1.0.6 was used and Teensyduino version 1.20 was used.  You'll need to update the SSID and Password to your network before uploading.

Assembly

To make it look a little better I made a small cage for the hardware.  I used a metal stud normally used in walls, and cut them to the length I needed.  I then used some small chunks of metal and screws to make the cage.  The LED panels have magnets on them so they just stick to the metal cage.  In the cage is all the electronics, and the voltage adapter.  I then can hang it from the wall using two screws.  Below are some images of the assembled cage and lights.

Assembled

Back View

Into Back

With Cage Off

Teensy and WIFI Board

And here are a couple videos of it in action.  The first video just shows how the IP address is shown on startup.  The second video shows the 4 modes, of 'text only', 'audio only', 'text and small audio', and then 'text will full audio'.  The lights are bright and during the day time the text is still very easily readable at 30 feet away.  The video may look odd because the camera is constantly trying to adjust for brightness but it looks normal in person.

LED Matrix Startup


LED Matrix In Action


Improvements

So since making this I know of several things that could be better.  These are all optional and maybe I'll get to them some day.  

  • Microphone 
    • I'd rather use a small microphone and amplifier circuit like this one for detecting sound but didn't order one, and besides I figured the best case for getting the right audio signal would be a hard line from a headphone jack.  This would just make it simpler for the user
  • WIFI page for configuring
    • I would be nice if a web page was made for configuring things like what network and password to connect to on the ESP8266 instead of hard coding it in the sketch.
  • VLC page for current song
    • Right now the device is passive and only updates the text if it is told to.  It would be nice if instead the device looked at a URL and read the current playing song from that.  VLC has this capability and when turned on a basic page gives this information.  It would just take some time to write the code to parse it. The software would also need a way to know what the URL.
  • Maybe make it taller
    • Originally I intended on having two rows of text for the song and artist.  But then realized I'd rather have the audio spectrum and went to one row of text.  If I had bought two 32x32 matrix boards, I could have two rows of text, and room for the audio spectrum.  This would increase cost, and the software would need some adjustments because I'm not sure the library currently supports multiples lines of scrolling text.
  • Improve WIFI connection
    • At the moment there is no retry for a network connection, if it fails the display will show 0.0.0.0 for the IP address.  This has only happened a few times but it could detect this, reset the chip and try again.  Also there are several arbitrary waits that I think could be reduced.  And at the moment it will attempt to reconnect to the network each power up, and this is not really needed because the chip remembers the last connection made.  This could also save several seconds on startup.





Arduino Project


09/12/2011 01:42 AM

Idle Hands

For some reason, every once in a while I get the feeling that I don't have enough to do.  I should realize I have many projects going on at once and should finish one before starting another; but I don't.  Recently I heard about an issue my father has with a setup he has where he needs to take a temperature wirelessly and I thought "I'm not doing anything else, let me start a new project."  And so started my long journey into the world of micro-controllers and Arduinos.

Like Father Like Son

I'm going to give just a little background about why my father needs to take a temperature wirelessly.  You see my father is like me (or rather I'm like him) in that when we are idle we make up projects to do.  One such project for him was to setup a wood boiler in the garage, to heat water, and send the hot water underground to his home.  Where he could use it to heat his house, and be used as hot water for showers and faucets.  He lives in a somewhat secluded place, surrounded by wooded areas.  Every year a few big storms will go through and knock down a some trees.  He will split it up, stack it for drying, and burn it during the winter to help cut down on the gas bill for heating the house.  As an added bonus the extra heat put off by the boiler helps keep his garage warm in the winter, making it easier to work on the cars.  When controlling this system it's important to know what the temperature is of the water inside the boiler, to help him know when to add more wood, and to adjust the amount of oxygen in the mix.  There is also an automatic blower in the system that helps stoke the flame, and help the boiler burn more efficiently.

Originally my father used a car thermostat to tell him the temperature of the boiler, from inside his house.  He took the temperature sensor from a car, and put it in the boiler in the garage.  He then ran the signal wires underground to the house, where he hooked it up to a temperature gauge from a car.  This worked all right but the gauge's range was not too wide, and the gauge is too small to get a accurate reading.  Also the wires underground are about 60 feet long.  Much longer than the intended length of 5-10 feet that you have from the engine to your car dash, which gives an even more inaccurate reading.

New Design

So I set out to try to find him a wireless solution.  A way for him to tell the temperature of some water from about 50 feet away.  The temperature may get as high as 230F, but will likely be between 150F and 200F.  I couldn't find an off-the-shelf product that was cheap and gave the ranges we needed.  There are several weather devices that also tell humidity and forecast, but the temperature range only goes up to 150F.  I realized the perfect solution would be either a Thermocouple or and RTD.  The easiest way I knew of taking a thermocouple reading was with a level shifter and a DAQ card, but that would require 2 PCs talking over WiFi, and I didn't have 2 PCs and didn't want all the extra hardware.  The perfect solution was something I had heard about but never used.  Arduino.

I knew that there were LCD displays, Wireless modules, and thermocouple devices for Arduinos, so I knew technically it was possible.  But I wanted to do it as cheaply as possible.  It also seemed a little overkill to use two Arduinos just to send one temperature signal.  So I figured I could add a few features for a little more cost.  Like the ability to read the temperature in the garage, or to know when the blower turns on.

Initial Development

I bought 2 Arduino Unos for development, and intended on making my own out of raw parts when I was done.  I also bought a 16x2 LCD display, a MAX6675 Thermocouple reader, an LM35 ambient temperature device, a few bread boards for development, a perforated board for final build, a cheap wireless transmitting device, and a few other small odds and ends.  I'll get to total cost later but my goal was less than $100 after shipping.  If you plan on making your own feel free to use a different LCD and possibly LM36.  Alot of these parts can be swapped out with minor (if any) changes to the software.

My first experience with Arduino was a good one.  For first time users there are tons of examples with the development software.  I've used some other text based programming environments that are easier to use but for the most part it was good enough.  I started by trying to interface with the LCD, and the MAX6675 thermocouple.  Both had examples and libraries so it didn't take long to display the temperature on the LCD.  I also allowed the back-light to turn on and off on the LCD by reading an analog in pin looking for a button press.  Next I wired up the LM35 which takes an ambient temperature reading, which isn't as accurate, or as large of range as the MAX6675, but it is cheap and only takes one analog pin, where the MAX6675 takes at least 3 digital pins.  The last thing to interface with was the blower.  The blower it self is powered by a 120VAC relay which is controlled with its own temperature sensor.  The easiest way I thought of detecting when the blower was turned on, was to tap into the 120VAC signal that powers the blower, and put that into a voltage adapter, which would output a low voltage DC signal that can go to another analog in pin on the Arduino.  So when the blower turns on the Arduino will see a voltage greater than zero volts.

Wireless Issues

All this worked just fine, so the next step was the wireless module.  Wanting to go cheap I choose a Superregeneration transmitter and receiver pair with two Arduinos.  The devices them selves are getting harder to find and I ended up getting the pair on ebay.  I went with them instead of one Arduino and two Xbees wireless devices because of cost.  Two Xbees definitely have a longer range, and better reliability than the cheap wireless modules.  But I only needed to send about 4 bytes of data a second, nothing very high speed, and nothing system critical.  If we lost half the messages the only repercussion would be that the LCD would only be updated every two seconds.  For this system getting one update a minute would be sufficient.  The cost of two Arduinos, and the wireless module is about $60 if I buy the Arduino Unos pre-built, but only about $30 if I build them from scratch.  The cost of an Arduino and two Xbees is $75 if I buy the Arduino Uno pre-build, and $60 if I build it from scratch.

I did have issues with the cheap wireless devices.  The first issue was finding some.  There are plenty of posts people have made, explaining how to use these cheap wireless modules for simple communication, but almost all of them say to buy them from SparkFun.  Unfortunetally SparkFun no longer caries the Receiver, they do have the Transmitters at the moment for some reason.  So I Googled and found a few places in Europe but I was hoping for some thing closer.  I ended up going to Ebay and found a pair that seemed the same but they weren't.  Even so the vendor said that they would work with an Arduino Uno.

After receiving the transmitter receiver pair I had issues getting it to work.  Eventually I convinced the vendor that it was broken and they send a new transmitter and receiver.  After I still couldn't get it to work I realized that the transmitter and receiver were backwards.  No where in their documentation do they say which is which.  They just show which pins are Data, they don't say Data In or Data Out.  In either case I got two transmitters and two receivers for $6 with free shipping.

Prototyping

Like most engineering challenges, it's a good idea to work your way up, proving out design as you go.  So for me the first thing was to interface with the LCD.  I figured I would use it to display debug information and it would help prove out the rest.  I soon realized that the Arduino has a simple Serial Port monitor so performing debug information is simple.  After that I hooked up the MAX6675 thermocouple, the LM35, and a switch to turn on and off the LCD display.  I put all of this on one Arduino, but in the final build one Arduino will display the other will read data.  Because of this it meant that all of the IO I needed to send and receive data could be on one Arduino.  So in the future if I wanted to add an LCD to the transmitter I could without needing more IO, or any much code changes.  Here are some pictures of the build at this point.





After the basics were working with the Unos I bought the parts to make my own Arduinos on a bread board or perfboard.  It costs about $20 in parts for both Arduinos after shipping cost.  After a few tutorials, and burning the boot-loader to the blank ATMega328s I had it working.  I put them in a few nice boxes, added a few voltage adapters, and put the transmitter on a tether so we could get it as close to the receiver as possible.  The two would be about 50 feet away, going through two exterior walls, which in my tests is about the limit of them so I wanted to improve my chances of getting valid data.  I added some code to clear the display if an update isn't received within one minute.  This means as long as there are numbers on the display, the data must be one minute or less old.  I also added some code to average the last 4 valid data points, and to allow the display to be in degrees C or F.

Here are a few photos, of the breadboard arduino and the perforated board for the receiver.



Cost

MAX6675: $21.13
LM35, Protoboard, Button, POT: $4.13
Parts for 2 Arduinos, ATMEGA328, Sockets, Caps, Voltage regulators, Crystals: $17.69
Wireless Module (ebay): $6
LCD 16 X 2: 15.94
Total (including shipping): $64.89

Now this total is a little deceiving for a few reasons.  For this project I also bought two Arduino Unos for development, and some breadboards.  I also had some parts just sitting around.  Here are a few things that I had that didn't cost me anything for the build, but would cost me if I needed to make more.

2 Voltage regulators, 6V-12V 400mA each.
Voltage regulator, 3V 100mA
2 1KOhm resistors 1/4 Watt
2 Resistors of same size >500KOhm
One small project box
One medium project box
One large project box
2 DB9 solider cup female
2 DB9 solider cup male
2 DB9 hoods
Ethernet cable, about 5 feet
Other assorted wires, total around 8 feet

It's hard to say that if I had to buy all of these that the project would still be under $100.  Voltage regulators new are over priced but any decent garage sale has them in the free box, or usually less than a dollar.

In any case, here are some final images and video of the transmitter and receiver in action.

Functionality Video



Internals Video




DIY

If your interested in making your own wireless temperature device, or you are just curious about how I did it, take a look at my source.  As usual there is no warranty or any type of support with this source.  The source has two libraries that are needed in addition to the ones that come with the Arduino development environment, one for interfacing with the MAX6675, and one for performing the wireless communication using the VirtualWire.  Also included with the source is a text file that explains the pinout for the receiver and transmitter.
Download: Source Code


Duke Nukem Forever Review


08/19/2011 03:36 AM

Duke Who?



Alright so I decided to play the finally released Duke Nukem Forever.  If you don't know about Duke Nukem Forever go over to Wikipedia and read about the crazy development cycle and history of the game.  Basically Duke Nukem 3D was a huge hit and people wanted a squeal, and they got it...some 15 years later.

Now I'm a fan of the modern FPS games.  I've played some of the older ones as far back as Doom 1 and 2, but I've never played a Duke Nukem game before.  Since the development of the game was so long, I went into the game assuming that the style would represent more of a modern FPS than the older ones, and I was right.  After reading about how many times the game changed hands I realized that at some point they probably just started from scratch, and took ideas for the game and put them into a new game, scrapping what they had done before.  So this game was more like a Halo, than Doom 1, not that that is a bad thing.

So what was the game play like?  It was pretty good, I mean there are better games but it had a good amount of variety between gun fights, huge boss battles, driving, puzzles, shrinking puzzles, turrets, partially destructible environments, decent weapon variety, and interactive environments.  But the majority of the game is running and gunning; not too much of a surprise it is a FPS. 

Guns

So there isn't hundreds of gun types but there are the standards.  A pistol, an assault riffle equivalent, machine gun, sniper, rocket launcher, turrets, and shotgun.  In addition to this there are things like the Devistator, Enforcer, Shrink gun, and Freeze gun.  This in addition to a few grenade types adds enough variety to keep it fun.  The problem I had was that you only have two guns (like modern FPS Halo style) meaning if I have a rocket launcher and a shotgun, I can't get any long range enemies without draining rockets.  Or if I have a sniper riffle and rocket launcher, I can't do much close quarters combat.  The ability to carry three guns would have been much better.

Health

So the health system is similar to modern FPS games with a shield that recharges over time.  At first this was a pain because I would always be hiding then run out and shoot then hide.  But I found that if you stun an enemy (where they are close to dying) you can perform an execution on them and it will increase your shield (ego) instantly.  This kept the fighting going because I didn't need to hide and wait.  Later in the game with flying enemies this trick becomes harder to do and its back to hiding but, oh well.

Another neat thing they did with health was allow you to increase it by interacting with objects.  I haven't really mentioned this yet but Duke is kind of a bad ass, and a womanizer.  So doing things like look up porn on a computer in the game will increase your health a little bit.  Pumping iron, playing basket ball, looking at a porno magazine, killing a huge boss, all of these are fun little ways to increase your health.

There isn't any item to heal your self with but there is drugs and beer.  Drink beer and you become tougher (take less damage) but your vision becomes impaired.  Take steroids and your punches are more powerful. I can't really say I think it was a good idea to promote drinking and drugs in a video game but I think the game mechanic works because of the character that Duke is.

Attitude

Duke Nukem is like Arnold Schwarzenegger in any action movie, but with the added womanizer behavior as mentioned earlier.  He is an ass a times, and he is conceded, but he is fun to play as.  What is even more fun about playing the jerk is the fact that the whole world loves you for it.  The expression "women want to be with you, men want to be you", fits perfectly here.  In this universe Duke is #1.  He always saves the day, he always gets the girl (or two), and that's probably why he acts so pompous.

The game has come under heavy fire for how women are treated in this game.  This game does have a capture the babe multiplayer mode, and women are generally seen as defenseless sex objects.  But I think that a game that has been in development for this long, and with this much anticipation, the developers had to push the limits of Duke's character and make the game as over the top (in violence and comedy) as possible.  To that I think they did a decent job.  I did find my self laughing at some of the jokes, which are mostly pop culture references but still funny.

Done...now what?

I'm a sucker for bonus content after beating a game.  Like the behind the scenes, making of a videos, and luckily Duke Nukem Forever has some of that.  The game includes all of the trailers for Duke Nukem Forever that have been released in the 15 years that it was being worked on.  It also comes with a neat time line view that tells a brief description of what happened and when.  As for other things like replay value, you won't find much.  There are a few achievements I missed out on, and some ego boosts I missed, but not much else.  There is also a multiplayer mode but it feels like that was an after thought just tacked on for good measure.

When being shot try to avoid bullets

If you play the game on one of the tougher difficulty settings one thing you will get annoyed with is the loading screens.  Don't get me wrong, I like that they put up text of random jokes, or hints while you're waiting, but the loading screen is at least 30 seconds on the Xbox 360, and you see it every time you die.  Sometimes I would play 20 seconds and die, then wait 30 seconds at the loading screen just to die again because of where the checkpoint was.  I haven't played it on the PC but I heard it is a similar times for loading.

Worth it?

So over all I think it is a decent game for an adult male who likes blowing crap up.  But would I pay the $60? Which was the price when it was released?  Nope.  Would I pay $40?  Maybe but still not likely.  For $30 I would say pick it up, and with all the bad reviews Duke has been getting it won't be long until you see this game in the bargain bin at Wal-Mart.


Three Words...Apple...Video Games


07/08/2011 09:34 PM

Hi I'm a Mac...

So I was thinking about the whole PC versus Mac situation.  There are several ways that PCs and Macs are different, not one better than the other just different.  The obvious difference is the fact that PCs are generally less expensive for the same technical specifications.  But (in my opinion) Macs are better designed and are better in quality.  I can attribute this to the fact that Microsoft doesn't make the hardware, where Mac hardware is designed and built by Apple.

But this post isn't about that, this post is about where Microsoft has the upper hand over Apple.  Microsoft has been making plenty of money with their video game system.  Their console "turned a profit" back in 2008, and has seemingly been doing great in 2009, and 2010.  They have been making money not just in hardware sales, games, and accessories (ways to make money with video games traditionally) but also with digital sales of full Xbox 360 games, Arcade games, and Live membership cost.  On top of that Microsoft has been making plenty with partnerships with the Xbox.  Partnerships with companies like Hulu, Netflix, ESPN, and MSN.

So as I was thinking about the whole Apple and Microsoft comparison, I realized that Microsoft does alot more than just software.  Apple of course does a whole lot more than just computers as well.  They have alot invested in the IPod, IPhone, IPad, ITunes, Apple TV, and network hardware.  Now Microsoft has dipped its toes into the water a little in these areas.  Microsoft had three generations of its IPod competitor (the Zune), which was met with some success, but to the public it is considered a failure.  Microsoft also has a music store, and had the TV/DVR market before Apple TV (with Windows Media Center).  Microsoft has also been in the phone market longer than Apple with the Windows Mobile platform (Previously Pocket PC from 2000, and the first Window Mobile for phones in 2003).  We've seen Microsoft have some success in market places now dominated by Apple, but what about the reverse?

But PC Has Games

When ever I hear the classic arguments for PC over Mac, or why a Mac is better;  I always think about gaming.  While the PC gaming market for Microsoft has been declining (independent games, and Steam seem to grow), one weakness of Macs has always been gaming.  There are several reasons for this, and this post won't go into them, but the point is that Macs have been lacking in the gaming department when compared to PC gaming for at least 12 years.  Now this may be a tactical move by Apple.  They may want to focus more on style, design, and usability of their current products.  But what would a gaming market look like if Apple decided to go full force into it?

IGame?

If Apple went into the gaming industry I would like to think that they would do something similar to the Apple TV.  Where they would make a video game console, instead of trying to make games for the Mac operating system.  I would bet that the system would be running their IOS or some variation of it.  This way all the current games for the IPhone/Ipad could be used.  Games would likely be available for download, but I think it would be a good idea to have physical medium as well, maybe they would be on DVDs.  Blu-Ray could be a possibility, but in the past Steve Jobs has mentioned how he's not a fan of Blu-Ray.  However his opinion may have changed since making those comments.

Other things that Apple does well would likely be seen in this video game system.  I would imagine this video game system, lets call it the IGame, would also be very easy to use.  Most apple products are easy to use, partially because they control the hardware and can control the experience that the user will have.  Controllers would be an interesting one.  I'm guessing that IPhones, IPads, and IPod touches could be used as a touch screen wireless interface via Wifi.  I think it would also be a good idea to have a cheaper controller that is a more traditional analog sticks, shoulder buttons similar to PS2/PS3 controllers.

So what would make this IGame so good?  What would make people want to buy it?  Coming into a new market would be very hard.  Microsoft had a very difficult time with the original Xbox but got lucky with a few good titles, and then hit a home run with Xbox Live.  What I think would set Apple apart in this industry already full of contenders is the quality of their games.  I would expect the games that come out of Apple to be very artistic, very clean, professional, and fun.  They tend to do things right most of the time, because they invest so much time and effort into a project. 

I don't have any inside information, it is just something I was thinking about while doing dishes and thought it would be a great idea to play a game designed by Apple, played on an Apple video game system.  Now would it be over priced?  Probably.  Would it sell?  No idea.  But I would imagine it might be like the Neo-Geo was.  A system that was appropriately priced for what it did, but too expensive for most people, causing the market to not accept it.

Edit:  So I Googled IGame, and was scared to see that last April there was information about a gaming system from Apple...it was on April 1st.  Hears hoping we'll have a real announcement in the future.


All Posts