Notifications
Clear all

LM35 Temp sensor spikes

25 Posts
6 Users
5 Likes
1,001 Views
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  
This topic was modified 2 years ago 2 times by Fungreenfox

regards
Fungreenfox


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

I see English is your second language so I hope I am clear. It helps if you leave out useless and null statements to reduce the code volume (like beep and empty #include's) also if you can eliminate any code not directly involved in the perceived problem that also helps to reduce code volume. One last thing, statements like

if (beta == gamma){

  doSomething;

}

Occupy much less code space when written as 

if (beta == gamma) doSomething;

3 lines down to 1

Hope this is of some assistance.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

Is this for your paranormal research?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 
Posted by: @fungreenfox
here are two LM35 temp sensors for arduino esp32 script, placed
over the two heatsinks on a power supplier.
It's not obvious to me what microController you are using to run this sketch.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  

@zander I have built some ghostscanners, but this one is for a power supplier like the example, but with an esp32 also.
The case is designed by me, and printed at my 3dprinter.

image

 
A little video showing the case.

This post was modified 2 years ago 2 times by Fungreenfox

regards
Fungreenfox


   
ReplyQuote
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  

@will Esp32 Wroom.

image

regards
Fungreenfox


   
ReplyQuote
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  

@zander Outcommented lines are not seen by the compiled script; only by the editor.
Don't worry about the english 🙂

regards
Fungreenfox


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6893
 

@fungreenfox The point is to reduce what we have to look at. The less the better. Until the volume is cut by 2/3 I will wait.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  
This post was modified 2 years ago by Fungreenfox

regards
Fungreenfox


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@fungreenfox 

if you're using an ESP, are you running the LM35 from 3.3V or 5V ? You'll need the 5V and add a capacitor for extra stability.

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1656
 

Hi @fungreenfox,

  Sorry, I am not clear what these words in your opening message actually mean ... could you clarify please?

The average of temperature in Celcius, is taken by 8 readings over 4 seconds, and it looks stabile.
When mounted, there are "spikes" from 25 up to 70 celcius, ......

The first sentence says the readings are "stable" ... suggesting you seeing steady temperature readings.

But the second sentence says you are seeing "spikes" ... from 25 up to 75 Celcius.

These two descriptions appear to contradict each other.

The only clue as to why they might be different is the second sentence starts "When mounted" ... which you will be able to visualise and understand, but as I cannot see your equipment, I can only guess what you mean.

------------

  • Are you saying that the readings change from "stable" to "spiking" when you "mount" something?
  • If so, what and where are you "mounting".

----------------------------------

Please accept my apologies in advance if I have misunderstood your message ... I have a long history of asking many stupid questions... 🙄    

Best wishes, Dave

 


   
frogandtoad and Ron reacted
ReplyQuote
(@fungreenfox)
Member
Joined: 2 years ago
Posts: 14
Topic starter  

@will 5V, and a capacitor at 220uf 10V. - it doesn't change amount or size of spikes.

regards
Fungreenfox


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2507
 

@fungreenfox 

Maybe this will help ...

https://bestengineeringprojects.com/lm35-how-to-get-stable-temperature-reading/

Anything seems possible when you don't know what you're talking about.


   
Ron reacted
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@fungreenfox 

Posted by: @fungreenfox

Normally, its not needed to place brackets around that line, if there is only one. This is for a making it more easy to discover what the if is there for. Brackets there, may be set or left out, if wanted and shoould not have any influence on this. 

Strictly speaking, it's probably not a big deal in this particular case, but this is not the default case for every situation, thus better not to include such brackets in general code at all.

Why?

Because, those brackets introduce an ANAONYMOUS SCOPE, and can catch you out in situations you may not be aware of!

They can (and are), also used for beneficial purposes in program design.

Best to avoid adding them if you don't fully understand their function / value.

Cheers


   
ReplyQuote
Page 1 / 2