Tag: Teensy

  • Levelconverter

    Levelconverter

    In my last article, I wrote about using an MD04 motor driver for my motors. In the example, I used an Arduino Uno to test the motor drivers and made the code work. I want to use the Teensy 4.1 in my robot because of the board’s multiple serial connections and its higher speed. The Teensy runs on 3.3 Volt instead of the 5V Arduino uses. I could not find the voltage level for the I2C wiring in the documentation. According to the manual, the serial communication and the analog input use 5V, so I assume the SCL and SDA are the same.

    To overcome the voltage differences, I used a level converter. A level converter is a small board with a low and a high-level side. A MOSFET and other components on this board compensate for the voltage difference between the two sides. Connect the low-level side (LV) to the Teensy and the high-level side (HV) to the MD03. The image below shows how I wired the Teensy, the motor driver, and the level converter.

    I used a USB breakout board to provide the 5 volts to the high side of the level converter. The low side of the level converter gets its power from the Teensy. I used two pull-up resistors on both sides of the level converter (10K). Technical, the connections remained the same. We used the standard I2C pins, so the software stayed the same. You can use the code example from the previous article.

    Supplies

    Level Converter
    Buy at AliExpress
    Buy at Amazon
    Make sure you get the Bi-Directional version to use it with I2C.

  • Starting over

    Starting over

    My A1 robot is a robot based on a wheelchair. The robot’s purpose was to do telepresence. I built this thing 12 years ago and is collecting dust since then. I could not make it work at that time because of the lack of affordable technology, software possibilities, and my skillset.

    A lot has changed now. The widely available electronics and the amount of cheap computer power give much more functionality out of the box. I want the robot to be a platform capable of driving around autonomy and doing image-recognizing tasks like detecting garbage and faces.

    The old electronics on this robot, like an Intel Mini ITX D945GSEJT and a servo driver, had to go. I ripped the electronics to make room for new components. I have already replaced the pulverized old tyers. The plan is to reuse the wheelchair base, motors, and motor drivers (MD03 from Devantech). The 24 Volt power supply is also staying for testing now. A Teensy 4.1 will do the low-level control, like handling the motor drivers and reading sensor data. This controller has many inputs and outputs and serial, SPI, CAN, and I2C ports.

    I haven’t decided what single-board computer I will use to do higher-level control. A prominent candidate is the NVIDIA Jetson Nano or better. It’s hard to get one because of a chip shortage. Another option is to use one or more Raspberry Pi boards and connect them with ethernet. The Teensy will use a serial connection to transfer data between a Raspberry Pi or the Jetson. This configuration makes it possible to build a modular system and allows swapping components when better components are available.

    The first task is to make the robot drive remote-controlled. I build a remote control for this with a Bluetooth module. There will also be a Bluetooth module connected to the Teensy on the robot. The motor drivers will be connected through I2C, making it possible to read data from the driver like current use and temperature.