I am building a 2 wheel balancing robot and my design has been heavily inspired by https://www.youtube.com/watch?v=fFwkQZr8wnQ
I am using the following components:
- 2x Pololu 30:1 Metal Gearmotor 37Dx68L mm 12V with 64 CPR Encoder
- 2x Pololu VNH5019 Motor Driver
- 2x Wild Thumper wheels
- Pololu Logic Level Shifter
- Arduino Nano 33 IoT microcontroller
- 3x 18650 batteries in serial
The Arduino Nano 33 IoT runs on 3.3V, and I was originally planning to use 3.3V as the logic level for everything in the robot. However, I noticed that the minimum Vcc for the motor encoder is 3.5V. I assume that this is accurate, and I assume that 3.5V would be too high for the input pins on the Nano.
The solution I have in mind is to use 5V as Vcc for the motor driver, then use the Pololu Logic Level Shifter to translate the 5V signal from the encoder to the 3.3V level for the Nano. I believe that the level shifter should be fast enough to handle the encoder signals. The encoder signals each have 16 pulses per revolution, and the motor maximum speed is 10,000 rpm skills. If my math is right, that equates to 160kHz, and the level shifter can handle 400kHz.
First question: Is there another solution besides the level shifter that I haven’t thought of? Second question: Is the logic level shifter fast enough for the encoder signals?