Asked — Edited

Trex Motor Controller Problems With Ezb

I have several Pololu TReX motor controllers laying around. I hooked it up and connected a motor and a linear actuator to both channels. I started with an standard RC controller and made sure it was all set up. Worked fine.

Then I replaced the reciever with the EZB. It worked for about 10 seconds then stopped. I had used PWM slider, then I tried servo etc. Nothing would work again. The green LED on the TReX flashes when there is no recieved signal. It was flashing. So I replugged the RC set up and it all worked fine again. Then again with the EZB, this time only one channel worked for about 10 seconds then nothing. I could not get it to work again after that. Anybody tell me why the EZB will not send thru a simple PWM that the TReX expects to receive? Or how to keep it connected?!

Thanks!

Will


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

PRO
Synthiam
#1  

@fxrtst PWM is Pulse Width Module, not for servos. It's a method of outputting a range of voltage from the digital I/O pins.

The motor controller would require a servo connection, not PWM.

And even more specifically, you would use a Modified servo Control. If you have two connections on the motor controller, then use a Modified servo Movement Panel.

You can use the Tutorials section to read about how a servo works. It's a bit differnet to wrap your head around - but once you do, it'll be a breeze

PRO
USA
#2  

OK I'll try again tomorrow. This particiular motor controller uses standard R/C reciever and transmitter out of the box. Just connect up power (in this case 12 v) to the TReX and both (+)(-) leads to motor 1 and motor 2. The final connections use standard servo connections and cables for the signals to motor 1 and motor 2. So I will try the modified servol control in the moring and see if that sends the right signal the controller is looking for.

Thanks

Will

You connect servo wires to the first two connnections on the left side for M1 and M2

User-inserted image

PRO
USA
#3  

OK had a bit of time to test this morning. Results were: Modified servo does not seem to work at all. Only PWM works some of the time. When it loses signal, I can sometimes regain signal by turning them to off (Stop) they will sometimes begin to operate again. I even tried swapping out power supply to the TReX thinking it was browning out. Same results as before. Anybody have any ideas?

I have included the following videos:

  1. The setup running with just R/C Click To Watch Video

  2. The set up with EZB when it loses the signal. Click To Watch Video

  3. Set up trying to use the Modified servo panel Click To Watch Video

Please excuse all the hammering. There is construction next door.

Cheers,

Will Huff

PRO
Synthiam
#4  

Remove PWM from your memory:) Pretend it doesn't exist. You don't want to use PWM, never use it for what you are doing.

Either the Modified servo Movement Panel or Modified servo Control will work, you'll need to adjust the settings under CONFIG. The Forward and Reverse settings will need to be configured.

The best way to test to find the right settings is to first use a Vertical servo Control. Then start slowly moving the values until the motor begins to move one direction. Write down that value. (that'll probably be reverse value)

Then continue to move the slider until the motor stops.. Write down that value (that'll be the stop value)

Then continue to move the slider until the motor starts, but keep moving it until it's at full speed before it stops again. (That will be the maximum speed forward value probably)

Then add those values into the Modified Movement servo Panel

However, once you upgrade to 15.3, you'll have to do that process again becuase the servo values have changed:) - for the good!

PRO
USA
#5  

Hahaha. "Will put down the pwm and walk away". Ok I will give the servo a spin again and work thru the values see it works. Excellent point when 15.3 comes out. I'll make sure not to do too much building until then!

Thanks again I'll let you know how it goes.

Will

PRO
USA
#6  

HHHmmm. Well I end up with the same problems. First 4 attempts the servo panel did not control the motors. There was no response at all as i moved the slider slowly from 1 to 70 on both channels. The TReX signal light just sat there and blinked. Then finally without warning, both channels began to work at the same time and then after about a minute, the TRex began to blink again, showing that the signal had been lost. I could no longer reconnect to the channels. I did manage to grab the max forward and reverse numbers for both channels, but as soon as i opened a modified servo panel and input the numbers it stopped working after a few seconds.

I guess for what ever the reason the TReX is not compatable with EZB. I certainly gave it the ole one, two.

Thanks for all the help though.

Cheers,

Will

PRO
Synthiam
#7  

If the treks accepts a r/c servo signal, than it is 100% compatible with the ez-b. the ezb has a wider range of servo signal pulses to accomodiate for all servo brands and models. Most of these motor controllers require a specific range, otherwise they'll not work.

Because these things, like the trek are programmable (in a sense) by learning their limits (sometimes) its a bit more difficult to configure. So don't think it's not compatible, I assure you it is:) instead continue thinking it requires a specific configuration. Because I do not own one of these, I'm not able to get the configuration for you. Once you do find the proper values, make sure you post them here so we can share with others.

:)

