A Host Of Sensors And Arm 0 on a Serial port
This is a USB MultiPort I dongle that looks like a serial port to many host operating systems. The serial port connects to an Arm 070 processor on the dongle using a simple serial protocol. An Arm processor operates an Accelerometer/Gyro and Magnometer as well as analog or GPIO ports.
The USB MultiPort I is designed as the lowest cost board in this series of devices. There is now as of March 2019 a USB Multi-Port II which adds 4 PWM ports for servo control.
The MultiPort I board is 20mm x 37mm before the USB jack sticks out farther as shown. The USB jack is intentially offset so that plugging this into an end slot of a Raspberry Pi set of USB jacks does not block the other USB on the other side. All parts are on the top.
The idea here is to get a lot of very common robotic hardware IO to be accessable by simple connection to a serial port. The CP2012 is common these days so it takes care of the USB to serial and then talks to the Arm STM32F070 M0 processor.
The Details Are Below For Those Who Are Curious
The 3D accelerometer/gyro device is the LSM6DS3 and is controled from the onboard M0 spi bus. This is a very popular and low cost accelerometer that in my studies has shown itself to be very low noise relative to a host of other devices. With the onboard M0 my thoughts are the processor would take care of masaging the accel/gyro data as seen fit for what the host requires for the positioning system in use.
The Magnotometer is the LIS3MDLTR which is a 3D magnometer and is also on the SPI bus for fast, reliable access.
The use of the USB to serial CP2102 allows USB to work for situations like bootloader and also offloads a lot of USB firmware as well as frees up some pins on the M0. The CP2102 also is key in that it supplies the processor and sensors with 3.3V from the USB 5 so I like it.
By not loading a resistor you can use this board as a basic RX,TX serial port to 3.3V too.
A ROS node has been written that at this time accesses two analog readings in order to implement an analog joystick or other set of signals to be published to ROS topic /cmd_vel or to /joy. Since this ROS node may be of use for MANY other situations I have placed it on my
Note that this ROS node could be used for all sorts of other things but at this time it is a simple python ROS node so is easily convertable for other uses others dream up.
A tiny 6-pin jack supplies full ST-LINK connectivity so I can debug in my eclipse environment using openOCD and can also do firmware download with ST-Link tools.
It would be possible to place the board into firmware download over serial mode but for this a wire has to go to the BOOT0 line and a switch attached so that is not fully automated over USB at this time using lines of the CP2102 such as DTR and RTS. Maybe some other PCB rev.
At this time a very simple onboard monitor that is accessable using console with it's own commands and return formats is onboard in the firmware. Normally for such things I use a protocol with a checksum and so on but because USB is in use the 'physical link' is very sound so I have kept the protocol extremely simple with only a few basic checks since the serial chip is under 1cm and on the same board as the processor.
I am excited about this latest Mark-Toys board as the uses extend well beyond robotics and a simple serial protocol make it highly accessable for many uses. There are commands to read 3D accel, gyro, magnometer or ADC values and commands to turn on repeated reports for these for debug as of Feb 2019.
To the right a custom 3D printed case I made holds the USB multi-function dongle. The case is offset so on one side you can still install other USB dongles or cables into the Raspberry Pi. It is thin to allow another USB device to plug in below or above.
USB MultiPort Serial Commands
Version 20190507 (PWM is only available on MultiPort II)
All commands and all replies are ASCII where values are decimal ASCII representation.
All Commands are case insensitive, start with ':' and a mnumonic/value and end in ';' or a return.
:R Show revision and board type string
:A Return accelerometer readings in X,Y,Z as signed 16bit decimal values separated by commas. 1G=16768
readings in X,Y,Z as signed 16bit decimal values separated by commas
readings in X,Y,Z as signed decimal values separated by commas
:V Returns all ADC readings in signed decimal form separated by comma. 1.0V=1220 counts
:V0 Returns voltage on A0 as a positive decimal value. Use of v1,v2,v3 for other analog lines
:P1 000 Set PWM port to a percent of range defined by :PL and :PH. Value is in 10th of percent
P2,P3,P4 also work. 000 = 0% of range set by PL and 999 = 99.9% of range set by PH
PWM only of use on MultiPort II which has 4 PWM
jacks labeled SV1,SV2,SV3, SV4
By default PL and PH are set to 5 to 15 % true duty cycle corresponding to 000 to 999 in the :
:PL 000 Set PWM lower true % duty cycle value in 10th of percent.
Set to 205 for 0.0% in a
set setting 20.5% real duty cycle
:PH 000 Set PWM upper true % duty cycle value in 10th of percent.
Set to 415 for 100% in a
set setting 41.5% real duty cycle
:DA Continuously send accelerometer X,Y,Z every second or so
:DG Continuously send
X,Y,Z every second or so
:DM Continuously send
X,Y,Z every second or so
:DV Continuously send all voltages every second or so
Mark-World - Tech Projects To Amuse The Curious