[arm-allstar] Analog inputs on BBB
David McGough
kb4fxc at inttek.net
Wed Jan 4 21:15:10 EST 2017
Hi Elliott,
All archlinux packages are built using package build scripts (PKGBUILD).
All these scripts can be found on github, in the
https://github.com/archlinuxarm/PKGBUILDs repository.
Here is a link to the commit tree for the 3.16.3-1 kernel release:
https://github.com/archlinuxarm/PKGBUILDs/tree/136aa8541efab5258509f2f5d7f2fabb2cf8da7c/core/linux-am33x
The actual kernel source, as referenced from the PKGBUILD file, is
available from kernel.org, at the URL:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.16.3.tar.xz
You don't really need the cape manager functionality. The cape manager
just allows you to change the device tree configuration at run-time. While
this is convenient, you can easily modify the device tree configuration
which gets installed at boot time. This just means you've got to reboot
after each device tree change. But, once you've got a stable
configuration, it'll just get loaded at each system boot, which is
probably the desired situation anyhow.
As for compiling a modified device tree, try the "dtc" command. I believe
any required kernel headers, etc., are already included in our firmware
release. I have compiled custom device trees in the past, when I was
first experimenting with BBB GPIO and other peripherals.
I'll mention that I abandoned playing with the GPIO and other peripherals
on the BBB---these boards are fragile and on-board power management is
marginal, IMO. By this, I mean relatively tiny power surges will cause
CPU lock-ups and/or reboots. And, these boards don't like close by RF! Not
even an HT!
Another issue with upgrading the kernel on the BBB is persuading the
u-boot code installed in the on-board eMMC memory to play nicely. I
cobbled custom hacks the get our firmware image to run from the SD card
without having to change the eMMC code. This involved several sessions of
serious embedded firmware hacking.
Anyhow, changing subjects, the Arduino Nano boards have trivial-to-use ADC
inputs. While only 10-bits of resolution vs. 12-bits on the BBB, this
should adequate for many applications--for example, I'm currently using
for forward/reflected power monitoring, etc. More info:
http://www.ebay.com/sch/i.html?_nkw=nano+ch340
https://www.arduino.cc/en/Reference/analogRead
https://www.google.com/#q=arduino+nano+swr+meter
At the price point for the Nano, combined with reusable functionality
(i.e.: they'll work with anything that has a USB port), they're hard to
beat!
73, David KB4FXC
On Wed, 4 Jan 2017, "Elliott L via arm-allstar" wrote:
> Hi Doug and All,
>
> Do you know where I can find the kernel source that was used
> for 3.16.3-1-ARCH? This is needed before the device tree can be rebuilt
> (the github code you uncovered -- very applicable -- does not cover
> releases prior to 3.19.x). I can't find the headers or source anywhere for
> this arch-specific kernel build. My knowledge of arch linux and the whole
> rolling-release scheme is very limited, so any input would be great. I
> would guess you ran into this compiling the DAHDI against the current
> kernel?
>
> Thanks again,
>
> --E
>
> On Mon, Jan 2, 2017 at 10:16 PM, Elliott L <kilocharlie8 at gmail.com> wrote:
>
> > Hi Doug,
> >
> > Thank you for your quick reply!
> >
> > I am going to try what is suggested in that link -- it sounds exactly
> > right. I will try the reboot after I make another backup.
> >
> > With regards to the input level, this particular circuit cannot create
> > more than about 0.770 volts, so I think there is a reasonable expectation
> > of not exceeding the headroom. But I'll pick up a zener if I see one.
> >
> > The USB solution is probably better since it would work on any computer,
> > in particular a RPi, which will be an upgrade I make in the near future.
> >
> > Thanks again for your continued support on Allstar,
> >
> > --E
> >
> > On Mon, Jan 2, 2017 at 7:42 PM, "Doug Crompton via arm-allstar" <
> > arm-allstar at hamvoip.org> wrote:
> >
> >> Elliott,
> >>
> >> First of you may already know this but let me warn you that the ADC pins
> >> are max 1.8 volts on the BBB. So you need to scale anything down and make
> >> sure it does not exceed that. A zener and series resistor would be a good
> >> idea for protection.
> >>
> >> The later kernels abandoned or changed the cape manager. I don't remember
> >> exactly at what point that happened but Dave would know. Here is a link to
> >> some info that might help. If you do need to upgrade and recompile you
> >> could experiment on an SD card copy of what you have so you can go back.
> >>
> >> https://gist.github.com/matthewmcneely/bf44655c74096ff96475
> >>
> >> As a side not the Arduino boards (nano) have ADC inputs and could be used
> >> to read analog voltages. This would be done via USB and would be
> >> independent of the processor board. This might be a better approach should
> >> the BBB method not work out. The BBB is becoming an unsupported board and
> >> it is not clear how long there will be updates for it.
> >>
> >>
> >>
> >> *73 Doug*
> >>
> >> *WA3DSP*
> >>
> >> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
> >>
> >> On Mon, Jan 2, 2017 at 8:31 PM, "Elliott L via arm-allstar" <
> >> arm-allstar at hamvoip.org> wrote:
> >>
> >> > Hi All,
> >> >
> >> > Does anyone know how to access the analog inputs on the beagle bone
> >> black
> >> > using the Ham VoIP release with kernel 3.16? I do not see any of the
> >> usual
> >> > entries in /sys for the analog pins. I do see something for the GPIO
> >> pins
> >> > in /sys/class/gpio/ which looks functional, but not analog.
> >> >
> >> > I have wired the first analog input pin of the BBB's header to the IF
> >> > amplifier in my GE MSTR Exec II receiver, and I am hoping to be able to
> >> > report signal levels over the air by reading out the voltage. I remember
> >> > some repeaters having this capability "back in the day" using expensive
> >> > computerized controllers. Should be a piece of cake with a real computer
> >> > available.
> >> >
> >> > I know these ADCs are pretty low quality but I think for low-precision
> >> DC
> >> > measurements they should be sufficient.
> >> >
> >> > Any help before I start upgrading packages and breaking stuff would be
> >> > greatly appreciated ;-) Once I get the script working I will share it
> >> here.
> >> >
> >> > Happy New Year all,
> >> >
> >> > --Elliott, W6EL
> >> > _______________________________________________
> >> >
> >> > arm-allstar mailing list
> >> > arm-allstar at hamvoip.org
> >> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >> >
> >> > Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >> >
> >> >
> >> _______________________________________________
> >>
> >> arm-allstar mailing list
> >> arm-allstar at hamvoip.org
> >> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >>
> >> Visit the BBB and RPi2/3 web page - http://hamvoip.org
> >>
> >
> >
> _______________________________________________
>
> arm-allstar mailing list
> arm-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
More information about the arm-allstar
mailing list