dS1242
dS1242 User Manual v4.10
Temperatue sensor
There is an on-board temperature sensor (MCP9700A) which provides a 10mV/°C output on a
500mV offset (0°C = 500mV, 1°C = 510mV). This is accessed as analogue channel 100. The
sensor is located between the Ethernet connector and the edge of the PCB just above the
mounting hole.
analogport TS1 100 ; on-board temp sensor
int32 BrdTemp
BrdTemp = ((TS1*3223)-500000)/10000
This will give you the approximate temperature in °C.
Power supply input voltage
A simple resistive divider on analogue channel 101 is used to measure the 12v input voltage.
analogport PSU 101 ; DC power voltage
int32 Volts
Volts = PSU*18369/100000 ; calc input voltage.
This will give you volts*10. So 119 = 11.9v, 120 is 12.0v
Analogue channels
1 Analog1
2 Analog2
100 Temperature
101 Voltage
All 10-bit resolution, using CPU 3.3v supply as reference.
Copyright © 2016-2021, Devantech Ltd.
All rights reserved.
www.robot-electronics.co.uk
60