I want to build a eight to ten channel MOSFET switching module to control
lighting and other accessories in a four wheel drive. The module would be
located in the rear tub/canopy area of a ute/pick-up. I want to control the
switching via a Touch screen mounted on the dashboard within reach of the
driver. I would also like the switching module to have connection for
two-to-four analog input channels in the future.
I want the touchscreen physically "wired" to the switching module; HDMI?
And when as my skills grow I would like to get a BlueTooth App to control
the switching via a smarts phone.
I don't think HDMI alone will support a touch screen. It may require
USB in parallel to send "mouse" movement (absolute coordinates of some
type). At least, I've not encountered an HDMI system that receives such
(and the HDMI on the Beagle may be display only). You are also looking at
running X-Window, which might require using an LXQT OS image -- or you have
to do a lot of low-level graphics programming to send data to the display.
BlueTooth will require an add-on (USB, most likely) module unless
you've chosen a Beagle with built-in WiFi/BT. cf:
After some research a BeagleBone looks, to me to be the best option as it
has low power consumption.
Am I heading in the right direction and which BeagleBone should I use?
Take into account that all of these Linux based embedded systems do NOT
LIKE having the power pulled on them. You have to issue a shutdown command
to the OS and wait for the system to complete clean shutdown -- if you just
cut the power you run the risk of corrupting the file system (on eMMC or
uSD card). You can mitigate the risk some by configuring the system to use
RAM-disk for temporary files (like logs) and setting the eMMC/uSD to be a
read-only file system -- but if you need to examine the logs, you have to
do it before cutting power as the logs are lost on power down.
Would I be taking the best approach by sourcing the BB and the Touchscreen
and then building the graphics and getting the programming right to carry
out the output switching and recieveing the inputs (all via breadboard and
simple LED etc) before moving to connection to the MOSFET output and
analog input boards?
What programming language should I be looking at using?
Well... start with: what languages are you comfortable using? Do they
have GPIO support libraries, or will you have to code low-level I/O
operations (Note: while still there, the "sysfs" GPIO access is being
deprecated for a GPIO char-device and IOCTL calls).
Have you considered if something like an Arduino (one of the ARM-based
models, as they tend to have more RAM/FLASH than the AVR... Though the Due
appears to be out-of-stock. The ARM Due is 512kB flash, 96kB RAM; AVR
Mega2560 256kB flash [including the 8kB bootloader], 8kB RAM). Adafruit
Metro M4 (ARM, 512kB Flash, 192kB RAM https://www.adafruit.com/product/3382
). Take into account (I use that phrase too often, I think) that on these
microcontroller boards, the RAM is only used for run-time variable storage
-- code runs directly out of Flash (whereas the Linux boards use Flash as a
"disk drive" with a file system, and have to load the OS and application
into RAM before running them).
The Metro cards are targeted at a version of Python (CircuitPython) but
can have an Arduino type run-time installed. Arduino is technically C++,
but most of that is hidden in the libraries.
Even if you use a Beagle for the display, I think I'd suggest a
microcontroller for the actual switching system, and run a USB-serial
connection between display/Beagle (on dash) and controller/switching in the
back. Define some command system, so controller basically reads commands on
serial and sets the switches as needed. Arduino firmata library may be a
starting point https://github.com/firmata/protocol
I know, I've tossed out a lot of blasphemous (non-Beagle) options.
Using SPI or I2C reduces the number of pins needed (not an HDMI display, so
you won't be running X-Window -- Beagle with IoT or Console OS image may
suffice, but you would have to write the graphics library; Adafruit
libraries are for Arduino and CircuitPython).