display temperature and humidity on lcd

Go To Last Post
59 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you remove your sensors and remove them with potmeters, do you have stable values then?

Are the values stable in proteus?

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, to have a comfortable LCD, I do the following thing:

 

int oldvalue = -999 // values are assumed to be positive (humidity : it is true; temperature are seldom that low

int threshold = 6 // arbitrary value (depends on the variability of what is to measure

 

forever {

  value = measure()

  if (abs (value - oldvalue) > threshold {

   oldvalue = value;

   display(value); // is only displayed when significant changes occur

 }

}

 

BTW : have you thought of about decoupling capacitors?

Last Edited: Wed. Feb 7, 2018 - 01:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"threshold" here is hysteresis.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

agree with the greek synonym but I think, from OP long  pesting histery that -s-he cannot turn a wikipedia  article into pseudocode, then code....

 

BTW : I never use running averages nor prder 1 filters (though easy to implement: hide peaks, steps; never did need).

 

threshold can be deduced from data, when stationary (it is the basis of background with constant light filtering in an image) as

k* mean (abs(measure - previousMeasure)) (k is often 6.0)

Last Edited: Wed. Feb 7, 2018 - 02:21 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Have you corrected the pin 20/21 issue?   they should not be tied together! 

The AREF pin should only have a 100nf to ground tie to it.

While the AVCC should be connected to VCC and have a 100nf to ground....

 

Jim

 

Mission: Improving the readiness of hams world wide : flinthillsradioinc.com

Interests: Ham Radio, Solar power, futures & currency trading - whats yours?

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you believe that the LM35's output is oscillating (and it may because of draughty air flow), you could insert a first order low pass filter in between the LM35's output and your ADC input. If it does not improve, you can blame your software I guess.

 

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your idea of LM35 oscillating puzzles me:

Did OP and Proteus read and comply with

www.ti.com/lit/ds/symlink/lm35.pdf

 

"TI recommends adding a 0.1 μF from V+ to GND to bypass the power
supply voltage. Larger capacitances maybe required and are dependent on the power-supply noise." , chap9,  very head of the page..

 

Edited : each and evry chip should hav e at least 1 decoupling capacitors, except avr (need at least 2) . Hope Proteus h an arm, to solder them, if OP forgot...

 

Adding an analog RC filter between LM35 and AVR would either :

need another PCB

or

add loose connections to a lousy broadbeard. In thsi context, would be like adding typhus to cholera.

 

OTOH, avr can simulate 1rst order filters with one liners (say value2Display = alpha * value2Display + (1 -alpha) *valueMeasured;

alpha being, say 15/16 -4 bits : never will overflow; 1-alpha is trival; formula can be simplified, divisions optimized if needed).

I bet porteus can simulate avr simulating ....

Last Edited: Thu. Feb 8, 2018 - 12:32 PM

Pages