Here is an up-to-date version of the clock-thermometer firmware: Thermometer4_-_LCD.c
Because of school I did not have much time to make improvements.
Showing posts with label thermometer. Show all posts
Showing posts with label thermometer. Show all posts
Sunday, May 15, 2011
New firmware for the thermometer
Labels:
avr,
clock,
code,
programming,
software,
thermometer,
update
Tuesday, February 22, 2011
Some current and finished projects...
Last month i rewrote my bool solver from scratch. This time i wrote it in pure C - without C++ elements. It has almost all functions of the old version plus some new ones, but the new program is much shorter. Documentation and comments are in german... thats why i do not upload it.
Because the old firmware (version 4) of the AtTiny clock was pretty ugly, i rewrote and changed many parts of the firmware. The new version has the number 5. The new code runs like a charm and as a bonus it eliminates the problems i had with the buttons (it was not a hardware problem).
Release will be soon. Only a calibration function for the quartz is still missing. ^.^°
And one last thing: i disassembled my old Acer travelmate 220 notbook and under the sticker of an IC i found an Atmel AtTiny25 as part of the charging circuit. It communicates directly with the laptop battery through TWI/I²C. The foto was made with my Canon EO350 / Digital Rebel XT / Kiss Digital N with an hand hold lens in retro position - the IC was so damn small:
Because the old firmware (version 4) of the AtTiny clock was pretty ugly, i rewrote and changed many parts of the firmware. The new version has the number 5. The new code runs like a charm and as a bonus it eliminates the problems i had with the buttons (it was not a hardware problem).
Release will be soon. Only a calibration function for the quartz is still missing. ^.^°
And one last thing: i disassembled my old Acer travelmate 220 notbook and under the sticker of an IC i found an Atmel AtTiny25 as part of the charging circuit. It communicates directly with the laptop battery through TWI/I²C. The foto was made with my Canon EO350 / Digital Rebel XT / Kiss Digital N with an hand hold lens in retro position - the IC was so damn small:
Labels:
acer,
attiny,
avr,
bool solver,
boolean,
c++,
camera,
canon,
clock,
firmware,
foto,
laptop,
programming,
software,
thermometer
Sunday, May 30, 2010
Temperature sensor disassembled
Some days ago i disassembled an RF temperature sensor used for a weather station.
It sends on 433 MHz.
Every 90 seconds the sensor is sending the actual temperature to the station(s).
Powered by two AAA batteries.
The chassis is sealed.
The electronic circuit is rather small.
There are two PCBs. On for the RF part i guess with a big coil.
The other PCB contains the controller. It is covered by a black glue.
There is a contact on the PCB for the switch in the chassis for choosing the channel, marked with "TX" (by pressing it, the sensor is sending the temperature immediately).
The other contact is not brought out to the chassis. It is for switching between °C and °F.
This it the other side of the PCBs. You can see the red LED, that will blink every time the temperature was measured and send.
The contacts above the LED are looking interesting. Perhaps they were used for programing or testing the circuit?
And of course the sensor worked again after i reassemled it. ;)
Saturday, April 24, 2010
Thermometer version 5
I added backlight functionality to my thermometer.
A menu system was added too (as well as an annoying bug...).
I noticed that the button response is getting worse with time and the number of button clicks. Perhaps they are just to cheap? It is not a software fault.
The possibility to calibrate the clock for higher accuracy is still missing.
A menu system was added too (as well as an annoying bug...).
I noticed that the button response is getting worse with time and the number of button clicks. Perhaps they are just to cheap? It is not a software fault.
The possibility to calibrate the clock for higher accuracy is still missing.
Monday, April 5, 2010
Some new stuff
Today i have a bunch of new stuff. First of all: i made a six channel logic analyzer. The hardware was designed in about five minutes. The software in perhaps six minutes...
Here is the code:
Unfortunatly i have no software for the data analysis. I saved the data with HTERM as text file so far.

