Tag Archives: LCD

Arduino based Temperature and Humidity/Humidex meter with DHT22 sensor and color LCD

IMG_1980

This project consist of Arduino board, serial TFT LCD 128×160 display, DHT22 sensor and obviously bread board and jumpwires.

Project features:

Continue reading

Arduino LCD horizontal progress bar using custom characters


LCD in this picture has 2×16 characters, so in quick way horizontal bar could have 16 steps resolution, but it’s not enough.  Each character is formed from 5×8 pixels. Every character can be sliced in to 5 pieces. After that we can have 5*16 = 80 steps.

First step is to create 5 custom characters. More about  createChar() please read at arduino.cc.

Each custom character is specified by an array of eight bytes. Byte represents character’s row.

Continue reading

Arduino GPS clock using NMEA protocol

GPS for accurate synchronization and  position measurement must use precise clock, so GPS satellites are equipped with atomic clocks. Clock accuracy is amazing ± 1 second in 1 million years. Using GPS module is available not only acquire position, speed, bet also time and date, so in this post I’ll explain how to do it.

GPS clock consist of old Sirf II GPS module, MAX 232, Arduino Mega and LCD display (Hitachi HD44780).

Sirf II module has RS-232 interface for communication and it can be  connected to PC Com port. Atmega in Arduino board has  UART interface. RS-232 basically is the same UART, only zeros and ones voltage levels are different. To match levels MAX232 driver is used. Today’s GPS modules have UART port, so there isn’t any need for MAX232.

Arduino in this project doesn’t have clock function it just pass time and date from GPS module to display. It works that way because GPS module has internal RTC(Real time clock) it’s not accurate, but it is synchronized to GPS system.

As you can see from video GPS module RTC is sychronised before GPS fix happens, but GPS fix is only one indicator that shows that clock is synchronised.
Continue reading

Very simple Arduino capacitance meter using 16 bit timer and analog comparator

As You could see from video it requires only one external resistor. Meter is very simple, but obviously not very accurate or wide range. Theoretically it could measure in 10 nF – 160 µF range.

How it Works?

Circuit formed from resistor and capacitor (RC circuit) has time constant, it shows time needed to discharge capacitor via resistor to ~37% it’s initial voltage. Calculation of time constant is very simple t=R*C . For 1 k resistor and 47µF capacitor it’s 47ms.

My capacitance meter fully charges capacitor, when 16 bit timer is started and capacitor is discharging via resistor (1 k). Capacitor is connected to analog voltage comparator(pin 5), as capacitor voltage drops bellow 1.1 V occurs analog comparator interrupt which triggers timer interrupt.  If resistor is constant, discharge time and capacitance dependency is linear, therefore if You know one rated capacity capacitor discharge time, You could easily calculate another capacitor’s capacitance by measuring time.

Because timer uses only one  /64 clock prescaler measurement range is very narrow. To have wider range there is a always way to make  programmable prescaler, which changes if capacitor value is out of range, or discharge capacitor via range of different resistors.

Also keep in mind that resistor’s resistance depends on environment temperature, consequently and on LCD display showed capacitance. To fix this temperature dependency referenced capacitor should be used. In this case every time both capacitors are charged and discharged separately, but via the same resistor. Capacitance proportion is calculated and if referenced capacitor capacitance is know measured capacitor’s value can be calculated just by division or multiplying.

It’s time for program’s code.

Continue reading