DIY digital thermometer with MIN/MAX
HTML-код
- Опубликовано: 7 сен 2024
- Building a portable LED digital thermometer with maximum and minimum memory. The second version has adjustable brightness of the display.
The 1st version with ATmega8A (ATmega8L):
danyk.cz/avr_t...
The 2nd version with ATmega88PA (ATmega88):
danyk.cz/avr_t...
Please support me on Patreon:
/ diodegonewild
My Instagram:
/ savage_danyk
CONGRATS FOR 200K SUBSCRIBERS!!! KEEP IT UP!!
Thank you so much! 😀
Try with a low voltage PIC microcontroller with built in LCD driver, like for example PIC16LF190x (1902 to 1907) - even the smallest 1902 has 4 common pins and up to 19 segment pins, plenty for a 4 digit lcd display, and these microcontrollers can run as low as 1.8v and has a fixed voltage reference (1.024v or 2.048v)
Hours and hours of development bundled into a few minutes of video for our benefit. I hope you enjoyed your fire extinguisher, it was certainly warm enough for one😁😁
You can put a small solar panel to prevent battery discharge.
I really like your microcontroller projects. Using assembly you really use the most of the microcontroller in the most efficient way. I think it would be great to show some code on the video so everyone can see how is to programm the AVR without arduino but with assembly, the most efficient way to programm theese simple kind of MCUs.
This is really nice! I'd say you should add capability of measuring humidity and then calculating the dew point temperature and the wet bulb temperature which are both crucial for human beings.
And definitely add facial recognition to prevent unauthorised attempts to access the temperature
Czech Republic sells very nice fire extinguishers, lots in the store I work at. ;) Better than the local ones...
Nice work!
That MCP9700 temperature sensor seems very nice in general, because of it's linear response to the temperature (if using something like a thermistor, it has a very non linear response to the change in temperature - which makes building an accurate temperature measuring device much harder.)
Curious what a small solar cell would do to offset the battery usage
Try duplexing an LCD! It only requires Low/High-Z/High voltage levels on the two backplates (which can be achieved using 3-state logic), while each segment pair still only uses Low/High. So a full 4-digit 7-seg display (32 segments) would require just 18 pins (or likely fewer if you only need 3½ digits), which you still have room for on the ATmega88. You may need a resistive divider to pull the backplates to around ½ Vcc during the High-Z phase, resulting in a 3:1 average absolute voltage ratio between ON/OFF segments (or 5:1 RMS), which I think will still produce very good contrast and viewing angles.
No ono paralelní LCD taky není sprosté slovo, zvláště když jsou dobře dostupné třeba 4DR821B. To pak může budit CMOS posuváky, nebo starou dobrou 7211.
@@teslakovalaborator He has used a static LCD (single-backplate) before, look up his LCD clock+thermometer. This seems like an easy and practical project to take up the multiplexing challenge. However, duplexed 4x 7-seg displays, though they exist, are very hard to find, and quadruplex is not really worth it due to 4 voltage levels (2 MCU pins) required for all segments and backplates...
I actually liked the colder image temperature, color rendition looks better. My lamps at home are never colder than 5000k (I prefer 4000k), but in the video it looks better (obviously this can be adjusted via white balance)
It's possible to buy empty metal tubes which you can place mcp9700 into and fill it with silicon or epoxid. Exactly the same tubes are used for NTC probes.
I guess antenna tubing would do too. It is nickel plated brass usually, so it should be sealable by soldering it shut.
Also works with a Mega168A or 328A or 328PA. The 88A is just smaller.
I have some 328P but I never tried to put a program for 88 into it without a modification...
I like the originality of your content, Keep it like this. Super informative and detailed.
38 degrees here in Athens, Greece today :)
You're in a different climate zone ;). I'm melting at 30 degree. The highest indoor temperature I've seen here was about 33.
I start melting at 40 degrees. The weather is 37 degrees
@@DiodeGoneWild I agree 👍
Climate zones don't exist anymore in Central Europe. They're now all the same. Germany reached 42°C in June 2019 and this year we peaked at just under 40 again. Central Europe will see the 50°C mark before 2030.
@@kyoudaiken - Need more coal fired power generators, so you can use more A/C !
well done sir.....great video......
Cool low powered led displays, what about e-ink? Could that be an even lower powerd option? especially for something that doesnt change much like temperature, or even a voltage monitor maybe, like solar charge contorllers, some of which are out in the sun which the e-ink display would shine in such an application (or not shine because theres no glare) Anyway love the power efficiney and simplicity of this design. With such a low power draw those cheap little solar panels could keep this thermo-meter alive indefinately. I notice nihm batteries seem to last forever, they just keep going, just at lower voltages as ive noticed with my LED lights, not as bright as with lithium but theres no cutoff, they can go down and down and recharged back up. I actually shorted a bunch trying to make a diy 9v battery pack out of these 1.5v nihm rechargable batteries. Needles to say i made a mistake and it wasnt a battery pack it was an electric chair for batteries. Even the spring holding one of the batteries lost all springiness when the short circuit amp current went through it. I thought for sure these nimh batteries were toast. Looks like only 1 or 2 batteries took the brunt of it but when I recharged them, all good as new, actually coulndt find which of the ones got down to 0 they all recharged to the same capacity like nothing a happened. Anyway maybe an underrated battery chemistry?
cool project ! very cool
Спасибі за цікаве відео, вас дивляться з України. Мирного неба та здоровя вашим рідним.
Its kind of crazy you wrote all the code in ASM when you could have used C++ but i think you did it to have more control of the MCU and probably make it run faster.
There is an 80-240V AC to 5V 700mAh DC power module that stands for WX-DC12003..you should have a look at it..very small size 23 x 14mm really interesting
11:10 now this goes to the jlpcb junkies who order boards from china even for a multivibrator circuit haha.. 👍👍 nice project! I can relate to this REAL prototyping a lot!
Very interesting project. I was wondering why did you decided to use an external voltage reference and adjustment potentiometer instead of using the internal voltage reference and design the software around it. And maybe use some button combination for calibration. The sensor would provide about 0.25 C/bit instead of 0.2 so a little bit less accurate and the code is going to be a bit more complicated especially since you are using assembly, but is there another reason behind that design choice?
Internal voltage reference is not stable and that leads to slight fluctuations in the measured temperature.
Key to get a perfectly stable temperature reading is having a damn stable voltage reference. That's why the external reference.
Danke!
Thanks ;)
Great work and explanation.
Cool project. I was expecting a vacuum fluorescent display looking at the color :)
Congrats on 0.2Msubs! :)
I also like VFDs, but I can't imagine running it on a battery :). Thanks ;) But 200k looks better than 0.2M :)
@@DiodeGoneWild don't worry, you'll get 220k, 330k, 470k... :D
Файний вогнегасник :D
I see you put this in a project case.... but I haven't been able to find a floppy disc box for many years either.
Where do you get those boxes from, or how's the search word for ebay? They look super nice
I was wondering that too!
This box is KM-78BKTRS, I've bought it from TME.
Soldering on the temperature sensor? I broke a few by doing this (and lost hours of troubleshooting my circuit.... stupid me)
Lessons learned: I now use wirewrapping; a tiny wire directly wrappend on the legs of the sensor. Then heatsink over it
Great video with very useful details... no nonses but great facts
a bucket of resin and of course a cat to keep us with our feet on the ground ;-)
chrisV
Keep the pins long. Hold the component with pliers between the component and the end of the pin. Solder on the end of the pin. This way the pliers suck the heat thanks to it's high thermal inertia.
@@cmuller1441 i don't recall ever trashing any silicon chips by soldering, and i use 100W soldering gun, perhaps his solder is lead free crap with too high melting temp.
Flux helps, the faster you can get in there and get out the less heat soaked the part becomes. You're doing it wrong if a small joint takes more than a second or two.
Have you tried entering sleep mode and waking up by either a button press or a periodic timer interrupt ? I think this would save more battery power as the samples you need to take can be taken periodically and in larger time spans
Great project!
Could you please make a video on your battery capacity meter circuit?
Very good
DANYk 💪💖
I bet those colored nimh batteries are from Lidl. I have 4of.them laying around in my car, bought them 5+yrs ago .
Of course :) I have a heap of them... even if I don't make more than 2 cycles on them, at least they don't leak like alkaline ones do.
സബാഷ് ബേട്ട 😁
ഫ്രം കേരള , ഹബീബി💫
Good job 🧟
great video as allways
Hi, Super Cool project.
Could it be used instead of AP2138N-2.5 a Zener diode 2.5 or 1117-3.35 ? And as a Temperature sensor (MCP9700A) can be used different sensor Dallas DS18B20 or 3-pin KTY81-121.
Thanks.
You need a damn stable voltage reference and zener diodes aren't as stable as these low power voltage references like this one or tl431 are...so zener diodes aren't a great choice for temperature sensing projects!
As for the other temp sensing devices are concerned you can always compare their datasheets and decide yourself!!
I like the design but I think I would rather power it off USB in my situation. I guess putting a resistor or a diode in between to make it 4,5V should be fine?
Everything in it can run on up to 5.5V, so you could use 5V directly. Maybe just increase the resistance of the display resistors couple times. Or maybe not, if you have a dim display.
MCP9700A has accuracy ±2C. What's the point to have display resolution 0.1C?
AP2138 is just LDO, it's not voltage reference. I haven't seen LDO to be used instead of reference. Is it stable enough? Especially temperature stability.
If you go look at the AP2138 datasheet, you will see that regulator has a built in voltage reference, as most regulators do. It's just less precise than an actual voltage reference, and with worse temperature coefficient. But it doesn't really matter in this case, it's not like the other components make it possible to be more than 0.1c accurate, therefore minor output voltage variations won't matter that much.
Well, the datasheet of MCP9700A says ±2°C, but I have tested multiple of them and they all seem to be within about ±0.1 or at most 0.2°C. The voltage reference is also stable enough. It reads 2.501V at room temperature and 2.502V when heated too hot to touch :).
@@DiodeGoneWild I would like to add, Accuracy and sensitivity are two different parameters. For example, you may have a ruler separated by millimeters, but it has an error of 2 cm (eg, in one meter), but still, the difference between two different lengths (of different objects) can be measured with a sensitivity of one millimeter.
Nice thermometer. Makes you software for ATmega 88AP yourself?
of course I've made the software myself ;)
@@DiodeGoneWild You won't make videos on how to build software?
Do i have to modify the circuit if i want to use TL431 instead of the AP2138N-2.5 (14:50)
Of course. TL431 is a parallel regulator. Use it in a 2 terminal configuration, with a series resistor calculated to pass at least 1mA at the minimum expected supply voltage. R = (Vcc - 2.5V) / 0.001A. For example for 4V minimum Vcc, you use a 1.5k resistor. And of course, at a low brightness, your TL431 will draw more than the rest of the device, but whatever...
Why would you have a temperature sensor under the sun light? The reading would not be accurate because the thermometer would show the temperature that the sensor is heated to, instead of the actual air temperature.
For the low voltage consumption, I bet it goes in a reboot loop. Maybe that case is not handled properly.
I think that under the BOD level, the program has no effect. It's not running.
@@DiodeGoneWild I don't remember all the details but I think it's in reset but then tries to restart. Do at the beginning of the start code you are supposed to check a status flag and see why you start. After a BOD the right thing to do is probably to disable BOD, disable the buttons and to go in deep sleep immediately.
Would be nice if you could make the comments/notes in the source code in english.
I don't think that's an easy task, as even labels are named in Czech. That way, the code is easier to understand while writing it. If you have any questions about the code, it's probably a good idea to ask him directly.
Could you build simple 4 digit clock with temperature on DS1307 and DS18B20 and separate blinking dots?
Very interesting. Do you think this could be easily modified to use a more precise thermometer? Let's say error 0.5-1°C in 0-10°C range?
I think new lighting and location are good. You just need a wind noise muff over your microphone
Next time you should do DIY multimeter.
Hi Dan, did you use an existing arduino ide software to write code? and try to use an arduino nano or mini that you can buy cheaply on eBay or Amazon
Hell no.
@@DiodeGoneWild Atleast those Commercial Arduino's have a Protection and a Communication Protocol to PC and Arduino itself, But I respected your decision, But standalone Arduino have benefits too, they didn't take too much space on breadboard or PCB which is nice for portable project
@@Jyaazu Assembly (which Diode uses) can be a lot of fun, but yes, programming some things can be a monumental pain. I was (and still am) a fan of programming with Arduino compiler, but now I am making a MCS-48 nixie clock. It's difficult, but also amusing to keep the program between the limits of that 1976 crappy MCU.
The Arduino IDE is straight up trash, if you want an upgrade without writing AVR assembly yourself, you can get GCC-AVR and integrate it to VSCode, waaay better
Also Arduino uses a bootloader which doesn't only makes your startup slower, it also adds higher current consumption when in deep sleep
Why don't you use LM35? why MCP9700??
You might have said this in the video, but if so I missed it. Why not a physical power switch to disconnect the batteries? Is the self-discharge of NiMH high? (I know alkaline self-discharge is very low.)
When you already have 2 buttons, why add a switch? Too many things to physically mount to the box.
JLC PCB please help!
How do you program these controllers or any programmable IC in general?
Through "programmers". They are hardware devices that can load hex files generated by your compiler into the memory of mcu.
"USBASP" is the most popular programmer used to program avr microcontrollers.....it's an open source, anyone can build it by himself!
I had the requirement to feed normal 7-segment displays with battery at as low and constant current consumption as possible. I decided to drive only one segment of all digits at a time. This way the battery "sees" only the current consumption of one segment - no matter how many segments have to light up. Is there a special term for this kind of multiplexing?
But to reach enough brightness, you have to increase the peak current of the segments, so you don't save any power. This won't make the display more efficient. Just dimmer, if you keep the same resistors.
I have a Atmega8-16PU Micro-controller, does it work with that Micro-controller?
no
@@DiodeGoneWild What about first version? And I have also Atmega8A or Atmega328P chips. Thanks.
Naice 👍
how do you chose the MCU s? besides DIP package and AVR since i am never sure how you do it .
do you write the code before you buy the IC? ( so that you know its size and ram usage) or simply get something big enough ?
also there are some underage ICs that would keep a pin low if Vin in usder a set amount i think if you use one on the reset pin you can draw less current while on undervoltage
Mostly based on number of pins. I almost never run out of program memory. I write the program in assembly for a particular AVR. ATmega8 and 88 have 8kB memory, this thermometer doesn't even use 1kB. And it doesn't even have to use RAM, just like any simple AVR program written in assembly, because 32 registers might be enough. The reason I switched from 8 to 88 is that it has 2 output-compare units for timer/counter2 (the only one that runs in power save), unlike 8, which has just one output-compare unit. This made the PWM of the display brightness easier. 88 also has PCINT function to wake it up from power-down using any pin. On 8 I'd have to rewire it and put the button on INT0 or 1. And, of course, 88PA draws a bit less than 8A. And I think I can get away with no undervoltage protection. When the battery gets flat, I don't care if the chip resets or if it gets stuck :). At this point, you're changing the battery anyway and it resets in the process of changing it. And the display will be far too dim long before the battery voltage would be so low it would make the chip stuck.
@@DiodeGoneWild thx, i am always a bit paranoid with program size would be to large so i allways default on ATmega328... and that is overkill and now with the chip shortage i sprt of started to look into other ATmegas like ATtiny and other weaker ones
on a side note where did search for features like that compactor do you look up many datasheets or search on some list/site ?
Every common AVR has a comparator. And almost every common one has ADC, except ATmega8515 and ATtiny2313. I always choose from the more common ones like attiny13, attiny25/45/85, attiny24/44/84, attiny2313, atmega8, atmega88 and atmega16. Mostly based on number of pins, whether I need the ADC an so.
@@DiodeGoneWild thx, saves the AVR series were confusing on sites since there are so many i had no idea what was more popular/used
ps video idea: AVR programing guide + how to chose
Its 37degrees at Turkey 😅
I'm trying to commission someone to make a Nixie thermometer display that uses a 2 pin PC temperature sensor....its impossible. I planned to have 2 Nixie displays in my custom liquid cooled PC.
WOw
What's the display wavelength?
525nm
Now noticed the P/N at 7:25. Looked somewhat like 495-505nm on the video though (i've never seen this color of a 7-seg display).
Yes, in the video it looks almost cyan (or VFD display color), but in reality it's much more green. Cameras seem to skew these monochromatic colors.
Can you send me a fire extinguisher please.
ナイス
Kawasaki tokyo hiroshima sushi?
❤️❤️❤️🇱🇰
Can you send me this paper ?
No, because this is a VIDEO.
@@johncoops6897 thanks i thought it is maybe a thermostat what you can make on and off your humidifier .
no dodgy experiments for special 200 000 subscibers?! im disappointed :(
We want even more salt!
ItsAwesomeToGetY˄ouuur....WeeklyDose˄Oooof.....DiodeGone-W˅iiiiiiiiiild