Monday, May 21, 2012

Getting back into Arduino!

I have been super busy and had put my microelectronics on hold. Here a few things I plan to work on in the near future:

  • Update the iButton Datalogger programmer with daylight savings time menu
  • Update the LCD shield clock demo
  • Experiment with ferrofluid using a power shield from Spark Fun. Here is my inspiration:
  • And a really cool open source Hexapod currently on KickStarter:

Sunday, June 13, 2010

Arduino Nokia 6100 LCD Analog Clock Demo

I needed a RJ11 connector for my Datalogger project so I took the opportunity to get the Nokia 6100 LCD Shield from Sparkfun. I created an Analog Clock demo to check out the capabilities of the LCD.

Using the Sparkfun base driver ported by Mark Sproul to the Arduino as a foundation, I incorporated Jim Lynch's Nokia 6100 LCD tutorial graphics primitives and ASCII character code.

The iButton clock code was reused from the iButton data logger programmer project and modified to support the DS1904 with onboard clock and battery. It is only around $6, which is much cheaper the DS1994 that also had onboard memory. I soldered a 4.7 kOhm pull up resistor directly to the iButton holder to avoid the need for a bread board.

The clock tick marks and hands were drawn using cylindrical coordinates:
- X position = radius * cos (angle)
- Y position = radius * sin (angle)

The time defaults to 9:40 am which can be changed to anything you want if the real time iButton clock is not attached.

Here is a link to the source code.

Demo Video:

Thursday, April 22, 2010

Arduino Data Logger Programmer Demo Video

Here is a short video demonstrating the features of the Data Logger Programmer in action using a temperature only iButton data logger and a 1-wire temperature sensor.

Sunday, April 18, 2010

Arduino iButton Data Logger Programmer Source Code

Here is a link to the latest iButton Data Logger Programmer source code ZIP archive using Arduino IDE version 18, which can also be viewed in a text editor such as MS Windows Word Pad. It is released under GNU General Public License GPLv3.

One Wire iButton Data Logger Programmer Source Code

I will update the source code periodically. TODO items include a menu to allow the user to change day light savings, time zones, etc. if I end up making more then one device. Hopefully this code will help those who want to interface iButtons to the Arduino get started.

Leave a comment for any questions...

Sunday, April 11, 2010

Arduino 1-Wire iButton Data Logger Programmer Portable Prototype!

The Arduino 1-Wire iButton Data Logger Programmer is now a portable device!

- Program iButton data loggers to start and stop in the field
- Read iButton temperature & humidity data logger last data values
- Read DS18xxxx one-wire family of temperature sensors
- Simple 3 button user interface
- Onboard DS1994 iButton real time clock
- 2x16 Row LCD with continuous side lit LED backlight
- Low power: Total ~23 mA allowing 40+ hours of run time
- Compact and light weight

- Microcontroller: Sparkfun Arduino Pro Mini 328 (5V)
- Case: Sparkfun Project Case - Black WIG-08601
- LCD: Newhaven NHD-0216K3Z-FS(RGB)-FBW (I2C mode)
- Molex connectors for LCD
- Wooden dowel glued to bottom of LCD standoffs for height adjust
- RJ11: Sparkfun PRT-00132
- Buttons: Momentary push button 12 mm Sparkfun COM-09190
- Button pull up resistors: 20 kOhm
- Voltage divider: Two 56 kOhm resistors and 1 uF capacitor
- Battery: 9V Lithium
- Resistor for LCD LED backlight: 85 Ohm
- Real time clock: DS1994 iButton on one wire bus
- One 4.7 kOhm pull up resistor for one wire bus
- Proto Board: Universal Component PC Board Radio Shack 276-168

Spending time 3D modeling in AutoCAD was worth it due to the tight spacing. I combined top and isometric photos for comparison to the render previously posted.I did make a few changes from the 3D model:

- Raised up the circuit board higher. I was overly optimistic on the space needed below the board and required standoff height. Cut outs in the circuit board had to be made for the 9V battery and iButton DS1994 real time clock located under the LCD. The 9V battery voltage divider circuit and pull up resistors are also under the display. Wooden dowels were used under the momentary button circuit board and LCD standoffs to allow sanding for height adjustment. Two dowels are under the circuit board below push buttons for structural support. The 9V Battery is held in place with light double back tape and foam attached to the top case cover. With tight spacing, the battery cannot move.

