# Joint Encoders using I2C ports

**URL:** <https://opensourceleg.discourse.group/t/joint-encoders-using-i2c-ports/150>\
**Category:** Electronics\
**Created:** [November 6, 2025, 8:18pm UTC](https://opensourceleg.discourse.group/t/joint-encoders-using-i2c-ports/150 "2025-11-06T20:18:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anushkarathi](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@anushkarathi](https://opensourceleg.discourse.group/u/anushkarathi)\
**Post date:** [November 6, 2025, 8:18pm UTC](https://opensourceleg.discourse.group/t/joint-encoders-using-i2c-ports/150/1 "2025-11-06T20:18:29Z")

</div>

hey everyone!

I ran into an issue when using the electronics interface board with the neurobionics image where the joint encoders were updating slowly and dragging down the control loop (at a set frequency of 300 Hz). After some debugging, I realized the I²C buses that the encoders use did not have a baud rate set, so they were running at the default (slow) speed.

I opened a PR in `robot-ci` repo so this should be fixed soon. But in the meantime, if you’re using the interface board and your encoders seem slow or are lagging, here’s how you can fix it manually

1. find your config.txt file (boot/firmware/config.txt)
2. under the i2c settings which look like: _dtparam=i2c\_arm=on dtoverlay=i2c2-pi5,pins\_12\_13 dtoverlay=i2c3-pi5,pins\_14\_15_

\*\* add this:\*\*

_dtparam=i2c\_arm=on, i2c\_arm\_baudrate=400000 dtoverlay=i2c2-pi5,pins\_12\_13, baudrate=400000 dtoverlay=i2c3-pi5,pins\_14\_15, baudrate=400000_

did anyone else encounter this?

---

<div class="post-metadata">

**Author:** ![Sani\_Hasan](https://yyz2.discourse-cdn.com/flex036/user_avatar/opensourceleg.discourse.group/sani_hasan/32/56_2.png) [@Sani\_Hasan](https://opensourceleg.discourse.group/u/Sani_Hasan)\
**Post date:** [November 10, 2025, 4:57pm UTC](https://opensourceleg.discourse.group/t/joint-encoders-using-i2c-ports/150/2 "2025-11-10T16:57:26Z")

</div>

Yeah, I did encounter it 2 days ago but in a different manner, was running a logger on an encoder with live plots and there were repeated peaks in the plots, makes sense now that this is what was causing the lag and the peaks as a result.
