Lesson 02 - Realtime applied on direct IO
The lecture - direct IO
Tentative agenda.
To get deeper knowledge about analogue sensors demonstrated with a NTC resistor
Be able to going from analogue measurement(voltages) to real engineering values (temperature in K or C)
Understand dynamics of analog to digital conversion (8,9,10,…13,… bits)
first training in implementing in HW/SW on an Arduino
Read about NTC here
Read more about measuring voltage
An excellent tutorial about analog to digital conversion
See Sparkfun measuring voltages
Preparation for the lecture
Get a NTC - we will suplly with one pr group
Read NTC pages
Read Sparkfun tutorial
Read about adc principles
Please look at Types section where there is link to the different types of ADC.
Exercises
Do a simple handwritten schematics for using a 10kOhm NTC for measuering temperature in interval 0-30 C
Includes propes selection of value of fixed resistor
Design algorithm for calculating temperature
Can you do it with integer variables
Implement the code
Design a test suite so you can see max ADC frequency
How many conversions you can to pr second
Set a fixed voltage divider on the input pin for the ADC
5V -> 10kOhm->10kOhm->0V
Measure voltage
Do 10000 conversions and do statistics for values
Is is the same value you get all times
hint: do it in integer because you ADC returns and integer
If you are going to measure temperatures in range -40 to -30 C with a 10 kOhm NTC please argue for the value of teh fixed resistor
Shall it be 10 kOhm like when measuring around 20C
Hint what is the resistance of a 10 kOhm NTC at -40C -30C -20C etc
and …
finalize the exercises from last lecture
Litterature
See lect02_prep section for read instructions
The litterature below is copy from prep and movies section.
Read NTC pages
Read Sparkfun tutorial
Read about adc principles
Please look at Types section where there is link to the different types of ADC.
Movies
different types of ADC conversion principles
hard core about ADC not mandatory but interesting
for Arduino direct on the iron
Movies
hard core about ADC not mandatory but interesting
for Arduino direct on the iron
different types of ADC conversion principles
After today - you should (at least) be able to …
Understand temperature measurements by use of NTC
Understand ADC principles
Be able to implement a temperature measure device by a NTC and an Arduino
Understand quantification (8,9,10,.. bit resolutino)
Tips
|