- SparkFun's case only comes in black or semi-clear. I rendered the 3D model in a light gray to make it easier to see components.

- Switched to more efficient Newhaven NHD-0216K3Z-FS(RGB)-FBW LCD. It looks different due to the side lit LED back light, but the overall dimensions are the same. Power for the back light is from the Arduino using Pulse Width Modulation.

One of the most time consuming portions of the construction was cutting out holes accurately. I used a Revell hobby saw to cut out the RJ11 insert opening. I tried a Dremel, but attachments that I had would not work without damaging plastic.

The LCD opening was the most difficult due to the size and precise location. The display only fit in one spot inside the case. Wide painter's masking tape was wrapped around the case with the location of the display marked inside. The opening was cut out by drilling multiple holes around the perimeter. Wire cutters were then used to trim plastic and then file for the final shape. I am open to ideas on how to accurately cut the hole without spending hours!

I am currently working on software updates for a few needed features and bug fixes. I plan to post a demo video showing all the features, construction photos, and updated source code in the near future... In the mean time, post in the comments section if you have any questions.



Sunday, March 7, 2010

Low Power Newhaven Serial LCD

I setup the 1-Wire iButton Datalogger programmer on a 9V battery for testing. Unfortunately, the power consumption was significantly higher then the Newhaven serial LCD NHD-0216K3Z-FL-GBW data sheet indicated with peak total load at 236 mA! This caused an immediate 1.1V drop and exceeded the max recommended current of the 9V lithium battery.

Fortunately, Newhaven has a new side lit RGB 20 mA backlight display NHD-0216K3Z-FS(RGB)-FBW that was a drop in replacement on the software side. There are two additional wires needed for supply and ground to indepentantly drive the backlight. This display is considerably more efficient and Pulse Width Modulation (PWM) from the Arduino significantly reduces power further with no flicker. Without PWM, total current with the Arduino Pro Mini was down to 41.5 mA. Using PWM at a reduced brightness level (but very readable in light and dark conditions), peak current drops down to 25.4 mA with average of 23.4 mA! This is a 90% drop compared to the old display at start up!

Based on the Ultralife 9V Lithium battery data sheet, I should now get ~40+ hours of run time. A simple voltage divider is monitoring battery status through an analog-in pin. For a battery powered application, the serial (in I2C mode) NHD-0216K3Z-FS(RGB)-FBW with PWM is an excellent choice!

The circuit design is finalized with the Arduino Pro Mini on the breadboard. I haven't decided yet if I will go with the protoboard shown in the renders or create a PCB in Eagle CAD...

Monday, February 15, 2010

Arduino Pro Mini 1-Wire Datalogger Programmer Prototype 3D Model

After a long hiatus, I decided it was time to get the 1-Wire iButton Temperature / Humidity data logger programmer off the breadboard and into a usable device! SparkFun's Arduino Pro Mini (now with Atmega 328) is small and powerful enough to move the project to their plastic enclosure case. The Sanguino was just too large for the small hand held device I wanted.

Since space was going to be a premium, I was planning to draw out 2D plan and elevation views at first. SparkFun was kind enough to send me a 3D DXF file of their case. I gave 3D modeling a shot by starting with the Arduino Pro Mini in AutoCAD 2008. I was inspired by several Arduino Google 3D sketch models including this one. The results were good enough that I made the remaining components with the exception of the RJ11 jack model, which I found on a Blender site. AutoCAD is good for precision modeling but a challenge for textures and materials. Still looking for a good solution to covert some of the models into a more portable format to share. So far, exporting to DXF or 3DS has not worked very well...

The SparkFun case is rendered for now in gray for better contrast. I have a semi-clear version, but may end up using black. The 3D model will be updated once the circuit layout is finalized. A slider power switch may have to replace the rocker due to 9V battery spacing, but it stays in for now. The DS1994 iButton real time clock with battery is hidden under the LCD display.

On the software side, the button polling was updated with the debounce library to eliminate the hardware debounce IC. When everything is finished, I will clean up the code and post a new version for the Arduino Pro Mini.