And it worked. With my old self made power supply it was a joy to play with the truck. ; )
And finally if finished the case for my thermometer. I found some transparent plasic in the cellar. Now only a calibration function for the clock is left.
Here is the code:
#includeYou need the UART library from Peter Fleury (http://jump.to/fleury).<avr/io.h>
#include<avr/interrupt.h>
#include "uart.h"
#ifndef F_CPU
#define F_CPU 11059200
#endif
#define UART_BAUD_RATE 115200
int main(void)
{
uart_init( UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU) );
sei();
uart_puts("Starting low cost logic analyzer.\n");
while (1)
{
uart_putc( PINB + '0' );
uart_putc( '\r' );
}
}
Unfortunatly i have no software for the data analysis. I saved the data with HTERM as text file so far.
Next project was the modification of my good old LEGO Technic truck.
He needs a huge amount of AA batteries - more than i had. But i wanted to make it work

And it worked. With my old self made power supply it was a joy to play with the truck. ; )
And finally if finished the case for my thermometer. I found some transparent plasic in the cellar. Now only a calibration function for the clock is left.Sunday, March 21, 2010
Saturday, February 27, 2010
Code for the thermometer
I have just uploaded it to the crappy rapidshare.
http://rapidshare.com/files/356755556/Thermometer4_-_LCD.zip.html
MD5: 116890802238A5B89919CDB1B1972BD5
And the mirror on google:
http://sites.google.com/site/species0x2118/hive/Thermometer4_-_LCD.zip?attredirects=0&d=1
http://rapidshare.com/files/356755556/Thermometer4_-_LCD.zip.html
MD5: 116890802238A5B89919CDB1B1972BD5
"Your file has been saved and can now be downloaded 10 times. It will be deleted after 60 days without download. If you would like to enable more people to download your file, please transfer it to a free Collector's Account or a Premium Account."
And the mirror on google:
http://sites.google.com/site/species0x2118/hive/Thermometer4_-_LCD.zip?attredirects=0&d=1
Tuesday, February 23, 2010
Clock - some hints and thoughts
I have reprogrammed the clock-thermometer the first time after soldering it to the breadboard.
In the circuit diagram you can throw away jmp3 and jmp4 and replace them with a common jumper on the mass of D2 and R7.
Because my wall power supply not only outputs 9 V DC but also ~13 V AC, i decided to power the circuit with rechargeable batteries (4*1,2 V).
I thought it could help to change the following line:
Where ADC_BITS is defined as 10 and VREF as 1100 (mV).
Indeed the code size shrinked from 3132 bytes to 3060 bytes, but the temperature was calculated wrong. The thermometer displayed a negative temperature, although my room was warm.
When i changed the code to:
The filesize was 3132 bytes again.
As you can see: the AVR GCC port isn't as stupid as you (or me) think. ;)
Happy soldering!
In the circuit diagram you can throw away jmp3 and jmp4 and replace them with a common jumper on the mass of D2 and R7.
Because my wall power supply not only outputs 9 V DC but also ~13 V AC, i decided to power the circuit with rechargeable batteries (4*1,2 V).
I thought it could help to change the following line:
degree = (degree * VREF) >> ADC_BITS;to:
degree = ((degree * 1024) + (degree * 64) + (degree * 8) + (degree * 4)) >> ADC_BITS;
Where ADC_BITS is defined as 10 and VREF as 1100 (mV).
Indeed the code size shrinked from 3132 bytes to 3060 bytes, but the temperature was calculated wrong. The thermometer displayed a negative temperature, although my room was warm.
When i changed the code to:
degree = ((degree * 1024L) + (degree * 64L) + (degree * 8L) + (degree * 4L)) >> ADC_BITS;
The filesize was 3132 bytes again.
As you can see: the AVR GCC port isn't as stupid as you (or me) think. ;)
Happy soldering!
Monday, February 22, 2010
Clock-Thermometer with Attiny and LM35
Today i want to present you my last project i've made.
It's a more modern version of my first big µC project: a thermometer. (yeah!)
I finished it last sunday - at least the most parts of the project.
My first version i made months ago, was equiped with an Atmega8, four multiplexed 7 segment displays, "software" based USB and a batterie backup if no USB connection was in the near.
So far so good.
The negative points were:
It consumed a lot of power, it used tons of parts, it had some bugs i never killed and it only displayed the actual temperature.
I paused the project for a while.
By the time my µC skills increased and so on one day i decided to make a better version.
The requirements:
That was the hour of birth for the thermometer version 4a:

