ATTINY13/25/45/85 OLED THERMOCOUPLE THERMOMETER 1023 °C
OLED display, 128x64 0.96" or 128x32 0.91", SSD1306, I2C with ATtiny13 or ATtiny25/45/85 and MAX6675 K type thermocouple module. MAX6675 is driven by software (bit banging) SPI. The MAX6675 SPI sends 2 bytes of data. OLED is driven by software I2C.
Temperature range is 0-1023.75 centigrade with resolution of 0.25 degree.
The sketch can be used without any changes for ATtiny13/25/45/85
ATtiny13 can be programmed using Arduino IDE and Arduino as ISP. Use these instructions https://www.electronics-lab.com/ with the setting : 9.6MHz, no millis no tone, LTO enabled.
ATtiny can be programmed using Arduino IDE and Arduino as ISP, see Technical Tips Burning bootloader with setting "Clock Source 8MHz internal", "LTO enabled".
MAX6675 can be bought from eBay: https://www.ebay.co.uk
PIC12F629 OLED THERMOCOUPLE THERMOMETER 1023 °C
OLED display 128x32 0.91", SSD1306, I2C with PIC12F629 and MAX6675 K type thermocouple module. MAX6675 is driven by software (bit banging) SPI. The MAX6675 SPI sends 2 bytes of data. OLED is driven by software I2C.
Temperature range is 0-1023.75 centigrade with resolution of 0.25 degree.
ATTINY13/25/45/85 OLED DHT11 THERMOMETER
OLED display, 128x64 0.96" or 128x32 0.91", SSD1306, I2C with ATtiny13 or ATtiny25/45/85 and DHT11 module. OLED is driven by software I2C. DHT11 reply with 5 bytes of data 3 are used to display temperature and humidity.
The sketch and circuit can be used without any changes for ATtiny13/25/45/85
ATtiny13 can be programmed using Arduino IDE and Arduino as ISP. Use these instructions https://www.electronics-lab.com/ with the setting : 9.6MHz, no millis no tone, LTO enabled.
ATtiny25/45/85 can be programmed using Arduino IDE and Arduino as ISP. Use these instructions https://gist.github.com/ with the difference of burning bootloader with setting "Clock Source 8MHz internal", "LTO enabled".
ATTINY25/45/85 OLED THERMOMETER SENSOR DS18B20
OLED display, 128x64 0.96" or 128x32 0.91", SSD1306, I2C with ATtiny25/45/85 . OLED is driven by I2C. DS18B20 reply with 2 bytes of data for temperature range of -55 to 125 centigrade.
Sketch includes a lib for tinyI2C that can be downloaded from GitHub: https://github.com/
ATtiny can be programmed using Arduino IDE and Arduino as ISP, see Technical Tips Burning bootloader with setting "Clock Source 8MHz internal", "LTO enabled".
ATTINY85 OLED THERMOCOUPLE THERMOMETER 1023 °C
OLED display, 128x64, 0.96", SSD1306, I2C with ATtiny85 or ATtiny45 and MAX6675 K type thermocouple module. MAX6675 is driven by software (bit banging) SPI. The MAX6675 SPI sends 2 bytes of data. Sketch includes a lib for tinyI2C that can be downloaded from GitHub: https://github.com/
Temperature range is 0-1023.75 centigrade with resolution of 1/4 degree.
ATtiny can be programmed using Arduino IDE and Arduino as ISP, see Technical Tips Burning bootloader with setting "Clock Source 8MHz internal", this makes the CPU working at frequency of 8MHz.
MAX6675 can be bought from eBay: https://www.ebay.co.uk/
OLED THERMOCOUPLE THERMOMETER 1023 °C
OLED display, 128x64, 0.96", SSD1306, I2C with PIC12F1822 and MAX6675 K type thermocouple module. MAX6675 is driven by software (bit banging) SPI. The MAX6675 SPI sends 2 bytes of data.
Temperature range is 0-1023.75 centigrade with resolution of 1/4 degree.
MAX6675 can be bought from eBay: https://www.ebay.co.uk/
AHT21B OLED TEMPERATUE HUMIDITY
OLED display, 128x64, 0.96", SSD1306, I2C with PIC12F1822 and temperature / humidity sensor AHT21b ranging -40 to 120. The sensor and display share the I2C connection to the PIC. The PIC sends measurement trigger and sensor sends back 1 byte of state, 5 bytes of data for temperatue and humidity and 1 byte CRC. Sensor accuracy is 1% for humidity and 2 degrees for temperature.
For using 0.91", 128x32 Oled 3 changes are needed in the code: change definition of yt to 0, yh to 2 and in void oled_init() change command(0x12) to command(0x22).
Ebay: https://www.ebay.co.uk
OLED THERMOMETER PIC12F629
OLED display, 128x64 - 0.96" or 128x32 - 0.91", SSD1306, I2C with PIC12F629 and DS18B20 sensor. Oled is driven by software (bit banging) I2C.
Code includes functions for reading the sensor.
If using 128x32 OLED change code in main() oled_init(64); to oled_init(32); HEX files for both OLEDs are included.
Temperature range is -55 to 100 centigrade.
470 ohm resistors are for attenuating 5V output of the pic to 3.3V input of the OLED.
OLED THERMOMETER HUMIDITY DHT11 PIC12F629
OLED display, 128x64 - 0.96" , SSD1306, I2C with PIC12F629 and DHT11 sensor. Oled is driven by software (bit banging) I2C. Temperature range is 0 to 50.0 centigrade. DHT11 reply with 5 bytes of data 3 are used to display temperature and humidity.
470 ohm resistors are for attenuating 5V output of the pic to 3.3V input of the OLED.
OLED ROOM THERMOSTAT
OLED display, 128x64, 0.96", SSD1306, I2C. PIC16F628A Oled is driven by software (bit banging) I2C.
PIC12F1822 uses hardware I2C. Setting the room temperature by 2 buttons.
Output transistor is to drive a relay or directly 24VDC input to a central heating boiler. Hysteresis is 0.5 degree.
Reading the temperature is every second.
OLED module is I2C interface, 4 pins connector. Driver SSD1306. From
ebay: https://www.ebay.co.uk/itm/0-96
OLED THERMOMETER USING DS18B20 DIGITAL SENSOR
Thermometer based on PIC16F876A
and DS18B20 digital sensor. Included C code and circuit diagram. Displays -55 to 125 centigrade. The temperature is read every 1 second. The math is using integers to calculate the degrees and the tenths of degrees are calculated separately.
Output at pin 3 can be used for driving a relay that is on when
temperature is higher than alarm setting. It can be used as a thermostat
or an alarm for over temperature. To set the alarm press SET for 2
seconds, then press DEGREE to set the alarm, then press SET again.
The OLED module is a 0.96" 128 X 64 pixel driven by I2C interface and
using SSD1306 driver IC. The OLED display uses low power LEDs and
suitable for battery operated. Power can be reduced farther by reducing
contrast.
OLED module can be bought from ebay: https://www.ebay.co.uk/itm/0-96
OLED BITMAP
Displaying Bitmap image with PIC16F876A or Arduino on
OLED display module. Included C code and circuit diagram.
To convert image to code:
On a PC
(MS Paint) resize image to 48x48 pixels and save as monochrom bmp.
Download LCD Assistant app from http://en.radzio.dxp.pl//
Set it to Byte
Orientation - Vertical, Pixels/byte - 8. Save file as text file and copy
the bitmap array to the code page.
OLED module is 0.96" 128x64, 4 pins connector I2C interface. Driver IC
is SSD1306.
19.06.2021 - 19:39 Name: Moty Comment: Hi Scott, I emailed you a suggestion.
19.06.2021 - 14:35 Name: Scott Comment: I am trying to change the display to show Fahrenheit, but am having trouble. I have the formula and it sort of works, but I get a "-" in front of the temp. I added the formula to the following line, after tempH:
temp = tempL | ((unsigned int)tempH << 8); //calculate temp
Obviously I did it wrong. Can you help point me in the right direction? I want to monitor the temp in our pool and I thought this would be a fun project, but as I found out, I am not very good at coding. Thanks for any input.
19.06.2021 - 02:17 Name: Scott Comment: I am trying to change the display to show Fahrenheit, but am having trouble. I have the formula and it sort of works, but I get a "-" in front of the temp. I added the formula to the following line, after tempH:
temp = tempL | ((unsigned int)tempH << 8); //calculate temp
Obviously I did it wrong. Can you help point me in the right direction? I want to monitor the temp in our pool and I thought this would be a fun project, but as I found out, I am not very good at coding. Thanks for any input.
02.04.2020 - 10:13 Name: mkirat Comment: evet
23.12.2019 - 00:28 Name: Moty Comment: Hi Manoochehr, The sensor (ds18b20) has typical error of +/-0.5 , max +/-3 . If the error is the same for the whole range then you can add a line to the code to subtract 1.5 , or you can try to change the sensor, most sensors are within +/-0.5
22.12.2019 - 18:48 Name: manoochehr Comment: hi/this thermometer shows 1.5 degree upper.please tell me what is wrong ?
28.02.2019 - 20:30 Name: Fabio Jesus Comment: Thank you!!
09.01.2019 - 09:48 Name: heidari Comment: Thank you very much
24.12.2017 - 13:59 Name: Moty Comment: Yes, -55
23.12.2017 - 17:49 Name: Manoj Soorya Comment: Is this unit shows the Minus (-) Degree ?
18.06.2016 - 12:25 Name: Moty Comment: Try another LED display.
17.06.2016 - 22:15 Name: Adalto Comment: Amigo simulando no proteus Isis ele não funciona! Fica aceso os 4 display e o seguimento "d" fica piscando e não muda de estado. Me ajuda , obrigado.
17.02.2016 - 11:21 Name: Moty Comment: If you have basic knowledge of mikroC you'll be able to correct the errors. Most errors are the delay macro.
16.02.2016 - 16:17 Name: seed Comment: I need code in micro c
30.01.2016 - 17:36 Name: Comment: Hi again,
I finished and run it. Nice work but values are higher 2-3 degrees. I changed 4 pieces of 18B20 all the same. Can I set it "c" program lines etc? Thanks and regards..
23.01.2016 - 18:34 Name: Comment: Here's the results:
0 1 mikroCPIC1618.exe -MSF -DBG -pP16F628A -DL -O11111114 -fo4 -
6 304 error: Can't open include file "htc.h" #include 1 error in preprocessor. C:\Users\serkan\Desktop\led_thermo\led_thermo.c
0 122 Compilation Started led_thermo.c
26 300 Syntax Error: ')' expected, but '&' found led_thermo.c
113 424 '}' expected '}' found led_thermo.c
109 1163 Variable 'ret' has been declared, but not used led_thermo.c
114 1503 Result is not defined in function: 'reply' led_thermo.c
114 312 Internal error '' led_thermo.c
0 102 Finished (with errors): 23 Oca 2016, 19:29:21 MyProject ser.mcppi
23.01.2016 - 14:58 Name: Comment: I'm going to try. Some beta ones doesn't to let compiled.
22.01.2016 - 21:00 Name: Moty Comment: Why didn't you answer my question?
You can edit the code with XC8 compiler, you can download it from Microchip. You can also use MPLABX or download old Hi Tech from the archive on their website. Google what you need and you will find it.
22.01.2016 - 17:24 Name: Comment: I think you fed up me..But I cannot compile the files. I don't have hi tec c. I've only mplab and how to use it correctly. I could'nt add a,b,c,f to no. "7" and add to -a- digit for "6" and -d- digit to "9" for more readable. Need help.. Thanks a lot..
22.01.2016 - 17:09 Name: Moty Comment: It took you less than 12 minutes to solve the problem, that's quite fast.
By the way, is it a project for school or you have an interesting use for it?
22.01.2016 - 11:17 Name: Comment: Terribly sorry. We've just find the problem. It was sourced pcb drawing. İt's working now. Thanks again..
22.01.2016 - 11:05 Name: Comment: Your .hex files are faulty/broken. Not working. Tried for many times. Also other guys tried. But unfavorable..
17.01.2016 - 22:46 Name: Comment: Ok. Thank you..
17.01.2016 - 21:11 Name: Moty Comment: You will enjoy it more if you try it yourself.
The answer is 0b1000111
I corrected the drawing today the a and b were swapped.
17.01.2016 - 17:49 Name: Comment: Last question if possible. I'd like to add "f" digit to number "7".
At present ...digit[7]=0b111;
Must I write like this:...digit[7]=0b111001; or digit[7]=0b10100111.
17.01.2016 - 17:30 Name: Comment: Thank you very much for soonest reply. I'm going to assemble it. Nice work..
17.01.2016 - 01:06 Name: Moty Comment: Yes, reduce the 1200 to a smaller number to get shorter time.
16.01.2016 - 15:32 Name: serkan karaaslan Comment: Hi,
It'S a very nice circuit. Besides I'd like to shorten read time like 5-6 seconds. "display(1200); //display for 15 seconds"
From here or etc? Thanks a lot..
03.01.2016 - 16:25 Name: sheco bab Comment: very good