Arduino Barometer 1
Arduino Barometer 1
Arduino Barometer
by oliverb
Using an Arduino UNO and Nano to display Air The 3 hour dial has an increased resolution of 0.5 hPa
Pressure on a 12" (300m) analogue display using 3 as this is used for weather forecasting. There are LEDs
stepper motors. to show when extended range is in use on all three
displays and also LEDs to indicate the weather
There is a choice to 2 dial designs modern and classic. forecast o the 3 hour display.
Air Pressure in hPa (Hectopascal) is displayed on the Inside the case two 20x4 LCD screens show info from
large main dial and is updated every 10 minutes. each of the microprocessors.
There are 2 secondary dials, one shows the last 6 hour The main air pressure display and 6 hour display are
pressure change and the other shows the last 3 hour controlled by a RTC. This clock also provides a 1 hour
pressure change. pulse for the 3 hour display.
This time-lapse animation shows how the Barometer hands and forecast LEDs react to a comming storm.
All three dial have extended ranges. This allows larger In the animation below the 3 hour pressure di erence
displayed resolution on the dials for normal weather. is starts at 0 and the pressure di erence is going
In extreme weather conditions the dials switch to down. At -5 hPa the green LED lights to indicate
extended range. negative extended range is in use. The pressure
change keeps dropping until it reaches -10hPa. This is
The animation pic1. shows how the LEDs light when now over the extended range so the Red LED also
extended range is in operation. The Red LED shows lights. The pressure then drops again to -11hPa and
when the reading is +5 and above. You would then both LEDs remain lit. The pressure change starts
read the Red scale lettering. The Green LED shows decreasing to -10 hPa and again this is still over the
when the reading is -5 and below. You would then extended range so both LEDs remain lit. Once the
read the Green scale lettering. If the reading goes pressure change drops to below -10 the Red LED will
beyond the extended range eg on this dial above +9 go out showing extended range is again in use.
or -9 both LEDs will light to show this- see next
section. I set the extended range into the dials after checking
weather extreems in the UK and while I expected the 3
Pre s s ure re a ding s O v e r Ext e nde d Ra ng e hour and 6 hour extended ranges to be used I did not
Pic.2 If the pressure reading is over the extended think the extended range would ever be used on the
range + or - then both LEDs will light to warn you that main Barometer display.
extreme readings or changes have taken place. The
dials will actually still show the readings eg on the 3 Pic.3 While prototyping the barometer in Jan 2020
hour dial if the reading was -10 then the dial would there was a record high reading of 1050hPa is the
point to 0 with both LEDs lit. If the 3 hour reading was South of England my main barometer went into the
-11 then the dial would point to -1 with both LEDs lit. extended range with the pointer on the red 1050 and
You just add 10 to the reading. the red high range LED lit.
3 Hour
Pic.1 & 2 This display shows the 3 hour readings and information on the 3 hour dial. It also shows the weather
forecast based on the current and last 3 hour reading.
Pic. 3 & 4 This display shows the main barometer dial readings and also the 6 hour readings.
Using the current air pressure and rate of change over R ising or steady pressure indicates clearing and cooler
the last 3 hours the weather is predicted on the LEDs. weather.Slowly falling pressure indicates rainRapidly
falling pressure indicates a storm is coming.
Animation 1 shows the various combination of
forecast LED combinations.
More speci cally, a barometer with readings in hPa can Logic is applied in the sequence below with the
be interpreted in this manner: resulting LEDs lit.
If the reading is over 1022 hPa Pic.2 Air pressure <1009 hPa
R ising or steady pressure means continued fair Rising or steady pressure indicates clearing and cooler
weather.Slowly falling pressure means fair weather
weather.Rapidly falling pressure means cloudy and
warmer conditions. Air Pressure <1009.00 and 3 hour change >= 0
Once complete the hands will step to their initial settings ready to be calibrated.
If the nearest digit is behind the hand press the red The code converts the hours to a H number as
"change setting" button. A single click will inch the displayed above H = 6.
hand backwards step by step. Holding the button will In the code line 128 H6 will mean put the current
inch the hand backward repeatedly. Once the hand is hour reading under hour6 the previous reading in
exactly on a digit release the button. hour7 the reading before that in hour0 etc
Pic.2 If the nearest digit in front of the hand or if you int hour0 = 1015;
have inch retarded the hand using the above too
much turn the "Select Setting" Knob clockwise until int hour1 = 1016
"6Hr Baro Inch Advn" is displayed.
;int hour2 = 1015;
Press the red "change setting" button. A single click
will inch the hand forwards step by step. Holding the int hour3 = 1016;
button will inch the hand forward repeatedly. Once
the hand is exactly on a digit release the button. int hour4 = 1016
Pic.3 Once the 6 hour hand has been set exactly on a ;int hour5 = 1016;
digit the hour hand need to be set to the correct
value. int hour6 = 1012;
Before adjusting the RTC you made a note of this int hour7 = 1013;
number -5.
You should be able to get your local readings o the
Pic.4 If the 6 hour display hand is too advanced. internet.
Turn the "Select Setting" Knob clockwise until "6Hr I setup a page from my weather station so I could
Baro Retard" is displayed. Press and release the red check this while constructing the barometer.
"change setting" button. This sill step the 6 hour hand
backward 1 whole unit. Stop when the 6 hour hand Click this link to see the hourly changes in Kenley
reaches your noted number. Surrey UK.
Pic.2 If the nearest digit in front of the hand or if you Turn the "Select Setting" Knob clockwise until
have inch retarded the hand using the above too "Barometer Advance" is displayed.
much turn the "Select Setting" Knob clockwise until
"Baro Inch Advn" is displayed. Press and release the red "change setting" button.
Press the red "change setting" button. This will step the main barometer hand forward 1
whole unit. Stop when the hand reaches your
A single click will inch the hand forwards step by step. indicated rounded sea level pressure.
Holding the button will inch the hand forward
Oic.1 Adjustment of the 3 hour hand is by the four Note the 3 hour display will take 4 hours to display
buttons Green, White, Blue and Yellow on the Vero correctly as it will need to store readings in memory
board. over that period of time.
On initial power up the the 3 hour hand will need to You can always add the previous air pressure readings
be calibrated to the nearest unit or half unit. into the code before loading is you require the
forecast and 3 hour display to function from startup.
Pic.2 If the 3 hour hand nearest unit value is in
advance of the 3 hour hand press the Yellow "Slow 3 hour display code at line 124
Bwd" button to inch the hand backwards. Keeping the
button pressed will repeatedly inch the hand oat hour0 is current hour
backwards.
oat hour1 is previous hour etc etc
If the 3 hour hand nearest unit value is behind the 3
hour hand press the Blue "Slow Fwd" button to inch oat hour0 = 1036.00;
the hand forwards. Keeping the button pressed will
repeatedly inch the hand forwards. oat hour1 = 1036.00;
Once the 3 hour hand is exactly on a unit/half unit the oat hour2 = 1036.00;
hand can be set to the value "D" on the 3 hour LCD
display. oat hour3 = 1036.00;
If in the hand is in advance of the value "D" press the oat hour4 = 1036.00;
White "3Hr Step Bwd" button to step the 3 hour hand
in half units backwards. You should be able to get your local readings o the
internet.
If in the hand is in less than the value "D" press the
Green "3Hr Step Fwd" button to step the 3 hour hand
The circuit was prototyped using a hardboard dial with holes drilled for the motor spindles and LEDs.
Various dial designs were then printed on normal paper and Sellotaped over the top. The LED wiring loom was
made with the LEDs in position on the temporary dial.
If you are using the round dial design this will allow you to check if the board etc will be mounted on the dial or in
the back box.
The module comes supplied with a Lithium-Ion rechargeable battery see diagram pic. 2.
I use a non rechargeable battery (I am not happy with the circuit design with a lithium-iron battery and associated
re risk) of the so have removed resistor R5 from the module as below. This stops any charge current to the battery.
Arduino Barometer: Page 21
Pic.3 shows the module without the resistor (just break it o ) and pic.4 the modi ed circuit.
On the modern square dial design all the modules using impact adhesive.
and boards are mounted on the dial. The classic round
dial desgn will need some parts mounted in the back Pic.4 shows the front view with a transparent dial
box as there is less space on the dial. showing mounting locations.
Motors are hot melt glued to wooden mounting Pic. 5 shows the same but the rear view.
blocks pic.1&2. The wooded blocks are cut fron a sheet
of plywood pic.3. The mounting blocks depths are set Pic.6 shows the wooden mounting blocks locations
to allow the correct protrusion of the spindles and layout.
through the dial . I have hot melt glued the blocls to
the dial. Pic.7 shows the modules and motors mounted on the
blocks.
The Vero Boards and LCD displays are also screwed to
wooden blocks which have been glued to the dial
The 3mm LEDs are mounted so they just show above the surface of the dial pic.1.
3mm holes are drilled and hot melt glue holds them in place.
To get a uniform depth I made a jig using a washer and piece of card glued to it pic.2.
When xing the LEDs the jig is pressed against the dial with the depth of the washer setting the protrusion of the
LED through the dial.
Arduino Barometer: Page 24
Step 17: Construction Classic Style English Dial Clock Case
The classic 12" Dial Clock case can be purchased from A new dial was cut from a sheet of alluminium pic.4.
Ebay as "case only" pic.1.
Pic.5 side view of the Barometer showing the back box.
Various styles are available this one is oak and has a
dial surround that hinges away from the back box Pic.6 shows my regulator clock case with original
pic.2. curved back box, hinged dial bezel and pegged dial
surround.
This makes for a very easy build as all the hard work
has been done. The dial is mounted by 3 small wood Many of these clock cases were held in place by four
screws hidden behind the brass dial bezel. wooden pegs. If your case is constructed like this add
a pair of hinges to one side and use the remaining two
This dial surround has been stripped and bleached to pegs to lock the dial surround in place.
bring out the original light colour of the wood pic.3.
The dial was removed as it had a winding hole o
center.
I have used two identical picture frames mounted pic.5 The dial viewed through the rear frame.
back to back. These frames are 30cm x 30cm approx.
12"x12" pic.1. pic.6 Rear half of the frame with all wiring in place.
pic.2 Frames are joined back to back. pic.7 The front of the dial now shows through the
front half of the frame. Wooden bevels hide the space
pic.3 This gives a double depth frame. behind the front half of the frame.
Pic.2 The back box is 50mm deep and is simply Pic.7 The spacer is set under the dial.
constructed of glued and screwed wood.
Pic.8 This will raise the dial level with the top edge of
Pic.3 Rear view of back box in position behind rear dial the rear frame.
frame showing the frame overlap.
Pic.9 Back box with front picture frame in place on top
Pic.4 The screw holes are lled then a coat of matt of the rear frame.This frame holds the glass.
black is applied to the back box.
Mounting the Dial in the Back Box Pic.5 Rear view showing mounting block and bar
locations.
The dial holds the combined weight of all the stepper
motors, boards and modules and is sti ened by Pic.6 Dial with Back Box Removed showing mounting
impact gluing two strips of unequal aluminium angle blocks and strengthening bars glued to the rear of
to it's rear surface. the dial.
Two blocks of wood are then glued to these bars and
small screws then hold these wooden blocks through The dial spacer allows the dial to sit ush with the top
the side of the back box. A further thin strip of wood of the rear picture frame.
is glued to the dial below the LCD mounting block.
This is not screwed to the case but sits on the back Pic.7 Right side of clock showing dial xing bolt
box to support the dial. location.
Pic.1 Strengthening bar of alluminium unequal angle. Pic.8 A mount is constructed from 4 thin strips of
wood and is placed in the recess of the front picture
Pic.2 Strengthening bar locations. frame. This lls the gap between the picture frame
and dial, holds the Perspex sheet in place and also
Pic.3 Glued wooden xing/support blocks for dial adds a photo mount e ect to the dial.
xing bolts left and right and glued dial support
lower. Pic.9 Mount in place behind the front picture frame.
Pic.1 Water slide decals are printed out on an inkjet Pic.5 Gently pull the white backing paper backward
printer soaked in water then slid into place. They give while holding the transfer down.
a very detailed print and once given a coat of varnish
are tough. Make sure the crosses line up with the center of all
the holes.
Don't forget to order transparent transfers so the dial
colour can be seen through the transfer. Pic.6 Get rid of any air bubbles.
Follow the instructions with the pack as they do vary.
Pic.7 Then leave it to dry before adding a coat of matt
Pic.2 On my transfers I print out the dial on transfer varnish.
paper let it dry and then cut it out to just under the
size of the dial. I then give it a coat of acrylic varnish. After the coat of varnish break through the layer of
transfer over the holes using the back of a drill bit jus
I set my printer as follows: Plain Paper, Photo & High smaller than the holes. Then give a nal coat of
Speed O This stops my printer from over inking the varnish to seal the edges around the holes.
paper When the varnish is dry the transfer is soaked in
All my hands were quartz second hands so I hand to Pic.8 To make the front pointer and center I cut the
le the mounting spindle o the back for mounting end o one o my donor hands.
on the stepper motor spindle.
Pic.9 To make the rear balance shaft I cut a section out
On some stepper motors the spindle can be drilled of the 3rd donor hand.
out to take the hand spindle but my spindles were too
hard to drill. Pic.10 Left the 3 parts of the new hand. Middle shows
the overlap of the balance shaft to allow for bonding.
Pic.1 my completed hands. Right pic shows the balance shaft bonded with
impact adhesive to the underside of the balance and
Pic.2 The long barometer hand was constructed from center shaft.
3 di erent hands
To x the hands to the stepper motor spindle I did not
Pic.3 To get the lower spade balance part of the hand I want to use impact adhesive as the hands are fragile
used a spade hand. and would be damaged if I hand to remove them. In
the end I went for a tiny bit of Blu Tack on each hand.
Pic.4 First I cut o the top using sharp scissors. Blu Tack is putty like and is non setting but seems to
hold very well!
Pic.5 The top was then trimmed by cutting the point
Pic.3 Vero Board rear view ( ipped down from top). Pic.6 Vero Board wiring in progress.
Pic.4 LED Vero Board Pic.7 Vero Boards and module location on the rear of
the dial.
This board is used as a connection point for the dial
Code
There are 2 parts to the code 1 for the Main Barometer Code and 6 hour display and 1 for the 3 hour display and
weather forecast.
Time-Lapse Video showing rain radar and the Barometer predicting rain and a storm.
This is a 4K video so you should be able to see full details of the dial and forecast LEDs.
https://youtu.be/rLft6nM7aGE
Very Nice.
Will all your code fit on the NANO? if so have you thought of using a NCP23017 for your LED's.
that would reduce the number of LCD and BMP180
Looks pro.
Thanks Palingenesis. No but it would prob fit on a Mega 2560. I had not seen a NCP23017 before
will look into them as they look useful.
Glad it was of help, while you are looking for NCP23017, you may come across similar PCF8574, I
don't recommend PCF8574.
Also I looked at your code, Do you have a link to which <LiquidCrystal_I2C.h> library you are
using? I get error with the library I have.
A tip about memory when using menus/Text.
Have you come across the F function. e.g. lcd.print(F("Test")); F() takes a string literal and forces
the compiler to put it in program memory.
I love I2C and when I get really stuck for memory I use a ATMEL24C256.
I used it here: https://tims-mini-plotter2.blogspot.com/2019/04/ad...
Prehaps with a ATMEL24C256 you could store more past readings
I don't have a link to the LiquidCrystal_I2C.h library but looking at my system it's called
NewliquidCrystal. Created by Francisco Malpartida on 20/08/11.
I must admit I know almost nothing about coding. I am the generation that used log books and slide
rules at school. I learn code by finding a project and breaking it down and working out what things
do.
Found it thanks.
https://bitbucket.org/fmalpartida/new-liquidcrysta...
Compiles now I have this in the libraries.
WoW masterpiece, Congratulation!!!!