Todo
Tasks | Timeline | Comment | Progress |
---|---|---|---|
Design middle body | Draw in Fusion 360 | ||
Get development board circuit to work | Full duplex to half duplex | ||
Set up ROS |
Body
Frame v2 - current
Frame v1
Frame v1 is to unstable. The whole body warps as the frame is to thin and have open cutouts for the legs.
Components
- Batteries
- Configure BNO055
- Development board
- Dynamixel AX-12
- GPS
- Coral.ai - Dev Board Mini
- Other hardware
- Stereo Pi
- ReSpeaker 4-Mic Array for Raspberry Pi
- Husky lens
- Indoor location
Robotics
Artificial Intelligence
Articles
Inspiration
Books
- Handbook of PI and PID controller tuning rules (3rd edition)
- Model-Reference Robust Tuning of PID Controllers (Advances in Industrial Control)
- PID Control Fundamentals
- PID Controllers: Theory, Design, and Tuning
- Technician’s Guide to Programmable Controllers
BNO055
Intelligent 9-axis absolute orientation sensor.
The BNO055 can output the following sensor data:
- Absolute Orientation (Euler Vector, 100Hz) Three axis orientation data based on a 360° sphere
- Absolute Orientation (Quatenrion, 100Hz) Four point quaternion output for more accurate data manipulation
- Angular Velocity Vector (100Hz) Three axis of ‘rotation speed’ in rad/s
- Acceleration Vector (100Hz) Three axis of acceleration (gravity + linear motion) in m/s^2
- Magnetic Field Strength Vector (20Hz) Three axis of magnetic field sensing in micro Tesla (uT)
- Linear Acceleration Vector (100Hz) Three axis of linear acceleration data (acceleration minus gravity) in m/s^2
- Gravity Vector (100Hz) Three axis of gravitational acceleration (minus any movement) in m/s^2
- Temperature (1Hz) Ambient temperature in degrees celsius
Technical Details
- Dimensions: 20mm x 27mm x 4mm / 0.8" x 1.1" x 0.2"
- Header holes begin 4mm from the mounting holes
- Mounting Hole dimensions: 20mm x 12mm apart
- Uses I2C address 0x28 (default) or 0x29
- Weight: 3g
Pinouts
Power Pins
- VIN: 3.3-5.0V power supply input
- 3VO: 3.3V output from the on-board linear voltage regulator, you can grab up to about 50mA as necessary
- GND: The common/GND pin for power and logic
I2C Pins
- SCL - I2C clock pin, connect to your microcontrollers I2C clock line. This pin can be used with 3V or 5V logic, and there’s a 10K pullup on this pin.
- SDA - I2C data pin, connect to your microcontrollers I2C data line. This pin can be used with 3V or 5V logic, and there’s a 10K pullup on this pin.
Other Pins
- RST: Hardware reset pin. Set this pin low then high to cause a reset on the sensor. This pin is 5V safe.
- INT: The HW interrupt output pin, which can be configured to generate an interrupt signal when certain events occur like movement detected by the accelerometer, etc. (not currently supported in the Adafruit library, but the chip and HW is capable of generating this signal). The voltage level out is 3V
- ADR: Set this pin high to change the default I2C address for the BNO055 if you need to connect two ICs on the same I2C bus. The default address is 0x28. If this pin is connected to 3V, the address will be 0x29
- PS0 and PS1: These pins can be used to change the mode of the device (it can also do HID-I2C and UART) and also are provided in case Bosch provides a firmware update at some point for the ARM Cortex M0 MCU inside the sensor. They should normally be left unconnected.
Installation
i2c configuration
In order to use certain I2C sensors, such as the BNO055, you’ll need to enable I2C clock stretching ‘support’ by greatly slowing down the I2C clock on the Raspberry Pi using the device tree overlay.
Edit /boot/config.txt
Reboot the device
Check for i2c devices:
Create new project
Example data from sensor:
Notes
Merge accelerometer and GPS
- Accelerometer: High frequency, high accuracy
- Absolute North east and down
- acceleration: [ax ay az]
- gyroscope: [gx gy gz]
- magnetometer: [mx my mz]
- GPS: Low frequency, low accuracy
- Latitude, longitude and altitude
Accelerometer + GPS = predicted positions.
Kalman filter
- Predict(accelerometer)
- Update(GPS)
Key | What | Matrix | Comment |
---|---|---|---|
A | state transition matrix | ||
B | control matrix | ||
u | control vector | ||
Q | process variance | [o¹ 0 0 o²] |
https://en.wikipedia.org/wiki/Variance |
R | measurements variance | [o¹ 0 0 o²] |
|
Z | Actual measurement vector | [P V] |
Raw GPS readings |
Velocity readings are done using Doppler shift.
Pf = π + vΔt + ½ aΔt²
Vf = Vi + aΔt
Z = [PV] (GPS)
PID controller
- Arduino BNO055 PID Gyro sensor
- PID Control for multiple linear actuators
- An introduction and tutorial for PID controllers (PDF)
Documents
Videos
- How to Implement an Inertial Measurement Unit (IMU) Using an Accelerometer, Gyro, and Magnetometer
- How to Merge Accelerometer with GPS to Accurately Predict Position and Velocity
- Understanding Kalman Filters
Links
Battery
Battery pack made of 3 cells in series harvested from an old MacBook Pro that will provide 11.1v with (fill in capacity)mAh.
Weight
Each battery weighs around 85 grams.
For all three without cables and connections it’s about 258 grams.
Wiring
If each individual cell is rated for 3.7v @ 3000mAh and 20C discharge rate, the configuration above would result in a pack rated for 11.1v @ 3000mAh with a max discharge rate of 60 amps.
Tools
Buy batteries
Development board
Whoopsies
Molex pinout
Molex pin 1 (GND) and pin 3 (DATA) have switched place.
From robotis webpage:
WARNING: Check the pinout! The pinout of DYNAMIXEL can differ from the pinout of connector manufacturer.
BNO055
Connection pins are mounted mirrored, resulting in the breakout board for BNO055 is upside down.
Raspberry pi
The distance between the connectors on the raspberry pi and the development board are just a little more than two 2x40 female pins connector when using standard (fill in mm) standoffs. This results in bad connection. Resolution will be a 3D-printed standoff.
Raspberry Pi pinout
Diagnostics
Photos
Dynamixel AX-12A
DYNAMIXEL is a robot exclusive smart actuator with fully integrated DC Motor + Reduction Gearhead + Controller + Driver + Network in one DC servo module.
Specification
Item | Specification |
---|---|
Baud Rate | 7843 bps ~ 1 Mbps |
Resolution | 0.29 [°] |
Running Degree | 0 [°] ~ 300 [°] Endless Turn |
Weight | 53.5g(AX-12, AX-12+), 54.6g(AX-12A) |
Dimensions (W x H x D) | 32mm x 50mm x 40mm |
Gear Ratio | 254 : 1 |
Stall Torque | 1.5 N*m (at 12V, 1.5A) |
No Load Speed | 59rpm (at 12V) |
Operating Temperature | -5 [°C] ~ +70 [°C] |
Input Voltage | 9.0 ~ 12.0V (Recommended : 11.1V) |
Command Signal | Digital Packet |
Protocol Type | Half Duplex Asynchronous Serial Communication (8bit, 1stop, No Parity) |
Physical Connection | TTL Level Multi Drop Bus |
ID | 0 ~ 253 |
Feedback | Position, Temperature, Load, Input Voltage, etc |
Material | Engineering Plastic |
Wiring
Item | TTL |
---|---|
Pinout | 1 GND 2 VDD 3 DATA |
Diagram | |
Housing |
MOLEX 50-37-5033 |
PCB Header |
MOLEX 22-03-5035 |
Crimp Terminal | MOLEX 08-70-1039 |
Wire Gauge | 21 AWG |
TTL communications
To control the DYNAMIXEL actuators, the main controller needs to convert its UART signals to the half duplex type.
The recommended circuit diagram for this is shown below.
Dimensions
Screws: M2x04 or M2x06
Links
Raspberry pi
Set configuration parameters in /boot/config.txt:
Communications
More information about communication Protocol 1.0.
Instruction Packet is the command data sent to the Device.
Header1 | Header2 | ID | Length | Instruction | Param 1 | … | Param N | Checksum |
---|---|---|---|---|---|---|---|---|
0xFF | 0xFF | ID | Length | Instruction | Param 1 | … | Param N | CHKSUM |
Header
The field indicates the start of the Packet.
Packet ID
The field that indicates the ID of the Device that should receive the Instruction Packet and process it
- Range : 0 ~ 253 (0x00 ~ 0xFD), which is a total of 254 numbers that can be used.
- Broadcast ID : 254 (0xFE), which makes all connected devices execute the Instruction Packet.
Length
The length of the Packet(Instruction, Parameter, Checksum fields). Length = number of Parameters + 2
Instruction
The field that defines the type of instruction.
Value | Instructions | Description |
---|---|---|
0x01 | Ping | Instruction that checks whether the Packet has arrived to a device with the same ID as Packet ID |
0x02 | Read | Instruction to read data from the Device |
0x03 | Write | Instruction to write data on the Device |
0x04 | Reg Write | Instruction that registers the Instruction Packet to a standby status; Packet is later executed through the Action instruction |
0x05 | Action | Instruction that executes the Packet that was registered beforehand using Reg Write |
0x06 | Factory Reset | Instruction that resets the Control Table to its initial factory default settings |
0x08 | Reboot | Instruction that reboots DYNAMIXEL(See applied products in the description) |
0x83 | Sync Write | For multiple devices, Instruction to write data on the same Address with the same length at once |
0x92 | Bulk Read | For multiple devices, Instruction to write data on different Addresses with different lengths at once This command can only be used with MX series. |
Parameters
Parameters are used when additional data is required for an instruction.
Instruction Checksum
It is used to check if packet is damaged during communication. Instruction Checksum is calculated according to the following formula.
Instruction Checksum = ~( ID + Length + Instruction + Parameter1 + … Parameter N )
Where “~” is the Binary Ones Complement operator. When the calculation result of the parenthesis in the above formula is larger than 255 (0xFF), use only lower bytes.
For example, when you want to use below Instruction Packet,
ID=1(0x01), Length=5(0x05), Instruction=3(0x03), Parameter1=12(0x0C), Parameter2=100(0x64), Parameter3=170(0xAA)
Thus, Instruction Packet should be 0xFF, 0xFF, 0x01, 0x05, 0x03, 0x0C, 0x64, 0xAA, 0xDC
.
Sample code
Simple Move
The values are hardcoded to move Dynamixel 1:
- Execute an action (5),
- send 3 bytes of data,
- MOVE command(1E) and 2 positions(32 03) followed by the CRC (A3).
I needed a small sleep(0.1), the port.write takes more time and the output was already LOW.
Read ID
The ID is a unique value in the network to identify each DYNAMIXEL with an Instruction Packet. 0~252 (0xFC) values can be used as an ID, and 254(0xFE) is occupied as a broadcast ID. The Broadcast ID(254, 0xFE) can send an Instruction Packet to all connected DYNAMIXEL simultaneously.
hex | dec | Command | Comment |
---|---|---|---|
FF | 255 | Header | |
FF | 255 | Header2 | |
FE | 254 | To all ID’s | |
04 | 4 | Length | |
02 | 2 | 4 μsec | Status Packet for Return Delay Time(5). |
00 | 0 | Model Number | This address stores model number of DYNAMIXEL. |
03 | 3 | ID | Dynamixel ID |
F5 | CRC | Checksum |
GPS
Adafruit ultimate GPS breakout
- -165 dBm sensitivity, 10 Hz updates, 66 channels
- 5V friendly design and only 20mA current draw
- Breadboard friendly + two mounting holes
- RTC battery-compatible
- Built-in datalogging
- PPS output on fix
- Internal patch antenna + u.FL connector for external active antenna
- Fix status LED
Technical details
- Satellites: 22 tracking, 66 searching
- Patch Antenna Size: 15mm x 15mm x 4mm
- Update rate: 1 to 10 Hz
- Position Accuracy: < 3 meters (all GPS technology has about 3m accuracy)
- Velocity Accuracy: 0.1 meters/s
- Warm/cold start: 34 seconds
- Acquisition sensitivity: -145 dBm
- Tracking sensitivity: -165 dBm
- Maximum Velocity: 515m/s
- Vin range: 3.0-5.5VDC
- MTK3339 Operating current: 25mA tracking, 20 mA current draw during navigation
- Output: NMEA 0183, 9600 baud default, 3V logic level out, 5V-safe input
- DGPS/WAAS/EGNOS supported
- FCC E911 compliance and AGPS support (Offline mode : EPO valid up to 14 days )
- Up to 210 PRN channels
- Jammer detection and reduction
- Multi-path detection and compensation
Links
GPS antenna
Recommended GPS antenna
Links
Datasheets
Hardware
Compute alternatives
Jetson Nano
NVIDIA Jetson Nano enables the development of millions of new small, low-power AI systems. It opens new worlds of embedded IoT applications, including entry-level Network Video Recorders (NVRs), home robots, and intelligent gateways with full analytics capabilities.
Links
Raspberry Pi 4 - Model B
The speed and performance of the new Raspberry Pi 4 is a step up from earlier models. For the first time, we’ve built a complete desktop experience. Whether you’re editing documents, browsing the web with a bunch of tabs open, juggling spreadsheets or drafting a presentation, you’ll find the experience smooth and very recognisable — but on a smaller, more energy-efficient and much more cost-effective machine.
Links
Coral AI - Dev Board Mini
The Coral Dev Board Mini is a single-board computer that provides fast machine learning (ML) inferencing in a small form factor. It’s primarily designed as an evaluation device for the Accelerator Module (a surface-mounted module that provides the Edge TPU), but it’s also a fully-functional embedded system you can use for various on-device ML projects.
Links
Specs
CPU | MediaTek 8167s SoC (Quad-core Arm Cortex-A35) |
GPU | IMG PowerVR GE8300 (integrated in SoC) |
ML accelerator | Google Edge TPU coprocessor: 4 TOPS (int8); 2 TOPS per watt |
RAM | 2 GB LPDDR3 |
Flash memory | 8 GB eMMC |
Wireless | Wi-Fi 5 (802.11a/b/g/n/ac); Bluetooth 5.0 |
Audio/video | 3.5mm audio jack; digital PDM microphone; 2.54mm 2-pin speaker terminal; micro HDMI (1.4); 24-pin FFC connector for MIPI-CSI2 camera (4-lane); 24-pin FFC connector for MIPI-DSI display (4-lane) |
Input/output | 40-pin GPIO header; 2x USB Type-C (USB 2.0) |
Khadas EDGE - V
Links
Other hardware
Husky lens
HuskyLens is an easy-to-use AI machine vision sensor with 7 built-in functions: face recognition, object tracking, object recognition, line tracking, color recognition, tag recognition and object classification.
Through the UART / I2C port, HuskyLens can connect to Arduino and micro:bit to help you make very creative projects without playing with complex algorithms.
Links
ReSpeaker 4-Mic Array for Raspberry Pi
ReSpeaker 4-Mic Array for Raspberry Pi is a 4 microphone expansion board for Raspberry Pi designed for AI and voice applications. This means that you can build a more powerful and flexible voice product that integrates Amazon Alexa Voice Service, Google Assistant, and so on.
Links
- ReSpeaker 4-Mic Array for Raspberry Pi - seeedstudio.com
- ReSpeaker 4-Mic Array for Raspberry Pi - Wiki
Indoor location
I have many ESP32 microcontrollers spread around the house, that measures temperature and air quality. Since the EPS32 has BLE and WiFi interfaces I can add functionality to them to broadcast iBeacon signals which then I can read from the raspberry pi on the dog. I would like to experiment with this to see if I can get a rough idea of where the dog is in the house.
Three distances known
Links
Notes
Check out Levenberg-Marquardt algorithm Triangulate example for iBeacons - stackoverflow
ROS
Maximus AI
For termial conversations
AIML
- http://www.alicebot.org/aiml.html
- https://www.tutorialspoint.com/aiml/
- http://www.devdungeon.com/content/ai-chat-bot-python-aiml
- https://github.com/pandorabots/rosie/tree/master/lib/aiml
Unicode
hex: “\xf0\x9f\x90\xb6”
Artificial Intelligence
Words, spelling and so on
- https://market.mashape.com/wordsapi/wordsapi
- https://github.com/montanaflynn/Spellcheck-API/
- https://market.mashape.com/sentity/sentity-text-analytics
- https://market.mashape.com/aylien/text-analysis
- https://market.mashape.com/textanalysis/text-summarization
- https://www.meaningcloud.com/developer/
- https://market.mashape.com/faceplusplus/faceplusplus-face-detection
- http://developers.answers.com/
Grammar
- https://learnenglish.britishcouncil.org/en/
- https://github.com/markfullmer/grammark/tree/Version-3
- https://github.com/languagetool-org/languagetool (http://wiki.languagetool.org/public-http-api)
NLP / NER
-
Part-of-speech tagging (POS)
-
Chunking (CHK)
-
Name entity recognition (NER)
-
Download: http://nlp.stanford.edu/software/stanford-ner-2016-10-31.zip
-
https://github.com/agentile/PHP-Stanford-NLP (old) use patrickschur
-
https://packagist.org/packages/patrickschur/stanford-nlp-tagger
Intent parser
Object recognition (caffe)
Image analyze
Automatic speech recognition
Questions / answers
- https://github.com/TScottJ/OpenEphyra
- https://cs.umd.edu/~miyyer/qblearn/
- https://github.com/brmson/yodaqa
Lucida
Animations
OCR / Deep learning
Neural network (arduino)
Other Links
Inspiration
Read
videos
DyRET Robot
DyRET is a four legged (quadruped) robot designed to be a robust and versatile platform for evolutionary experiments with the unique capability of self-changing morphology. The robot runs on ROS, and uses Gazebo for simulated experiments.
Links
Open Cat
A programmable and highly maneuverable robotic cat for STEM education and AI-enhanced services.
Article
https://www.hackster.io/petoi/opencat-845129
Pet dog
A pet robot, just like Boston Dynamics makes
Articles
- https://hackaday.com/2019/03/30/a-pet-robot-just-like-boston-dynamics-makes/
- https://hackaday.io/project/164493-dizzy-wolf
MJBOTS Quad
The mjbots quad is a small dynamic quadruped, like the MIT mini-Cheetah, but fully open source licensed under the Apache 2.0 license. It is capable of dynamic motions like jumping and is relatively low cost.