PRO
Synthiam
#8  

Also Make sure the treks is configured for r/c mode by the jumper

PRO
USA
#9  

TReX is in R/C mode as video 1 demonstrated above. I am thinking that the linear actuator may be messing things up. As everytime I activate it is when I lose signal. I am going to remove it and use another 12 v motor I have. Then I'll input the range values I extracted and try again. Let you know how it goes.

Worst case if it still works erratically I can send you a TReX to test on and see what your results are. If you could send it back:) when done.

Again thanks for all the help.

Will

PRO
USA
#10  

Ok,

Repeatable issue. I have reproduced the same results 10 times in a row. I removed the linear actuator and replaced with exact same type motor as on channel 1. This way loads etc will be the same. Results:

  1. The TReX has the following values to work - forward/reverse,stop as follows: 15 min, 55 max, with stop at 35.

  2. Created two vert servo panels, config to D8 and D9. Reset values to above numbers. Saved.

  3. With both channels plugged in nothing happens. TRex blinks and i move from 15 to 55, nothing happens.

4)But if I UNPLUG one channel, I can get the other one to work. Then I plug in the other channel and both now work and have full control.

  1. I then created 2 modified servo panels and added the correct port and values to match the servo panels I created in step 1. When I hit forward, they move and hit reverse they go in reverse as expected.

  2. But if I hit STOP on both channels, the TRex loses signal and neither motor will move again (as in step 3) until I again UNPLUG one channel and repeat step 4 above.

  3. Repeated 10 times, same results.

Any ideas what that sounds like may be happening?

Will

PRO
Synthiam
#11  

LOL, I'm not entirely sure but it sounds like the trex is buggy. You can look at the screen shots of the Standard servo in the Tutorials section. The EZ-B has amazingly accurate servo timing - and i stand by that... They are amazingly accurate. If the trex isn't liking what it is getting, i'd blame buggy firmware on the trex. Otherwise perhaps there is noise along the cables or some interference.

I guess it's difficult to diagnose from here. If you'd like to send a Trex, i can take a look at it but i'm how much free time i have for that. I work 12-14 hours per day developing the software:) So it'll be a toughy to fit in! So if you have two units, you can donate one and i'll get around to it a bit faster:D

PRO
USA
#12  

Well well. You brought up a good point, Firmware. I checked their site (I've had these for about 3 years), and here is what I found there:

"TReX and TReX Jr firmware versions 1.0 and 1.1 have a bug that prevents the device from working at 28,800 and 38,400 bps baud rates. All other supported baud rates work correctly on versions 1.0 and 1.1, so if you do not need them, there is no need to perform a firmware update. "

And This:

"This firmware fixes a bug that affected the 38,400 and 28,800 bps baud rates, and it adds a configuration parameter that lets you optionally insert a 1 ms delay between the last byte of a received command packet and the first byte of the TReX's transmitted response. Without this delay, slower controllers, such as the Basic Stamp, can miss the first byte of the TReX's response. "

Possible this the problem? What is the default Baud rate of the EZB? I'll try upgrading the firmware and see how that goes. Thanks for suggesting it DJ!!

Will

PRO
Synthiam
#13  

r/c mode doesn't use a baud rate. serial mode will use a baud.

r/c mode works like a servo. you can read about how a servo works in the tutorials section under Standard Servo. The servo uses a PWM (pulse width modulation). So, because all servos and all other r/c motor controllers work, i'd have to suggest there is a bug in the trex software. Or, you never know - maybe you'll find a differnet configuration setting that works.

PRO
USA
#14  

Well poo. Ok throwing the towel in on this one. More building and less posting.

Thanks again I know you are busy..thanks for trouble shooting with me.

Will

PRO
Synthiam
#15  

Anytime dude:)

Try again at a later date. Usually things just "work" when you revisit them:D