jackpf
Posts: 9
Joined: Mon Apr 28, 2014 10:53 pm

Little bit of advice about motors and chassis

Mon Apr 28, 2014 11:06 pm

Hi all,

I'm hoping to create a motorised vehicle controlled by the raspberry pi's gpio ports for a uni project. However, my focus is going to be on the software, and I'm not particularly knowledgeable in electronics. Just to make sure I have the right idea before I invest in this equipment, if anyone can confirm/deny these components will work together it will be much appreciated.

I am assuming I can mount my pi onto a chassis like this which runs off 2 motors controlled by one of these.

Will this work? One more quick question, is it possible to control the speed of motors using this motor controller or just turn them on and off?

Thanks for any help,
Jack

Tarcas
Posts: 741
Joined: Thu Jan 09, 2014 5:38 am
Location: USA

Re: Little bit of advice about motors and chassis

Tue Apr 29, 2014 2:52 am

I don't know anything about the chassis, but if the motors you get mount to it, the Pi should mount too. (You'll probably have to drill new holes. Don't know if the predrilled ones are pi-compatible... but maybe.)

The H-bridge is exactly what you need to control the direction of motors, assuming the motors you're getting are within the L298N's power specs. That will control up to 2 of them. To control speed, you do pulse-width modulation (PWM) which means to turn the pin on and off really fast, leaving it on for a percentage of full time (called the duty cycle) to produce roughly that percentage of the power in the motor. (I say roughly because extremely low duty cycles probably won't give you any motion at all.)

User avatar
joan
Posts: 14935
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Little bit of advice about motors and chassis

Tue Apr 29, 2014 5:29 am

As Tarcas says, that will work,

The board is a popular choice and will allow you to independently control the direction and speed of each motor from the Pi.

jackpf
Posts: 9
Joined: Mon Apr 28, 2014 10:53 pm

Re: Little bit of advice about motors and chassis

Tue Apr 29, 2014 2:05 pm

Thanks for the great replies, these were very helpful.

Return to “Automation, sensing and robotics”