Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 02:04 10 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Pico problem with pin(TEMP)

Author Message
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 34
Posted: 07:23am 09 Jul 2025
Copy link to clipboard 
Print this post

At my workbench, ambient temperature 24 C
>
> ? pin(temp)
-9.485304353
>

Running MM Basic Ver 6.0001

Was working correctly just a few days ago, now its gone bad on both pico's I'm currently working with.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5050
Posted: 07:34am 09 Jul 2025
Copy link to clipboard 
Print this post

Hi apalert,

Where you running this continuous during few days, or has the unit been switched off in between. I am trying to duplicate.

Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1358
Posted: 07:50am 09 Jul 2025
Copy link to clipboard 
Print this post

V6.00.02RC24


 
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 34
Posted: 07:59am 09 Jul 2025
Copy link to clipboard 
Print this post

  Volhout said  Hi apalert,

Where you running this continuous during few days, or has the unit been switched off in between. I am trying to duplicate.

Volhout


Both would have been turned off overnight.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5050
Posted: 09:05am 09 Jul 2025
Copy link to clipboard 
Print this post

Hi apalert,

Has been running for 2 hours straight, and no issues. The chip raised from 24C (cold) to 34C now. (RP2040 running 252MHz).
I will turn it off now, let it cool for few hours, and then restart. Soo if I see the same (running 6.00.02).

Is it possible that turning the boards OFF, and ON again generated some voltage spikes that killed the chips. Or maybe that when the power to the boards was turned off, that some of the IO pins (i.e. serial port) where still carrying voltage from the peripheral connected. In that case the chip on the pico could be "reverse biassed" and may have degraded.

huh..phenix..how do you do that ?

Volhout
Edited 2025-07-09 19:10 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5050
Posted: 09:21am 09 Jul 2025
Copy link to clipboard 
Print this post

apalert, phenix,

I tried
- RP2350 genuine RP board on Game*Mite
- RP2040 zero (the small one)
- RP2040 genuine RP board (2x)

Tried CPU speed 378000, 133000, 200000, 252000 on 2040's (252000 on 2350).
Nothing, rock solid readings. One 2040 runs 5.08.00. Others run 6.00.02.

Volhout
Edited 2025-07-09 19:23 by Volhout
PicomiteVGA PETSCII ROBOTS
 
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1358
Posted: 10:13am 09 Jul 2025
Copy link to clipboard 
Print this post

Mine was a RP2040 clone but the RP2350 DIL reports 48°
 
apalert
Newbie

Joined: 06/07/2023
Location: Australia
Posts: 34
Posted: 11:49am 09 Jul 2025
Copy link to clipboard 
Print this post

  Volhout said  apalert, phenix,


Thanks for looking into this guys

Incidentally I added a LM4040 3 volt reference to the VREF pin on both units yesterday with the aim of improving the noise levels from ADC pins.  

I've now removed one and while the result of ?pin(temp) has changed it's still rubbish.

Then I reinstalled MMBasic V6.00.01 but again no improvement.

It does seem installing the LM4040 may have been coincidental with pin(temp) going awry.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7852
Posted: 01:18pm 09 Jul 2025
Copy link to clipboard 
Print this post

Could this be a glitchy power supply problem?
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5050
Posted: 01:31pm 09 Jul 2025
Copy link to clipboard 
Print this post

Peter could shed some light into this, but....

Vref is used to measure the diode temperature inside the RP2040 chip.
So when you change Vref, then the ADC reading is different.

MMBasic has an option: OPTION VCC voltage (i.e. OPTION VCC 3.012).
This is used in MMBasic to make sure that the value you read from the ADC is the actual voltage.

But maybe it also corrects for the ADC reading of temperature. That I cannot say.
Peter could.

When you measure the accurate voltage on the LM4040, and put this value in OPTION VCC this helps for ADC readings. Maybe also for temp.

Volhout

P.S. when your Vref is 3V (LM4040 output is 3V, versus 3.3V normal Vdd = 10% low) and you would read a diode as temperature sensor with a value of around 0.6V, the 10% low Vref would give a reading of 0.66V (Vref lower, reading higher). That is 60mV higher. With a typical silicon temperature coeficient of -2mV/C, that would give a temperature reading roughly +0.06/-0.002 = 30 degrees lower.

That is very much in line with the -9 degrees you see, when ambient is +24. So it is very well possible that the LM4040 is the culprit.
Edited 2025-07-09 23:39 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025