Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: RpiHacker on October 09, 2014, 10:47:05 AM

Title: micro-controller to interface between Raspberry Pi and a L298N H-bridge
Post by: RpiHacker on October 09, 2014, 10:47:05 AM

Thanks to the help of a benevolent Robot Overlord I now have an H-bridge plan using four (4) L298N ICs, wired in parallel, to provide a max of ~4A per channel (per motor).  Yes I will fuse at ~3.5A.

That done, I now need to identify an appropriate micro-controller to interface between the GPIO pins of a Raspberry Pi B+ and the L298N motor control circuits. I prefer to build the circuit myself rather that use an Arduino or some other 3rd party add-on board.

That said, if all else fails I would consider a breakout board kit to accomplish my DIY goals - hey swimming upstream is difficult.

In a perfect robot world the controller chip would be identified by the Pi software at boot time including loading all the necessary drivers - yes like an official Pi Hat. Hey old guys are dreamers too.

Thanks for any advice you may provide.
Cheers,

Title: Re: micro-controller to interface between Raspberry Pi and a L298N H-bridge
Post by: RpiHacker on October 09, 2014, 02:09:18 PM
Note to self --- after more digging I think the MCP23017 chip will meet my needs.

However, I would still appreciate any on usable chips.

Cheers


Title: Re: micro-controller to interface between Raspberry Pi and a L298N H-bridge
Post by: RpiHacker on October 12, 2014, 10:35:24 AM
After further work it turns out that the MCP23017 may not be the best choice for my project, because of my limited programming skills. 

Thanks to the good people at Adafruit and Joan form the Raspberrypi.org Projects forum - automation, sensing and robotics topic I believe I have found a solution to my RPi DIY motor control needs.

Long and short of it is:

DIY Ardunio motor shield @ < www.Instructables.com/id/DIY-arduino-motor-shield-L298N-Chip-2-4-Amp-/ (http://www.instructables.com/id/DIY-Arduino-Motor-Shield-L298N-Chip-2-4-Amps-/) > allows me to build the motor controller.

For help to get started with coding the shield go to <youtube.com/watch?v=qwNvYYqBy7I >

The young man hosting the video does a good job explaining H-bridges and the code he wrote to test run the DC motors being controlled by an Arduino motor controller.

The example code associated with the video can be found by clicking the "Show More" box below the video.

I hope this is helpful to those who might be looking for DIY solutions to bot motor control.

Thanks to all those who helped me plan for the RPi based robot's mobility.  BTW the RMF (Robot Motor Factor) calculator at this site, along with constructing motor torque/speed charts played a critical role in finding the motors for this project - which it turns out is not an easy task.

Cheers,