Week: 4
- huggingdrones
- Nov 11, 2016
- 1 min read
Week 4
After researching, we found out the correct way to wire up the tera ranger with the Arduino and the source code needed to display what was it reading. The code works perfectly and we had to modify the code to make it work with the pixhawk. The idea is, when the drone too close to a wall, it will fly away from the wall depending on the distance it is away from the wall. For example, if it is 50cm away from the wall, it will fly back faster than when it is 80cm away from the wall. This is done by using an algorithm that will be determine how fast the drone moves back depending on the distance.
This means we have to use the Arduino to overwrite the signal being sent to the motors. The motors we are using are 3 phase brush-less motors. A pwm signal can be used to command the motor speed. The pixhawk use sends the pwm to the ESC which controls the motor. We plan to overwrite the pixhawk signal with the Arduino. The pixhawk produce a 400 Hz pwm signal. The high time of the signal determines the speed of the motor. An arduino is capable of replicating the signal.

400 Hz signal from the Arduino.

Connections between Tera Ranger Arduino
We continued to work on the parachute release system using the electromagnets. We cut out mild steel bricks as the magnetic material for electromagnets in the parachute release system. The electromagnet screws attract the mild steel relatively well.
Comments