Sunday, 11 October 2009

AVR project log- PWM DCmotor

11/10/09 Day 27


Controlling DC motor speed with PWM was quite successful.
I was able to control the motor with varying speed in both, clockwise and anti clockwise direction, then a indicator LED will light up when you are at the maximum speed.

Software aspect, I used an interrupt, which leaves my main processor doing nothing/ or can be used to do something else, however it still has a few drawbacks.

1. I can only supply the motor with 3V, and with a increment step of ~4%, each increment is not obvious. With a 3V supply, i'll be increasing the motor by 0.117V every step. Likewise, with a 9V supply, I each step will be 0.351V. Hmm still quite low, maybe i should make each step 1V.

2. The motor starts with 0v, with every increment of 0.117v, I would need to rapidly press the tac switch ~13 times in order to get the minimal 1.5V, get the motor started. Still looking for a way to get around it.

3. Software site, I still need to figure out how to use a variable shared among the interrupt and main. Currently I just manually add a varialbe in the interrupt part.

Add on/ improvements
1. add a bar graph/ 7 segment display to indicate the motor speed
2. add a sensor, eg temperature sensor, increse speed when the temperature is higher!!
of course this involves ADC, which is the part I did previously and somehow damaged one pin the chip.

ADC will be the next mountain to climb!!!!

Till then bye.

No comments: