I'm a beginner in electronics, and I'm trying to understand where the value 0.00005 comes from in the code for converting the ADC reading to voltage on the Raspberry Pi Pico. The calibration offset is 550mV, and I calculated the step size as 3.3V/4096 = 0.000805 and can be rounded off as 0.0008, but I still don't understand how that specific value 0.00005 was derived. Please correct me if I'm wrong and clarify this for me.
Good morning robingeorge6672, While reading your question I recalled that .00005 value used as a constant. I looked at the source code to confirm, then I looked through my notes for that story. I cannot recall anything to indicate why that value was used. What is even more concerning is how I got correct temperature readings with that value. The difference between .00008 and .00005 would have a very large impact (13.4 C) on the output. Thank you for bringing that to my attention! I will have to update the source code and retest the results in an actual circuit. THANK YOU! Cheers! Chris
Well explained, useful concise project. Have you considered sending the temp data via wifi to an MQTT broker (possibly running on a regular RPi) and either node-red or a web server (also running on the regular RPi) to graph the data on a web page and even store it in a database? A much bigger project for sure with lots of moving parts to master. You have a great teaching style and thoughtful content, thanks!
Hi Quaternion, Thanks for the feedback, suggestion and kind words!!! Very much appreciated. I have a temp/humidity data logger in the works right now that sort of fills the bill. It is not as grand as you are suggesting but it should be a good starting point for more IOT type projects and videos. Thanks again! Cheers! Chris
Unfortunately it is pretty hard to diagnose a problem when the only thing you are provided is the symptom you experience. Check your wiring (most often the problem). Check your connection to PICO (easy to miscount pin numbers) Sensor could be bad (depending on source, frequent cause) If you typed in the code, double check it ( very frequently the cause) Certainly possible, something is wrong in the code I posted. Chris
Another great building block tutorial, thank you! Please take this as the genuine feedback that it is: I found the green circle around your cursor distracting due to the other code under it being partially obscured. I also wouldn't mind the code font size to be increased a bit - but I am using a notebook (and old eyes!) and maybe others don't see a problem. Thanks again, please keep these up.
Hi C G, Thanks for the feedback, suggestion, and kind words, VERY MUCH APPRECIATED!. Regarding your request I have a temp/humidity logger project in the works and will be out around early summer I think. Cheers! Chris
Thonny has increase fontsize option in the menu, also the shell can be replaced with a movable shell, use tools/open system shell, but to run a file you will need to import it e.g. for demo.py then do import demo
@@jyvben1520 Hi Ben, I think I need to leave the settings large all the time and stop switching back and forth. I noticed the font size not getting back to the "video size" several times now. Just too darn many things for me to keep track of when filming 🙂 Cheers! Chris
I've been using the DHT22 units. They occasionally return readings that are not consistent with previous readings (many degrees different). I read at one per minute. I'm trying to control the temperature in a greenhouse with a Raspberry pi 3B+. If I replaced the DHT22 with the Pico and LM35 "talking" to 3B+, it might solve a problem I have with the DHT22.
Hi William, It might, but I have found most of these digital temp sensors can be a bit wonky at times. I have resorted to averaging in some other applications and that has smoothed things out there. Keep us posted on what you find if you get around to trying it. Cheers! Chris
@@MakingStuffwithChrisDeHut I've thought about using a low pass filtering average. With either kind of averaging, it would take some time. I've read that less than 5 seconds between readings on a DHT22 is a problem. Instead of one reading per minute, it would mean multiple readings per minute to get an average.
@@MakingStuffwithChrisDeHut Yes that's what I do. I think I may start a thread to take a reading every 5 seconds and maintain an average during the one minute interval for the main loop to act on. I will still discard and not include any readings that are very inconsistent in the average calculation.. I'm trying to control the temperature in a small greenhouse.
@@WilliamBurlingame Being that temperature changes slowly, is it really necessary to sample the data that quickly? I might be missing something so forgive my questions.
I'm a beginner in electronics, and I'm trying to understand where the value 0.00005 comes from in the code for converting the ADC reading to voltage on the Raspberry Pi Pico. The calibration offset is 550mV, and I calculated the step size as 3.3V/4096 = 0.000805 and can be rounded off as 0.0008, but I still don't understand how that specific value 0.00005 was derived. Please correct me if I'm wrong and clarify this for me.
Good morning robingeorge6672,
While reading your question I recalled that .00005 value used as a constant. I looked at the source code to confirm, then I looked through my notes for that story. I cannot recall anything to indicate why that value was used. What is even more concerning is how I got correct temperature readings with that value. The difference between .00008 and .00005 would have a very large impact (13.4 C) on the output.
Thank you for bringing that to my attention! I will have to update the source code and retest the results in an actual circuit.
THANK YOU!
Cheers!
Chris
I’ve watched many of your videos and learned much. Thank you.
Hi Stephen, Thank you for being part of this community and for sharing your appreciation! Very much appreciated.
Cheers!
Chris
Very professional videos Chris very accurate and well explained.
Hi D Mark, thank you very much for the kind words! Very much appreciated.
Cheers!
Chris
Well explained, useful concise project. Have you considered sending the temp data via wifi to an MQTT broker (possibly running on a regular RPi) and either node-red or a web server (also running on the regular RPi) to graph the data on a web page and even store it in a database? A much bigger project for sure with lots of moving parts to master. You have a great teaching style and thoughtful content, thanks!
Hi Quaternion, Thanks for the feedback, suggestion and kind words!!! Very much appreciated. I have a temp/humidity data logger in the works right now that sort of fills the bill. It is not as grand as you are suggesting but it should be a good starting point for more IOT type projects and videos. Thanks again!
Cheers!
Chris
just perfect like your all other vidoes.
Hi OmidAtaollahi,
Thank you very much for the very kind words!
Cheers!
Chris
i am having difficulty in reading the data i used the same code and same hardware
my reading are in range of 0.1-0.3 degrees Celsius
please help Chris
Unfortunately it is pretty hard to diagnose a problem when the only thing you are provided is the symptom you experience.
Check your wiring (most often the problem).
Check your connection to PICO (easy to miscount pin numbers)
Sensor could be bad (depending on source, frequent cause)
If you typed in the code, double check it ( very frequently the cause)
Certainly possible, something is wrong in the code I posted.
Chris
Another great building block tutorial, thank you!
Please take this as the genuine feedback that it is: I found the green circle around your cursor distracting due to the other code under it being partially obscured. I also wouldn't mind the code font size to be increased a bit - but I am using a notebook (and old eyes!) and maybe others don't see a problem. Thanks again, please keep these up.
Hi C G, Thanks for the feedback, suggestion, and kind words, VERY MUCH APPRECIATED!. Regarding your request I have a temp/humidity logger project in the works and will be out around early summer I think.
Cheers!
Chris
Thonny has increase fontsize option in the menu, also the shell can be replaced with a movable shell, use tools/open system shell, but to run a file you will need to import it e.g. for demo.py then do import demo
@@jyvben1520 Hi Ben, I think I need to leave the settings large all the time and stop switching back and forth. I noticed the font size not getting back to the "video size" several times now. Just too darn many things for me to keep track of when filming 🙂
Cheers!
Chris
@@MakingStuffwithChrisDeHut would destroying the config file help ?
@@jyvben1520 Ha, probably, but I think I will save that as a last resort!
I've been using the DHT22 units. They occasionally return readings that are not consistent with previous readings (many degrees different). I read at one per minute. I'm trying to control the temperature in a greenhouse with a Raspberry pi 3B+. If I replaced the DHT22 with the Pico and LM35 "talking" to 3B+, it might solve a problem I have with the DHT22.
Hi William,
It might, but I have found most of these digital temp sensors can be a bit wonky at times. I have resorted to averaging in some other applications and that has smoothed things out there. Keep us posted on what you find if you get around to trying it.
Cheers!
Chris
@@MakingStuffwithChrisDeHut I've thought about using a low pass filtering average. With either kind of averaging, it would take some time. I've read that less than 5 seconds between readings on a DHT22 is a problem. Instead of one reading per minute, it would mean multiple readings per minute to get an average.
@@WilliamBurlingame Are you looking to get readings every minute for your project and then perform an action on that?
@@MakingStuffwithChrisDeHut Yes that's what I do. I think I may start a thread to take a reading every 5 seconds and maintain an average during the one minute interval for the main loop to act on. I will still discard and not include any readings that are very inconsistent in the average calculation.. I'm trying to control the temperature in a small greenhouse.
@@WilliamBurlingame Being that temperature changes slowly, is it really necessary to sample the data that quickly? I might be missing something so forgive my questions.