Compatible with firmware that counts wheel rotation for left and right wheels with wheel encoder.
How to add the Wheel Encoder Counter robot skill
- Load the most recent release of ARC (Get ARC).
- Press the Project tab from the top menu bar in ARC.
- Press Add Robot Skill from the button ribbon bar in ARC.
- Choose the Navigation category tab.
- Press the Wheel Encoder Counter icon to add the robot skill to your project.
Don't have a robot yet?
Follow the Getting Started Guide to build a robot and use the Wheel Encoder Counter robot skill.
How to use the Wheel Encoder Counter robot skill
This skill is compatible with Arduino UNO firmware that counts wheel rotation for left and right wheels.Firmware
This robot skill requires supporting capability on the EZB with firmware. The firmware is open-source so that you can modify it for different Arduino's and microcontrollers. The Wheel Encoder Arduino UNO firmware can be found here: https://synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
Main Window

1. Get Wheel Values Button
Manually requests the encoder values for each wheel. Please do not use it when pushing to NMS because this is done automatically with an interval timer.
2. Reset Values Button
Resets the encoder values back to zero. Please do not use it when pushing to NMS because it will break the current pose.
3. Get Wheel Values & Reset Button
Resets the encoder values back to zero then starts acquiring the encoder values again. Please do not use it when pushing to NMS because this will break the pose.
4. Status Display
When the debug checkbox is checked, this will display a text readout of the encoder values.
Configuration
Settings - General

1) Poll Interval
How often to poll the wheel encoder values from the Arduino.
2) Display debug information
This will display the wheel encoder values to the log file for debugging in real-time.
Settings - NMS

1) Push to NMS
Enabling this checkbox will push the data to the NMS as a Level 3 Group 2 sensor. This updates the pose telemetry of the robot's positioning.
2) Encoder ticks per wheel revolution
How many encoder ticks for one revolution of the wheel. This is used for the NMS pose calculation.
3) Wheel diameter (mm)
The diameter of the wheel is in millimeters. This is used for the NMS pose calculation.
4) Pivot diameter (mm)
The distance between centers of wheel treads. This is used for the NMS pose calculation.
NMS

The Navigation Messaging System (NMS) is built into the ARC framework. It allows skills to push data (location & obstacle detection) into the messaging system. Then, mapping/navigation SLAM skills can subscribe to the navigation events. The NMS was designed to provide transparent Navigation to the user in ARC. You do not have to write any complicated code because the robot skills will work for navigation and obstacle avoidance.
How to Use Wheel Encoder Counter
1) Download the Arduino firmware onto a UNO (or edit for your Arduino version). The Wheel Encoder Arduino UNO firmware can be found here: https://synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
2) Connect your wheel encoders to port D2 (left wheel) and D3 (right wheel) on the UNO.
3) Add the Wheel Encoder Counter Skill (Project -> Add Skill -> Navigation -> Wheel Encoder Counter). Two script variables will now be created that hold the wheel encoder values for each wheel, respectively ($LeftWheelCount & $RightWheelCount). Or, you can enable the NMS checkbox in the configuration settings to push the pose to NMS as a Level 3 Group 1 sensor.
4) Connect the UNO to ARC.
Video
Resources
The Wheel Encoder Arduino UNO firmware can be found here: synthiam.com/Docs/Hardware/Arduino-Genuino-Uno
There are ControlCommand() to reset the $LeftWheelCount & $RightWheelCount values, or force get the values on demand rather than automatic on a timer. Do not reset or manually poll the wheel count using the NMS because it will affect the current pose data.
You can see how this skill was created by watching the live hack event here: synthiam.com/HackEvent/Dj-s-5th-Live-Hack-Session-17578
Related Hack Events
Related Questions
question

Arduino EZB Firmware To ARC Communication
I am trying to make a plugin. How can I send a non int number from arduino firmware to ARC plugin? For example, if I...
question

What Is Really Needed For Indoor Navigation?
I have read about many ways to develop Indoor Navigation. The Hardware recommended varies from an IPS system to a Lidar...
Upgrade to ARC Pro
Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.
I believe ToyMaker and Dave were discussing it.
Toymaker had motors with 64000 clicks for just one wheel revolution.
How many clicks per/revolution do you think a Arduino can handle?
If this makes any sense.
To see how i made the firmware and plugin, watch this live hack event here: https://synthiam.com/HackEvent/Dj-s-5th-Live-Hack-Session-17578
I have no experience encoders.
Motor add:
This gear motor is a powerful 12V brushed DC motor with a 131.25:1 metal gearbox and an integrated quadrature encoder that provides a resolution of 64 counts per revolution of the motor shaft, which corresponds to 8400 counts per revolution of the gearbox’s output shaft.
Since the encoder is on the back of the motor shaft does it only read the 64 counts per revolution?
How can you tell, with accuracy what the counts per revolution is at the gearbox's output shaft?
Hope this is clear?
BUT (lol)
The encoder reads the main shaft rotation (at rear) not the output shaft rotation.
How does the encoder know where, lets say, count/click 8399 is at?
Does this make sense?
Are you asking to use a encoded motor as a servo?
Because an encoded motor is designed for odometry.. just like your car. To count the number of wheel rotations so you can increase the confidence of how far your robot has traveled for navigation purposes.
You said "To count the number of wheel rotations so you can increase the confidence of how far your robot has traveled for navigation purposes."
So as I understand, if it counts the number of clicks, say 32, we know that the motor has turned half way around.
Then why would I care anything about 8400 COUNTS at the OUTPUT shaft?
It seems to me the only important number here is the counts per rotation of the rear shaft.
MMMM I'm starting to even confuse myself here ... lol.
If your wheel radius of your wheel is 10cm, then 8400 counts would be 10 cm of travel.
16800 counts would be 20cm of travel