Rotary encoder 600 steps
nRF52 Firmware
After the failure to use the qdec peripheral, fallback was on pio, interrupt, but that gives another advantage, the one of capturing timestamp on the nRF for every event, so that the log to the pc does not induce any speed signal distortion.
This is how the mqtt messages look like
jNodes/75/text {"ts": "597185480", "A": "1432", "B": "1428", "H": "1660"}
jNodes/75/text {"ts": "597191402", "A": "1432", "B": "1429", "H": "1661"}
jNodes/75/text {"ts": "597399004", "A": "1432", "B": "1430", "H": "1662"}
jNodes/75/text {"ts": "597406683", "A": "1431", "B": "1430", "H": "1661"}
jNodes/75/text {"ts": "597417026", "A": "1430", "B": "1429", "H": "1659"}
jNodes/75/text {"ts": "597424182", "A": "1429", "B": "1428", "H": "1657"}
Timesamped view of the motor position (angle step)
- Note that the firmware does not always report at the highest sampling rate, rather report on change, with a minimal cycle, then when no changes, keep a slow (1 sec) alive signal to show the user on the live graph that the position did not change.
- It is nice to see the data path, from the microcontroller that logs in rf, serial python to MQTT, then an MQTT browser client link it to plotly that can export the data to be shared on an iframe and embedded right here !
- actually iframes are filtered out from hackaday, so simply a screenshot and the interactive plot is availabe through the link : interactive plot
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.