Keeping cool
Jeffrey Lee (213) 6048 posts |
If it’s just reading state/settings that you’re interested in, you might be able to get everything you need by going straight to the Portable module (which is what CPUClock talks to). https://www.riscosopen.org/wiki/documentation/show/Portable_ReadSensor e.g. current CPU temperature is just: SYS "Portable_ReadSensor",0,0,0 TO temp PRINT temp/10;"K" Conversion to Celsius is left as an exercise for the reader :-) |
Chris Johnson (125) 825 posts |
Indeed. However, if you want temperature control, then I guess the CPUClock module is the way to go. If you contact me by email – I gave my address further up the thread – I will send you a zip of the pre-release documents. This details the SWI interface. |
John Sandgrounder (1650) 574 posts |
Excellent, Thank you. Just what I was looking for. |
John Sandgrounder (1650) 574 posts |
Yes. And using your code above, the temperature on a remote machine can be read with a simimple cgi script (in this case written in Basic for !WebJames. REM Remote CPU Temperator Monitor PRINT "Content-Type: text/html" PRINT "" SYS "Portable_ReadSensor",0,0,0 TO temp PRINT "CPU Temperature ";temp/10-273;"'C " Not much is achieved in reading the remote clock speed, other than checking that waking up !WebJames kicks the CPU into go fast mode! |
Tristan M. (2946) 1039 posts |
The temp is in Kelvin??? My Pi Zero is still happily chugging along with no heatsink, never having any heat issues. Unrelated, but the combined draw of Pi Zero, RTC, I2S DAC, USB / ethernet combo hub, USB flash drive, and wireless keyboard / mouse receiver is about 300mA. Someone on another forum dared to tell me that a PC just doing everyday work draws about the same as a pi. |
Jeffrey Lee (213) 6048 posts |
Sure, why not? You can always convert it to another equally arbitrary measurement system if you so choose :-) (IIRC the only reason I chose Kelvin was because that’s what TI’s battery chargers used with the OMAP3 machines were returning to me) |
Clive Semmens (2335) 3276 posts |
I trust you told him to disconnect his fan and see what happened… |
Rick Murray (539) 13851 posts |
PC consumes the same as a Pi? https://www.heyrick.co.uk/blog/index.php?diary=20150912 Hint – the PC when running alone (no monitor) is a three digit number… |
Steffen Huber (91) 1953 posts |
It does not make sense to compare a “Pi” to a “PC”. Depending on the Pi model and the peripherals connected, power consumption varies vastly. In PC world, power consumption varies even more. Passively cooled “PCs” are possible. A PC idling in C6/C7 deep power state consumes very little power. A PC running the latest game with three GPUs will consume a little more. |
Clive Semmens (2335) 3276 posts |
For sure. My Mac Mini is passively cooled, and it’s a hell of a lot more powerful than a bottom of the range PC. But it’s a solid aluminium box 20cm square, not a bit of plastic the size of a credit card. |
Frederick Bambrough (1372) 837 posts |
You sure about that? Mine has a fan under the black circular base/antenna. |
Rick Murray (539) 13851 posts |
True, but it’s worth pointing out that my 7.7W (@ 230V) figure is for a Vonets WiFi adaptor and a Pi2 (as I had at the time) running “normally”, not in any specific idle mode, functioning as an operating web server. To put this into context, the Livebox router consumes more power as does the EeePC’s power brick when the machine is in standby, so, yeah, it’d have to be a damn efficient PC to beat that! |
Clive Semmens (2335) 3276 posts |
To be honest, no, not sure. Perhaps it’s capable of fanning itself if it gets sweaty, but I’ve never heard it so either it’s an incredibly quiet fan or it never feels the need. I’ve just assumed it didn’t have one, given its total silence. |
Frederick Bambrough (1372) 837 posts |
They are really quiet. You can sometimes feel the draft if you put your fingers in front of the rear sockets. That’s where the exhaust is. |
Rick Murray (539) 13851 posts |
Chris – how does CPUClock read the current CPU speed? I have a module that reads the speed on a CallBack, and it always returns 900MHz (Pi2) even when CPUClock is saying 600MHz. Do you read it on TickerV or CallEvery or something? |
Chris Johnson (125) 825 posts |
Hi Rick – just seen this now before rushing off, so I’ll need to return to this later. However – are you referring to the GUI front end, or the module? The module uses call every for most of its stuff. The GUI uses wimp_pollidle, and reads the speed when it gets a null event. This means the iconbar display or status window displayed speed can ‘freeze’ if the wimp is not passing wimp polls around. However, the module will still be doing its stuff. |
Tristan M. (2946) 1039 posts |
I’ve found how to keep my Pi3 running a little cooler. You won’t like it. Change CPUClock’s module setting to a max 75*C. That drops the temp on mine to about 65*C. I don’t know why exactly. Second, I’ve noticed the temp drops while under load. For example it goes down another 5*C while building RISC OS. This kind of tracks with the vague suspicion that seems to be floating round that idle is causing heat somehow. |
Jeffrey Lee (213) 6048 posts |
Interesting. There’s some debug code in the Portable module which can be used to measure how much time is spent in each CPU state (fast, slow, fast-idle, slow-idle, and how long is spent switching speed) – I should probably fix it up so that it will work properly on the Pi (the current version requires exclusive use of a HAL timer, but the Pi only has the one) |
Chris Johnson (125) 825 posts |
Odd. I have noticed on the IGEPv5 that the cpu die temperature is quite a lot higher when ethernet is involved. E.g. a processor/file intensive process may run around 60 deg when accessing the SSD, but if the disc based part is over ShareFS to a second machine, then the temperature quite quickly gets up to 70 deg (the limit I use, I also fitted a fan to help with the cooling). I assume that the ethernet hardware is on the SoC and produces extra heat when in use. I do not have a RaPi to play with. |
Jeffrey Lee (213) 6048 posts |
Now done – over here is a build of the module (suitable for ARMv6+) with the debug code enabled, and a simple BASIC program which reports the values. Note that the first time you run the program the values it reports will be garbage, and since it’s 32bit values counting at (insert-number-here) MHz they’ll wrap after a certain amount of time (which the program will tell you; it’s about 2100 seconds for the Pi). Each time the debug SWI is called the counters are reset, so you just need to make sure any test you do doesn’t exceed that limit. On a healthy idle system you should be seeing 80+% of the time spent in the “slow idle” state. |
Tristan M. (2946) 1039 posts |
It’s time to warm this thread up again with my Pi3 running in the orange to red range. I had an idea for the warmer weather of dropping back to the 1b and running it from a USB port on the monitor, and having a port plugged in too so I can use the monitor’s hub and have a nice setup with minimal wiring. |
Rick Murray (539) 13851 posts |
Either:
Or:
|
Chris Evans (457) 1614 posts |
Up to a maximum of 500mA |
Tristan M. (2946) 1039 posts |
I have one of those USB doctor things. Current being drawn isn’t much. What I was testing with was an unadorned 1B. No peripherals. It happily powered up using the Monitor’s USB hub as power, connected to it as a USB device. When I try to plug one of the Pi’s USB ports into the monitor’s hub ‘in’ (The word escapes me sorry), the USB power instantly shuts off. Or in the case of plugging that in first it never powers up. I can’t think of who it is on here that has their Pi mounted to the back of a monitor. I like that idea. I also have a Pi Zero in a case that I considered doing that with but the Zero is messy when it has everything it needs plugged in. What does this have to do with keeping cool? The Pi3 gets way too hot in the warmer months. Using it for RO isn’t overly necessary either so there’s no reason I can see not to set up a lower power board as the RISC OS computer, avoiding the heat issue and making things a little neater. As it is, my desk area looks like something out of a grungy sci-fi movie. An absurd spider web of cables and components. Ugh! |
Tristan M. (2946) 1039 posts |
Top of 46*C today. I think the Pi3 would be a puddle if it were plugged in today. |