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

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

#2  

The one motor will need pwm control and direction control. Can I also add a pwm slider to set the speed of the forward/reverse moror? I like the mobile app joytick pad as it returns to off when you let up on the joystick. Can this be done with the mobile app and custom movement panel. I was looking to use two of the new joystick pads in the mobile app. One for forward/reverse and one for left/right. Thanks DJ

PRO
Synthiam
#3  

Using a custom movement panel, you create the code that is called for the movements (i.e. forward, left, right, stop, reverse). The speed may be used in your code because it is visible as a variable. The information necessary may be found at the Custom Movement Panel page here: https://synthiam.com/Tutorials/Help.aspx?id=182

The Joystick control in mobile interface (or any movement command in ez-script, camera, etc) is unrelated to your code, because the joystick controls movement panels. There is a link to the Movement Panel tutorial on the above link. However, here is a direct link to how movement panels work: https://synthiam.com/Tutorials/Lesson/77

Once you have an instance of a Movement Panel, it doesn't matter what control you add that uses movement - because the Movement Panel will take care of the movements. In this case, the discussed Movement Panel is Custom Movement Panel

PRO
Synthiam
#4  

I updated the Movement Panel tutorial to include a mention of the Custom Movement Panel. You may see the update in the community news feed, or by clicking on the links in my previous responses. Have fun!

PRO
Synthiam
#5  

Oh oh oh, this is my last spam on this topic, i promise:). Although you will need an HBridge for the rear wheels, it will also be easiest to use a servo for steering. So, ensure your r/c vehicle has a servo for the front wheel steering. If your r/c vehicle uses a motor or electro-magnetic coil, you'd need an hbridge or transistor, respectively. On that note, adding an hbridge for steering won't give you analog steering.

#6  

Just to echo what DJ already mention above. I have accomplished exactly what you are trying to achieve with custom script and custom movement panel. Here is a link to my thread as a reference point https://synthiam.com/Community/Questions/9826 . I Will take it apart tonight and share the internal wiring with you. Just using a cheap H-bridge controller from eBay.

User-inserted image

#7  

Thanks much PJ_Dtechy. I will take a look for sure.....Rick

#8  

PJ_Dtechy,

What do you use the sliders for in your mobile app? Is your project uploaded to the cloud? Thanks....Rick

#9  

Vertical Slider control camera Y Axis (up & down), Horizontal control camera X axis (left and right). I just uploaded for you, it's mark as incomplete.

#11  

Thanks DJ and PJ_Techy ! Rick

#12  

Hello DJ,

Looking for a couple of IOTINYS to use for truck control and another project. I would like to order three controllers. Any update on the availability of the controllers? Thanks much....Rick

#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