• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Project report
 

Project report

on

  • 448 views

 

Statistics

Views

Total Views
448
Views on SlideShare
448
Embed Views
0

Actions

Likes
0
Downloads
11
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft Word

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Project report Project report Document Transcript

    • MicroprocessorApplication LabTerm Project - Ganesh Kumar M (08ME 3305) - Akshay Meena (08ME3304) - Anoop S (08ME3303) - V. Rahul Soni (11ME63R37) - Manoj Kumar Pandit (11ME63D02)
    • IntroductionA traction control system (TCS) is typically secondary function of the Anti-LockBraking system on production vehicles, designed to prevent loss of traction ofdriven road wheels. When invoked it therefore enhances driver control as throttleinput applied is mis-matched to the road surface conditions being unable to managethe applied torque.This project is simplified version of such a system. The vehicle is driven by a DCmotor. On loss of traction, the system tries to regain it by reducing the power tothe DC motor, thus, reducing its speed/torque output. This is similar to the throttlecontrol in TCS of road vehicles. The front wheel speed is taken as the referencespeed. It is assumed that the front wheel is in pure rolling and there is nolongitudinal slip. The target of the bot is to finish a circuit in the optimal speed.Project Description and AlgorithmIn this project our main aim was to build a simplified traction control system. - First, the front wheel speed is read for reference using a magnetic speed sensor. - Using the front wheel speed, we compare it to the speed of the motor. If the front wheel speed is more than motor speed, the power to the DC motor is reduced to match the reference speed. - The steering is controlled by another DC motor.
    • List of components: Component Name Quantity Cost Motor 6V 25000 rpm 1 - Motor 6V 1 - USB ATmega328 Arduino 1 750/- 2500/- Vehicle Chassis 1 *(inclusive of Motors) Magnetic Speed Sensor 1 - Motor Controller 3 300/-
    • Miscellaneous - 450/- Total 4000/-ATmega328 Pin layout
    • The Program (with Feedback system)#include <avr/io.h>
    • #define F_CPU 16000000UL#include <avr/io.h>#include <avr/interrupt.h>#include <inttypes.h>#include <avr/delay.h>#include <util/delay.h>int MotorBackBackward = 9;int MotorBackForward = 10;int MotorFrontLeft = 5;int MotorFrontRight = 6;#define NORMAL 1000#define TURN 1000#define forward 5000int i=0;uint16_t time=0,task=0;int16_t defTime=0;bool edge=true, lastEdge = true;void InitTimer(){ TCCR1A = (1<<COM1B0); TCCR1B = (1<<CS10); TIMSK1 = (1<<OCIE1B);}void InitADC(){ ADMUX |= (1<<ADLAR)|(1<<REFS0); ADCSRA |= (1<<ADEN)|(1<<ADPS0);}void ReadADC(){ ADCSRA|=(1<<ADSC); while(!(ADCSRA&(1<<ADIF))); if(ADC-509) { edge = true; } else edge = false;}ISR(TIMER1_COMPB_vect){ if(lastEdge&&edge) { } else { lastEdge = edge; defTime = time; time=0; } time++; task++;}void setup(){
    • pinMode(MotorBackBackward,OUTPUT); pinMode(MotorBackBackward,OUTPUT); pinMode(MotorFrontLeft,OUTPUT); pinMode(MotorFrontRight,OUTPUT); InitTimer(); InitADC(); SREG|=(1<<7); sei(); OCR1B = 16000; stopAll();}void loop(){ moveForward(173+2*(30-time/50)); if(task<forward) { stopTurn(); } else { turnLeft(); } if(task>=2*forward) task = 0; /* moveForward(); delay(NORMAL); stopMove(); turnLeft(); delay(1000); delay(TURN); delay(TURN); //turnRight(); turnRight(); moveForward(); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); stopMove(); turnLeft(); stopTurn();*/}/*void moveForwardPWMint value){ analogWrite(MotorBackBackward,0); analogWrite(MotorBackForward,value);}void moveBackwardPWM(int value)
    • { analogWrite(MotorBackBackward,value); analogWrite(MotorBackForward,0);}*/void moveForward(uint8_t pwm){ analogWrite(MotorBackBackward,0); analogWrite(MotorBackForward,pwm);}void moveBackward(){ digitalWrite(MotorBackBackward,HIGH); digitalWrite(MotorBackForward,LOW);}void turnRight(){ digitalWrite(MotorFrontLeft,HIGH); digitalWrite(MotorFrontRight,LOW);}void turnLeft(){ digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,HIGH);}void stopTurn(){ digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,LOW);}void stopMove(){ digitalWrite(MotorBackBackward,LOW); digitalWrite(MotorBackForward,LOW);}void stopAll(){ digitalWrite(MotorBackBackward,LOW); digitalWrite(MotorBackForward,LOW); digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,LOW);}The Program (without Feedback system)int MotorBackBackward = 9;int MotorBackForward = 10;
    • int MotorFrontLeft = 5;int MotorFrontRight = 6;#define NORMAL 1000#define TURN 1000void setup(){ pinMode(MotorBackBackward,OUTPUT); pinMode(MotorBackBackward,OUTPUT); pinMode(MotorFrontLeft,OUTPUT); pinMode(MotorFrontRight,OUTPUT); stopAll();}void loop(){ moveForward(); delay(NORMAL); stopMove(); turnLeft(); delay(1000); delay(TURN); delay(TURN); turnRight(); moveForward(); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); delay(TURN); stopMove(); turnLeft(); stopTurn();}/*void moveForwardPWMint value){ analogWrite(MotorBackBackward,0); analogWrite(MotorBackForward,value);}void moveBackwardPWM(int value){ analogWrite(MotorBackBackward,value); analogWrite(MotorBackForward,0);}*/void moveForward(){ digitalWrite(MotorBackBackward,LOW); digitalWrite(MotorBackForward,HIGH);}
    • void moveBackward(){ digitalWrite(MotorBackBackward,HIGH); digitalWrite(MotorBackForward,LOW);}void turnRight(){ digitalWrite(MotorFrontLeft,HIGH); digitalWrite(MotorFrontRight,LOW);}void turnLeft(){ digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,HIGH);}void stopTurn(){ digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,LOW);}void stopMove(){ digitalWrite(MotorBackBackward,LOW); digitalWrite(MotorBackForward,LOW);}void stopAll(){ digitalWrite(MotorBackBackward,LOW); digitalWrite(MotorBackForward,LOW); digitalWrite(MotorFrontLeft,LOW); digitalWrite(MotorFrontRight,LOW);}