

If IN1-high(+5V), IN2-low(GND), the OUT1 turns high and OUT2 turns low, thus we can drive motor. IN1 to IN4 are the input pins which will be connected to AVR. If you connect the ENA pin to low(GND), it disables the OUT1 and OUT2. OUT3 and OUT4 for connecting LED tape.ĮNA and ENB are enable pins: by connecting ENA to high(+5V) it enables the port OUT1 and OUT2. OUT1 and OUT2 port, which is for connecting DC motor. Also, It used for driving the brightness of LED tape. We can control the speed using PWM and also its rotational direction of the motors. It can control 2 DC motors simultaneously up to 2 amps each or one stepper motor. The microcontrollers are smart but not strong this module will add some muscles to microcontrollers to drive high power DC motors.
#Asf avr control dc motor drivers
We use DC motor drivers because microcontrollers are not capable of delivering current not more than 100 milliamps in general. Watch the video with a detailed description of the ADC AVR microcontroller: AVR Microcontroller. We use analog to digital convert of voltage level from divider circuit with LDR to measure the light intensity.ĪDCSRA |= (1< LDRs are made from semiconductor materials to enable them to have their light sensitive properties. Light Dependent Resistor (LDR) is a transducer which changes its resistance when light falls on its surface changes. Thus, solving according to equation given above, we get We need to generate a 50 Hz PWM signal having 45% duty cycle. % of Duty cycle = T on /T (period time) x 100 In PWM technique, we create digital pulses with unequal amount of on and off state to get required intermediate voltage values.ĭuty cycle is defined by the percentage of high voltage duration in a complete digital pulse. Usually, digital pulses have same on and off time period, but in some situations we need the digital pulse to have more/less on time/offtime. Pulse Width Modulation (PWM) is a comparatively recent power switching technique for providing intermediate amounts of electrical power between fully on and fully off levels. Thus, the overall effect of this action is that the motor rotates continuously, but at a lower speed. But before it happens, it is powered off, and so on. But even now, it takes some time to reach its full speed. But before it stops completely, it is powered on again! Thus it starts to move. But it doesn’t stop immediately, it takes some time. As soon as it is powered off, it will tend to stop. The motor rotates whenever it is powered on. Each and every body in this world has some inertia.
#Asf avr control dc motor full