The Source Code ZIP has been updated to provide additional calculated information on the Nokia display: inHg and tC for temperature in Celsius.
An Atmega328P version of this project is available here.
This project is a continuation of my series on the Chinese BAITE clone of the Leaflabs Maple Mini - a 32-bit ARM M3 board with 128K Flash and 20K SRAM: currently selling for $5 or under, delivered.
A WiKi is now available with the intent to condense the 60+ pages on the Arduino forum into a more digestible read. Please reference here. This WiKi will guide you through installing the Maple core files for Arduino, configuration, and many of the issues you are likely to face should you wish to duplicate this project.
Please note: links for products are only for reference and do not represent an attempt to recommend these vendors.
ZIP of all files required - Place all in a single directory titled: GLCD5110_BMP085
The update provides a convenience feature using the Maple Mini "button" on pin 32. When the LCD is displaying the 4 parameters including inHg: press and hold the button until the inHg value is blanked - releasing the button will expand the inHg display value by multiplying it by 100. This feature allows the hidden decimal places to be seen. For example, if the display is indicating 30.3 then pressing and releasing the button will display 303x.xx where x.xx represents hidden, non-rounded portion of the display.
Using this feature, one can edit line #38 int localCorrect = 3380; so that the device can be calibrated to the local elevation - just use the Internet to find the closest airport and a little trial and error with line #38 will bring the pressure readings in line with the weather service monitoring.
Additionally, line #15 in the code can be edited from #define DIAGS false to #define DIAGS true to simultaneously display on the LCD as well as on a serially connected monitor. The display output will resemble the following:
The Nokia 5110 GLCD should be connected as indicated in the source code above:
- --------MapleMini----/Notes---------------------/-Nokia- */
- #define PIN_SCE 31 // CE (Active High) pin 2
- #define PIN_RESET 30 // Reset (Active Lo) pin 1
- #define PIN_DC 29 // Data==1 Command==0 pin 3
- #define PIN_SDIN 28 // MOSI/DIN pin 4
- #define PIN_SCLK 27 // CLK/clock pin 5
The BMP180 should be connected as follows:
- SCL ---> Maple Mini pin 16
- SDA ---> Maple Mini pin 15
The Maple Mini is 3.3V therefore all Vcc connections should be 3.3 Volts on the 5110 and the BMP180. Grounds, GND, are common. I used a 10 Ohm resistor to power the LEDs on the Nokia screen... my display pin LED to Gnd through the resistor. SDA and SCL are "pulled-up" to 3.3 Volts on my prototype using 10K resistors (depending on the breakout module you purchase, the pull-ups may already be mounted on the board.)
In addition to those listed in the Source Code Tab Licenses, there are others who have been key players into making the port of the old Leaflabs core code to the new Arduino environment. Please see the list of ADDITIONAL CONTRIBUTORS.
I have been playing around with using the first two lines of the Nokia display as a barometric graph and I am going to attach my "beta" code since I think this is a pretty cool idea. Please note there may be glaring errors in this implementation.
Here is how it works:
Line 0 and Line 1 are 84 pixels wide and each line is 8 pixels high. On the Nokia display, a character is formed by using a local bitmap inside the uC that maps each vertical sets of pixels (0 - 7) to a Byte. Starting with the far left of a line, typically 6 horizontal pixels and 8 vertical pixels form the character matrix.
In my graphing abstraction, new information enters on the far right in horizontal position  and the top line  and the second line  are combined by a simple algorithm to provide for 16,  through  positions across two lines. Pressure then is indicated by the height of the line on line  plus the continuation of the line onto line ; that is, line 1 is printed first, then line 0 if the value requires it.
Every 60 seconds, a new data element is added to the right-most part of the graph and all pixels are pushed to the left, with the oldest historical reading lost. In this manner, the graph represents a historical record of the last 84 minutes. The time lapse for the graph can easily be changed to be longer or shorter as desired.
New codebase (beta) for graphing. Also note that pressing the button on pin 32 now multiplies the inches of mercury reading by 100 and the display will show "inHgX=" rather than the normal "inHg= " ... You must press and hold the Button for a full second to cycle from mode to mode.
All installation instructions are the same... that is, you must unzip all files into one folder which is named GLCD510_BMP085 and you must use Arduino 1.6.0 or later to compile. Refer to earlier links provided for the Maple core library files required for the microcontroller.