On Dec 16, 2018, at 3:18 AM, Ryan Reid <firstname.lastname@example.org> wrote:The DRAWS has an ADC built into it. You are correct that those are brought out on pins “Ain2” and “Ain3”. You can access the values of these in a variety of ways through the lmsensors/hwmon (see https://github.com/lm-sensors/lm-sensors) subsystem in linux. If you type “sensors” on a running system, you’ll get something that looks like this:
Adapter: bcm2835 I2C adapter
User ADC Differential: +0.00 V
+12V: +12.02 V
User ADC 1: +0.01 V
User ADC 2: +0.00 V
The “+12V” input is hooked to the DC input of the DRAWS. You can do various scaling on the User ADC values by using the sensors configuration file for DRAWS located at /etc/sensors.d/draws.
Note that there are also some scaling factors available as “dtparam” settings in config.txt.
These pins are also connected to pins 22 and 24 on the Broadcom SoC for doing digital inputs or outputs. Incidentally these are the “BCM” pin numbers. You’ll *never* hear me referring to wiringPi’s pin numberings.
I’ll let Bryan speak to the electrical characteristics of these pins, but I’m sure that if you try to measure a few thousand volts on them you’ll have a bad day.
Also I noticed on there that one of the pins is labeled rx and one is labeled tx. Do those forward through to the serial port on the raspberry pi, or are they for something else?They do not connect to the /dev/ttyAMA0 port on the Pi. We don’t bring that out on draws. They connect to an additional serial port, /dev/ttySC1, which is on the I2C serial chip we use to access the GPS.
Annaliese McDermond, J.D. (NH6Z)