Building the robot - NTheuws/linorobot2_software GitHub Wiki
Since every robot will be built using different hardware, it's impossible to create a step by step guide on how to wire up the robot from start to finish. As a way to help out with this process anyway, there will be examples available which use optional components. In case you're using the same parts, it'll be easier to follow these examples. If this isn't the case, find a datasheet of the hardware component(s) and compare it to the examples provided. This way it'll be easier to spot the differences and solve it.
There are connection diagrams available that provide examples on how to connect the motor drivers for each variant. They are available in the useful diagrams. For simplicity, only one motor connection is provided but the same diagram can be used to connect the rest of the motors. You are free to decide which microcontroller pin to use just ensure that the following are met:
- Reserve SCL0 and SDA0 (pins 18 and 19 on Teensy boards) for IMU.
- When connecting the motor driver's EN/PWM pin, ensure that the microcontroller pin used is PWM enabled. You can check out PJRC's pinout page for more info.
Alternatively, you can also use the pre-defined pin assignments in lino_base_config.h. Teensy 3.x and 4.x have different mapping of PWM pins, read the notes beside each pin assignment in lino_base_config.h carefully to avoid connecting your driver's PWM pin to a non PWM pin on Teensy.
Take note of the IMU's correct orientation when mounted on the robot. Ensure that the IMU's axes are facing the correct direction:
- X - Front
- Y - Left
- Z - Up
An example of how to connect a GY-85 is available in the useful diagrams.
Both the laser and the depth sensor are connected to the robot computer instead of the micro controller. This will most likely be done through an USB cable.
There are 2 reference designs you can follow in building your robot. Including a minimal setup for a 5V powered robot and one with a more advanced setup that uses 19V. These can both be found in the useful diagrams.
For bigger robots, you can add an emergency switch in between the motor drivers' power supply and motor drivers.
Previous step: Robot body
Next step: Software installation