• Initial design mistakes

    Holotype Robotics11/16/2023 at 05:28 0 comments

    When designing the servo, my initial approach was to drive it directly with PWM signals from the main robot controller board. However, after more consideration, I realized there were some benefits to instead using I2C communication to control the servo module:

    Firstly, I2C helps reduce the load on the main controller's GPIOs. With many components like sensors and displays also needing to interface with the main board, minimizing GPIO usage is beneficial. I2C's multidrop bus allows all servos to share just two signal lines.

    Secondly, having an integrated controller chip on the servo PCB enables more flexible control logic compared to direct PWMing. The controller can implement features like positional control, speed regulation, error handling, etc. Instead of outputting PWM pulses, the main board simply sends high level position or velocity commands over I2C.
    Likewise, the servo controller chip could be reprogrammed or swapped out to easily change the control algorithms. With the right firmware, the servo behavior can be optimized for different robots' needs. This modularity makes iterating and enhancing the servo module much easier.

    Finally, offloading the PWM generation and other motion control duties from the main processor to the servo controller frees up processing power. This lets the mainboard focus on higher-level behaviors rather than precision motor timing tasks.

    Unfortunately I had already orderd the PCBs, and will have to reorder an updated version, which will waste time, but that is just the game goes.

    In summary, utilizing a dedicated servo controller chip allows me to add features, optimize performance, save main processor resources, and design a more scalable, flexible robotic architecture. While direct PWM control is simpler, I2C unlocks more possibilities.