Skip to content

Control the servo with the analog signal that convereted with analog to digital converter

Notifications You must be signed in to change notification settings

kevserbal/Read_ADC_and_Control_Servo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Read_ADC_and_Control_Servo

Control the servo with the analog signal that convereted with analog to digital converter

Control Servo Motors

Generally, servo motor works in between 0 to 180 degree.The PWM signal must have 20ms intervals to rotate the servo. We use only the first 2ms of the intervals as input and the other part of the signal is always low. When we send the first 1ms as high voltage and the rest as low, the servo goes to 0 degree.Then, if the first 2 ms is high, the servo goes up to 180 degree. Using the values between 1ms and 2ms, it can be rotated between 0 and 180 degree.

You can get more info about servo motors from here https://circuitdigest.com/article/servo-motor-basics


  2ms
  |▔▔▔▔|_________________________________ => 180 degree
  1.5ms
  |▔▔|_____________________________________ => 90 degree
  1ms
  |▔|______________________________________ => 0 degree

  <------------------20ms-------------------->

Subroutines

  init_adc is a subroutine for initiation of adc. The delay_ms is written for specific values of time intervals.

Simulation

About

Control the servo with the analog signal that convereted with analog to digital converter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published