ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Rover: raspberry pi3+L298 h-bridge and i2cpwm library

asked 2019-08-24 14:01:48 -0600

v.leto gravatar image

Hi! I've found a source code where the wheels of a rover are commanded with an Adafruit PCA9685 16-Channel Servo Driver. The library used is i2cpwm by Bradan Lane. Is it possible to use the same library connecting 2 DC motors to the L298 h-bridge? Or does anyone know to guide the rover with this hardware and ROS? Thanks a lot

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2019-08-28 15:58:50 -0600

duck-development gravatar image

updated 2019-08-29 13:05:25 -0600

You could use the pca9685 to Controller the enable Inputs and other io for select the a and b. Und Drive you Rover.

Or use one for MCP23017 for the io.

Other cheap solution is a something linke this http://s.click.aliexpress.com/e/EIOLVWva

as you rover has only 2 motors you could connect the pins to both pwm pins you do not use andy audio

it ist the bmc 12 and bmc13

see the positon from here https://pinout.xyz/pinout/pin33_gpio13#

edit flag offensive delete link more

Comments

Excuse me, but I haven't understood anything.... my hardware is composeded by a L298 h-bridge and 2 DC motors.

v.leto gravatar image v.leto  ( 2019-08-29 02:35:13 -0600 )edit

It is not possible to use this library because the PCA9685 is an i2c to pwm chip.

If you like to drive with the full speed then you can use gpios of the pi. If you like to control the speed then you need at least a two channel pwm source. Something like the adafruit you said in you post.

duck-development gravatar image duck-development  ( 2019-08-29 10:46:17 -0600 )edit

Ok thanks. I don'have the adafruit anyway, just the H-bridge. :(

v.leto gravatar image v.leto  ( 2019-08-29 14:13:34 -0600 )edit

Then you can use this library https://sourceforge.net/p/raspberry-g...

And generate pwm with the pi gpios

duck-development gravatar image duck-development  ( 2019-08-30 01:33:20 -0600 )edit

yeah, but I have to use ROS too.

v.leto gravatar image v.leto  ( 2019-08-30 04:44:39 -0600 )edit

Yes. You can usually use ROS and other python libraries at the same time.

ahendrix gravatar image ahendrix  ( 2019-08-30 16:38:50 -0600 )edit

I know, but I have to write the code to do this............the i2cpwm library is ready to be used with ROS but unfortunately I can't use it because of the different hardware...

v.leto gravatar image v.leto  ( 2019-08-31 04:22:13 -0600 )edit
0

answered 2019-12-04 11:49:57 -0600

Hello We had problems in controlling the 2 dc motor. You can find the solution in the our reporstory on Github. https://github.com/bekirbostanci/ROS_...

edit flag offensive delete link more

Comments

Could you please update your answer with a copy and paste of the solution? If your repository were to disappear, then your answer will become less than useful. Also, it's difficult to find the solution by searching in a repository with many directories and files.

jayess gravatar image jayess  ( 2019-12-05 20:12:40 -0600 )edit

Solution is not very short so that I published github link. I am developing this reporstory and ı will write a readme file how to use this repo. Re-share the file link below

https://github.com/bekirbostanci/ROS_...

bekirbostanci gravatar image bekirbostanci  ( 2019-12-05 23:18:57 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-08-24 14:01:48 -0600

Seen: 1,234 times

Last updated: Dec 04 '19