screennoob.blogg.se

Darwiinremote source code
Darwiinremote source code






darwiinremote source code
  1. #DARWIINREMOTE SOURCE CODE SERIAL#
  2. #DARWIINREMOTE SOURCE CODE UPDATE#
  3. #DARWIINREMOTE SOURCE CODE MANUAL#
  4. #DARWIINREMOTE SOURCE CODE FULL#

#DARWIINREMOTE SOURCE CODE MANUAL#

We opted against hardware PWM signals and had to implement manual PWMs because we wanted to allow for future expansion by setting the algorithm up to work with as many motors as there are pins available. It fitted our need as the values on our potentiometer ranged from 0-255, all of which can be covered using 8 bits. We read the ADC input in binary by observing these LED's. We overcame this constraint by enabling the 8 LED's on the STK board. This led us to disable displaying of real time values of the ADC input on Hyperterm. Due to the large number of cycles introduced by the printf statement, we started losing pulses in the PWM.

darwiinremote source code

There are three signals going through separate opto-isolators into the H-bridge: the PWM, the brake (activated when desired position is reached), and the direction bit.Ī big tradeoff we faced was using the printf statement. The H-bridges are used for direction control and the opto-isolator circuits for MCU protection. The voltage signal from the potentiometer is fed back into the MCU ADC as the feedback. The motors move according to the PWMs while also turning the coupled potentiometers. The instruction is then sent to the protoboard, which generates required PWMs. The user can send instructions (Final Positions of the Snake arm segment) either by using Hyperterminal or by moving the Wii remote in the desired direction. Increasing the Integral term helped us to get rid of oscillation problems. Finally we increased Ki until the loop worked within an acceptable error range High values of Kd lead to extreme motor motion and instability.

#DARWIINREMOTE SOURCE CODE FULL#

After having full load on the motor we increased Kd until the motors were able to move the entire segment to the extreme points. We first set the Ki and Kd values to zero and kept on increasing the Kp until we reached a suitable value. In our case the sensor is a potentiometer coupled with the motor shaft through a gear assembly and pulley system.īlock diagram showing components of the PID mechanism.ĭiagram illustrating the concept of the PID algorithm. The error is the difference between the desired condition set by the user through one of the input modes, and the actual condition reported back by a sensor.

#DARWIINREMOTE SOURCE CODE UPDATE#

The main feature of the motor controller is the ability to use feedback from sensors to continually update the motor operation and minimize error using the PID algorithm. This gives the snakearm more intuitive wireless flexibility in terms of motion control. We have also implemented Wii remote interface with our motor controller.

darwiinremote source code

This saves enormous cost and pain of calibration for the team. In this project, we implement a multiple PID motor controller using the Atmel Mega644 microcontroller which can drive up to 8 motors. The fact that each Pololu PID controller can drive only one motor and has a cost of $50 imposes an inherent limitation in terms of cost and utility as the complete snake arm would require at least 10 controllers (5 segments). The Snake arm team initially planned on using one Polulu 3-A motor controller to drive each DC motor. The feedback is provided using potentiometers coupled with the motors through gears and shafts. In order to move the arm accurately to a desired position, a real-time feedback is required. The Snake Arm team at Cornell designed its fourth generation arm having multiple cells involving gear assemblies, chains, springs, strings and pulleys. High Level Design Rationale and Motivation

#DARWIINREMOTE SOURCE CODE SERIAL#

The Wiimote sends IR data via Bluetooth to a MacBook, which then sends the information to the MCU through a serial connection. Hyperterm allows for numerical input of each motor's position ranging from 0 to 255. The motors can be controlled with Hyperterm or a Wiimote. Since we used DC motors, we implemented a PID control algorithm that determines the speed of the motors using PWM to achieve the best accuracy possible. The main idea for our project was to implement an inexpensive solution to the current CU Snake Arm motor-driving system by using a Mega644 microcontroller instead of multiple 3-Amp motor controllers as the snake arm was originally intended to be driven.








Darwiinremote source code