Brazil
Asked — Edited
Resolved Resolved by Rich!

Roomba And A H-Bridge In Te Same Project

Friends... I'm trying to use an Irobot Create as a base for my next project. the case is that I'm using an H-bridge to control some motors that moves some other parts... I have two questions: How can I use two movement panels in the same project ? One for roomba and another for the other motors...?

And, how can I choose a different port (other than the D0) in the roomba Movement Panel ?! thanks!


ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

United Kingdom
#1  

You can't use two movement panels in one project. The Movement Panel is for movement of the robots drive train. You will never come across a robot that has multiple drive trains that require independent operation.

That said, you can use more than one H-Bridge or an H-Bridge with other "movement" accessories such as Sabertooth or Roomba.

If you read the tutorial I wrote on the L298n H-Bridge it explains how it works and shows the truth table right at the end, with this information you can script the movement of other motors.

Baiscally, what you need to do is set up scripts to set the digital ports to high or low as required, this will then operate the H-Bridge and therefore operate the motors.

So, if you connected In1 to D1, In2 to D2, In3 to D3 In4 to D4, Ena on D5 and Enb on D6. In order for motor 1 to move forward you need to first set the PWM on Ena to the desired speed;

PWM(D5,100)

Next set In1 to High and In2 to Low.

Set(D1, On)
Set(D2, Off)

So the complete code would be;

PWM(D5,100)
Set(D1, On)
Set(D2, Off)

Motor 1 will now move forwards.

Use the truth table to figure out what needs setting high and low for each movement, script it and then call the script for when you need the movement.

If you need help with the scripting part just ask and I'll knock up a project which will let you import the script controls. Just let me know the ports you are using for each connection to the H-Bridge.

Also, the Roomba needs D0 since D0 is the only port capable of the required Baud rate for the Roomba.

Brazil
#2  

thanks Rich! it worked perfectly! you are a genius... by the way, allow me another strange question...

But I just can't find the older threads in the forum! since the new site came online... is it me, or they are gone ?!?!

thanks

United Kingdom
#3  

Scroll down a bit further for the categories.

On the desktop browser version they are under the camera feeds.

Click on each section, general, hardware etc. and browse just that section of topics. All of the older ones are still there.

Brazil
#4  

come on!.. whats the point of hiding that so much?! lol.. I found.. but I think the other menu was easier and better.. Thanks, Man!