The whole circuit is build around an Attiny84V and an LM35C.
The output is done on an LC Display from Displaytech.
1x16 Chars - or more precise: 2x8 Chars in one line.
Sadly without backlight.
After making some plans for the hard- and software parts i build up the circuit on an pinboard and then i made the software.
(Usually i never make plans for the software part.)
Last step was soldering the stuff onto a bredboard as you can see in the pictures below.
Because i made a lot of plans and "brain work" in the forefront, it was a very easy and straight forward implementation. No bigger problem appeared till now.
The circuit is using a wall power supply.
It is specified with 6 V DC, 300 mA and it is from an old wirless mouse charging station.
In idle time it delivers around 9 V and because the whole circuit consumes under 15 mA it will work in idle even when the circuit is connected. ^.^
As special feature i implemented a clock (wohoo!).
With three switches on the back you can set the hour, minute and the display mode.
Display mode means the appearance of the time and temperature on the LCD:
But because it is getting warmer here outside i need some fridge to test the posibility of displaying negative values.
The build in clock is synced by an 16 MHz Quartz (CHKDIV8 is on - resulting in a clock speed of 2 MHz!).
The clock is not calibrated yet - but on the pinboard it was exact enough. Further testing with the breadboard circuit is needed.
The hardware version i soldered is a bit older than the plan.
As well as the software version.
The software is written in C with AVRStudio and WinAVR.
The main program consists of under 300 lines of code.
It uses 3132 bytes in the flash for code.
So there is plenty of room in the 8 kb flash for further extensions.
For the LCD i used the routines from Mikrocontroller.net.
(A big thanks to this side! It is just a paradise for µC users... at least when you can read german)
As soon as i figured out how to post software here i will upload it. ;)



It's a more modern version of my first big µC project: a thermometer. (yeah!)
I finished it last sunday - at least the most parts of the project.
My first version i made months ago, was equiped with an Atmega8, four multiplexed 7 segment displays, "software" based USB and a batterie backup if no USB connection was in the near.
So far so good.
The negative points were:
It consumed a lot of power, it used tons of parts, it had some bugs i never killed and it only displayed the actual temperature.
I paused the project for a while.
By the time my µC skills increased and so on one day i decided to make a better version.
The requirements:
- no batterie
- no usb
- no 7 segment display
- should display something more than just temperature...
- lesser parts
- KISS!
That was the hour of birth for the thermometer version 4a:
The whole circuit is build around an Attiny84V and an LM35C.
The output is done on an LC Display from Displaytech.
1x16 Chars - or more precise: 2x8 Chars in one line.
Sadly without backlight.
After making some plans for the hard- and software parts i build up the circuit on an pinboard and then i made the software.
(Usually i never make plans for the software part.)
Last step was soldering the stuff onto a bredboard as you can see in the pictures below.
Because i made a lot of plans and "brain work" in the forefront, it was a very easy and straight forward implementation. No bigger problem appeared till now.
The circuit is using a wall power supply.
It is specified with 6 V DC, 300 mA and it is from an old wirless mouse charging station.
In idle time it delivers around 9 V and because the whole circuit consumes under 15 mA it will work in idle even when the circuit is connected. ^.^
As special feature i implemented a clock (wohoo!).
With three switches on the back you can set the hour, minute and the display mode.
Display mode means the appearance of the time and temperature on the LCD:
- Mode 1: HH:MM:SS +/-TT,T°C
- Mode 2: HH:MM +/-TT,T°C
- Mode 3: HH:MM +/-TT°C
But because it is getting warmer here outside i need some fridge to test the posibility of displaying negative values.
The build in clock is synced by an 16 MHz Quartz (CHKDIV8 is on - resulting in a clock speed of 2 MHz!).
The clock is not calibrated yet - but on the pinboard it was exact enough. Further testing with the breadboard circuit is needed.
The hardware version i soldered is a bit older than the plan.
As well as the software version.
The software is written in C with AVRStudio and WinAVR.
The main program consists of under 300 lines of code.
It uses 3132 bytes in the flash for code.
So there is plenty of room in the 8 kb flash for further extensions.
For the LCD i used the routines from Mikrocontroller.net.
(A big thanks to this side! It is just a paradise for µC users... at least when you can read german)
As soon as i figured out how to post software here i will upload it. ;)



Subscribe to:
Posts (Atom)



