Saturday, April 27, 2013

Raspberry Pi H Bridge DC motor driver


As we all know, the Raspberry Pi has powerful computing power. In order to put these to use, I am planning to develop a vision based Robot. Maybe a vision based line follower. The first step was to develop locomotion. I am always in favour of using optoisolated boards for DC motor drive, as high inductance and commutation produce a good amount of noise in the circuit.




Sponsor: www.avmicrotech.com/shop  eshop for your electronic needs




 In this trial, I have used a SPI controlled Attiny2313 based board producing 100hz PWM (configurable from 100Hz to 700Hz). The board need 7 bytes to configure all the parameters of the two DC motors like PWM (speed), direction and frequency. The SPI frequency is 25000Hz. The code on Raspeberry Pi is slightly modified spidev_test.c The motor driver board is running off the Raspberry PI 3.3V which is limited to 50mA. My estimate is worst case scenario of less than 30 mA.




No comments:

Post a Comment