Skip to content

Latest commit

 

History

History
35 lines (31 loc) · 1.82 KB

EV3-A-to-D-Converter.md

File metadata and controls

35 lines (31 loc) · 1.82 KB

The EV3 uses a Texas Instruments ADS7957 chip. It is connected to the CPU via an [SPI](EV3 SPI).

##Essentials

  • 16 channels
  • 10-bit resolution
  • 20kHz max clock rate
  • Using the 5V input mode (i.e. 1024 == 5.00V)

##Documentation

##Channel Usage

Ch.ConnectionNotes
0Output port B pin 5
1Output port A pin 5
2N/CWas battery temperature on pre-release hardware
3Battery currentUses 0.05Ω shunt resistor, value read is 15x actual voltage
4Battery voltageValue read is 1/2 actual voltage
5Input port 1 pin 6
6Input port 1 pin 1
7Input port 2 pin 6
8Input port 2 pin 1
9Input port 3 pin 6
10Input port 3 pin 1
11Input port 4 pin 6
12Input port 4 pin 1
13Output port C pin 5
14Output port D pin 5
15N/CWas motor current on pre-release hardware

##Notes

  • In lsm2012, you will see scaling of the value read from the ADC by 4096 (12-bits) instead of by 1024 (10-bits). This is because they are not shifting the value read to the right 2 bits. Since this is a 10-bit chip, the 2 least significant bits read will always be 0.
  • A TI employee wrote a hwmon driver for the ADS7957 (source) which is used by lm-sensors. This interface is generally for low-speed (on the order of 1Hz) polling of fan speeds, temperatures, voltages, etc. This does not really fit our needs for ev3dev, so we borrowed some code and wrote our own driver.