Date
1 - 13 of 13
DRAWS GPIO/Accessory connector #draws #accessory #adc
I'm not one much for understanding schematics, but I'm trying to figure out on the accessory connector you have an Ain2 and an Ain3. Are those auxiliary inputs, or analog inputs? I'm looking for an analog input so that I can monitor external battery voltage. And I'm not sure if the board has an ADC built into it or if I have to connect one externally.
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? Thank you, Ryan K1BLU
|
|
On Sun, Dec 16, 2018, 08:04 Ryan Reid <blupanthr2@... wrote: I'm not one much for understanding schematics, but I'm trying to figure out on the accessory connector you have an Ain2 and an Ain3. Are those auxiliary inputs, or analog inputs? I'm looking for an analog input so that I can monitor external battery voltage. And I'm not sure if the board has an ADC built into it or if I have to connect one externally. If you are monitoring the supply voltage, that is already handled on the 9-15 VDC input for powering the HAT (and Pi). There is also a second ADC exposed on the accessory jack.
Those are for a serial port, it is /dev/ttySC1. The ttySC0 is to the GPS.
|
|
|
|
Annaliese McDermond
On Dec 16, 2018, at 3:18 AM, Ryan Reid <blupanthr2@gmail.com> 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: ads1015-i2c-1-48 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. Thank you, -- Annaliese McDermond, J.D. (NH6Z) nh6z@nh6z.net
|
|
Thank you all!! Just what I was looking for. Ryan K1BLU
On Sun, Dec 16, 2018, 09:32 Annaliese McDermond <nh6z@... wrote:
|
|
Maybe I'm missing something, but Sensors is not seeing it...
toggle quoted messageShow quoted text
The hat is installed, and connected through the +12v Input.
|
|
Answered my own question... forgot to change dtoverlay from udrc to draws.
|
|
Try the command sensors Instead of sensors-detect
On Mon, Dec 17, 2018 at 2:50 PM Ryan Reid <blupanthr2@...> wrote: Maybe I'm missing something, but Sensors is not seeing it...
|
|
Answered my own question... forgot to change dtoverlayfrom udrc to draws.If you use the current beta image for draws the dtoverlay is set up properly. http://nwdig.net/downloads/ /Basil
|
|
Is there a changelog between the beta image, and modifying the last Compass release? Wondering if it is worth overwriting any settings/other modifications I have done so far. Ryan K1BLU
On Mon, Dec 17, 2018 at 4:44 PM Basil Gunn <basil@...> wrote:
|
|
I can't seem to get the sensor readings to work. says" command not found". tried that and lm-sensors command as well, same thing. Do I need to install something? What am I missing? I'm using this version of compass: Linux compass 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
debian_version 9.6 This is I think the first beta image released. Also, what is the range of the ADC's? I would like to read two 0-5VDC signals from my SWR bridge from Kits and Parts. Are the inputs isolated?
|
|
sudo apt-get install lm-sensors sensors
On Wed, Dec 19, 2018, 08:42 KB5ZUR <kb5zur@... wrote:
|
|
All about the Ain inputs on the accessory connector.
Each input connects to a Pi IO Pin and an ADC input. Clearly you can’t use both. There is also an ESD protection diode and 33ohm series resistor to reduce the chance of damaging the input. To use the ADC set the corresponding GPIO to input with pulldown. The max input is 3.3V so use a resistor divider above that voltage. The PS Input is scaled with 48.7k and 10.0k 1% this gives a range of: 0-19.7V The actual installed ADC is a TI I2C 4CH 12Bit Device It is SW compatible with the ads1015 with a few less features. Datasheet: The resistor values are set into SW so the sensor command displays the voltage correctly. pi@compass:~ $ sensors ads1015-i2c-1-48 Adapter: bcm2835 I2C adapter User ADC Differential: +0.00 V +12V: +13.77 V User ADC 1: +0.00 V User ADC 2: +0.00 V If you put 10.0k and 10.0k in your signal path, you can read sensors and multiply User ADC by 2. It is possible, but not trivial, to change the file so it reads directly with your values. This will be documented in a future APP Note. Bryan K7UDR
|
|