Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Using Ezb Hbridge To Control Rc Truck

I am looking to control a basic RC Truck using an HBridge from EZ-Robot. The RC truck is quite simple in that it has one motor for forward and reverse. It has another motor for left and right steering. With the regular RC Controller there is no PWM to control the speed going forward or reverse. My goal is to use the EZB controller along with a mobile app to control the RC Truck and add headlights, the EZB camera in the truck bed, etc.

My thought was to use the HBridge PWM Movement Panel along with the joystick pads in the mobile interface builder to control the truck motors to simulate the original RC Controller. I need to control the motors separately. It looks as if the EZB HBridge PWM Movement Panel is set up to control a left and right motor to give you the forward, reverse, left and right functions. This won't work in my case because there is one motor for forward/reverse and another for left/right.

I wanted to control the motors separately and not in conjunction with each and I have looked at the EZB HBridge PWM Movement Panel and the Joystick Pad in the Mobile Interface Builder to see if I could make them work like I want with no success.

Is there a way to do what I want with the existing Movement Panel and joystick pads and if not can the movement panel/joystick pad controls be modified to accommodate cases where one might want to control the motors individually?
Ideally I would like to have one joystick in the mobile interface builder control the forward/reverse function with PWM and another joystick pad to control the left/right functions with no PWM required. Doesn't look like the existing HBridge PWM Movement Panel and Mobile Interface Builder in their current forms won't work. This is my view and I certainly could be wrong. Any thoughts on this matter would be much appreciated.

I think an HBridge PWM Movement Panel/Mobile Interface Joysticks that allow the motors connected the HBridge Hardware to be controlled individually would be useful not only for my application but also other applications. Again, any thoughts on this are much appreciated and other solutions are also welcome. :)


ARC Pro

Upgrade to ARC Pro

Synthiam ARC Pro is a cool new tool that will help unleash your creativity with programming robots in just seconds!

#14  
Hi DJ,

When the IOTINY's are available, will you announce it on the forum or should we be looking in the EZ-Robot Store or both?
#16  
@DJ, Thanks for adding the notification feature. That will be useful in being able to order as soon as available without watching the web page every day for updates....

Alan
#17  
@DJ, you might want to let your support desk know you added that button. I got a response from Andres on the zendesk ticket that was automatically generated, and he said to watch the forums for announcements. I thought the whole point of signing up for notification is that I could miss an announcement or forum discussion and still be notified. Maybe that wasn't your intent....

Alan
#18  
PJ_Dtechy,

I came up with a Movement Panel for the truck and it works well. However yours looks better than mine and has more direction buttons. I was wondering if I could use your Movement Panel graphics and put my code in for the button scripts? Also interested in what graphics program you used to make the Movement Panel graphics and how you imported it into ARC software? Thanks for your help ! :)
#19  
No special software was used. just a random jpeg pictures downloaded from google, upload them as a button image and special script to each button to make it do stuffs. Like forward right, or reverse left, simple forward, etc.
#20  
PJ_Dtechy,

Is it ok if I use your buttons for the movement panel. Also, in the icons library area, I saw an export button but not an import button to get images into ARC. I'm probably missing something obvious. Maybe the export button means to export from say google into ARC? I checked in forum and didn't see any direct information on this subject. I've got the script part down just fine. Thanks again ! :)
#22  
Hi DJ,

When you select change can you import an image into ARC from a source on the internet like PJ was mentioning? In other words change is the same as import? Thanks much ! Rick:)
#23  
You are more than welcome to utilize whatever aspect of of my project you need to be successful. After all we are one big happy family :).
#24  
Hi PJ_Dtechy,

Thanks much ! I will investigate how to get images into ARC and give it a try. I will try and click on the change button to see if it comes up with a box to enter url to download images. Haven't had time yet to try this out. Thanks again for your help ! Rick
#25  
Regarding the Movement Panel and pwm values, I noticed the valid range is from 0-100. Typically for an 8 bit value you would have a range from 0-255. This would give a finer range of pwm values. I assume that the values from 0-100 go from slowest to fastest, 0 being off and 100 being max speed. Would this be correct and why not 0-255. Just curious? Rick
#26  
Hello Alan,

Just wondering if you had a chance to check out the SayEZB issue in my project using your android phones with version 6.0.1 software? Thanks for your efforts........Rick
#27  
I'll be testing it out tonight. Making dinner now, so another hour or so.

Alan
#28  
edit: answered in wrong thread. Rick, see your bug report thread for my test results.

Alan
#29  
Here are some pictures (I think) of my lattest project. It is working quite well. I plan on adding a camera and the RGB Display. Also looking to add front headlights and rear lights.



User-inserted image


User-inserted image


User-inserted image


Looks like maybe this was successfull. Rick
#30  
Here is one more picture:


User-inserted image


Rick
#31  
Sorry it took so long for the pictures.

On the left (red circuit board) is the H bridge controller, and on the right (Green circuit board) is the voltage regulator for the 3x Ultrasonics sensors. The LED's are wire directly to the EZ-B, used signal wire (D14, D15) to turn them on and off with a simple script.
User-inserted image



Quick breakdown of the pins assignments also in the demo project,
D0 PWM Sterring
D1 PWM Rear
D2 Hbridge A1
D3 Hbridge A2
D4 Hbridge B1
D5 Hbridge B2
D6 Scan Trig White
D7 Scan Echo Red
D8 E-Stop Trig White
D9 E-Stop Echo
D10 Rear Trig White
D11 Rear Echo Red
D12 servo Y 1-71
D13 servo X 2-180
D14 Brake Light
D15 Headlight


Picture below, try several time to remove the built in steering motor, but difficult to mount the servo without buying new stuffs (wanted to used what I had laying around) , so I tap into the original steering, not precise. Do not turn as sharp as I would like but for learning purposes does the job.

User-inserted image
#32  
PJ,

Thanks much for the pictures ! I will probably add an ultrasonic sensor somewhere in the front of my truck. Just happy my truck is up and running....Take care....Rick