Asked — Edited

Wireless Controlled Servos To Ez-B V4

I have two servos which cannot be hard wired directly to the EZ-B controller. They will be located about 10 feet from the EZ-B and I can't run wires to them. These servos will be controlled by the script running in the EZ-B using information from the camera input. Can I use a wireless device like an xbee to connect the servos to the pwm outputs on the EZ-B? Has anyone ever tried this or has suggestions as to if it can work?

Ron


ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Synthiam
#1  

No. Servos use a PWM speed that is far beyond the radio transmitting ability of xbee.

Here is how a servo works... it works in microseconds, not milliseconds.

#2  

Thanks DJ. I forgot the speed of the data going to the servo was so fast. Is there any other way to you can think of to run these servos.

Ron

#3  

How about a second EZB(4) located with the servos.

#4  

I may have to go that way. I was trying to see if anyone has any ideas like maybe an arduino or other communications device that they have used that works. If not I will go the second ezb. I wanted to be able to keep all the control function in one controller and wireless the communication like the ezb does.

Thanks Robot-Doc,

Ron

#5  

You could potentially use an arduino with a Bluetooth module, and then connect a BT module to one of the UARTs on the EZ-B. You would need to write an arduino sketch that receives serial commands from the EZ-B (via a script) and sends position commands to the servo. (I imagine you could also get an xbee device that accepts TTL commands. I haven't ever researched it).

Seems more complex than it is worth unless you are so tight on space that you need to use an arduino mini or something.

#6  

I really would like to go further with this idea.

I have a mini somewhere. Maybe an xbee from the EZB to the mini with a straight through sketch to drive the servos. Analog in (PWM) to PWM out.

Can I use the digital output of the EZB directly into the xbee to send out and use an xbee as an input in the arduino? Drive the servo from the arduino? I might try it, but I don't want to screw up the EZB port. (Master - EZB / Slave - Arduino) Two of my projects would use this concept.

Can anyone advise me?

Ron

#7  

You would most likely need to use the digital output of the ez-b as a serial output using the ez-b sendserial command. One xbee unit would get serial commands from the ez-b. It would send the commands from the ez-b wirelessly to the other xbee unit. The second xbee unit would be connected to something like an arduino's RX pin. The arduino device would interpret the serial string from the ez-b and perform an operation on the servo. it could just as easily be a picaxe or some other micro controller that could look at a serial string and convert an ascii character or number into a pwm signal.

#8  

I agree with Robert. On way a serial protocol will be fast enough to reliably send pwm directly, but sending a command that an arduino can interpret and then pwm should be relatively easy.

When I suggested UART I wasn't thinking about the fact you can send serial on any digital port. Only need UART if you want the arduino to communicate back to the EZ-B, for instance acknowledging receipt of a command.

Alan

#9  

Thanks to you both, One way communication is all I would need. I will begin to gather the devices.

Ron

#10  

I am VERY new in programming. Once I get the xbees I will try setting up a serial com from the computer to a arduino mini. I may ask for some advice on how to write the script to run a servo.

I thought the signal from the output port of the ezb could be read as a voltage input to the xbee. The receiver end (arduino) would then use this input to run a servo script to operate the servo. Am I right with this thought? Or is my lack of understanding means a serial communications is needed?

Additional knowledge is needed. Any place I can learn more on the programming end? (EZB Script for Dummies ) LOL ?

Ron

#11  

I gave you the very same answer two weeks ago that DJ and a few other members did. I guess you didn't believe me... I know how to do what you want to do and I did try and help you with this.... The ez script will be much easier than the arduino code... But to be honest this should still be fairly easy to do on the arduino as well... Yes, you will need to use serial communication

  1. If your using the new Com commands in ARC than I suggest using Bluetooth as your PC probably has it all ready built in. You will need a separate Bluetooth serial device (There is a Bluetooth Xbee board by the way) paired with your PC and connected to your remote arduino...

  2. Write your arduino code to receive this data sent from ARC

  3. Your code in ARC will be set to send this single byte data as a number between 1 and 180... this corresponds to your servo's full range of motion

  4. You send 90 to your remote bot and the arduino moves an attached servo to position 90....

If you need to control a second servo send an identifier first (as a single byte too) telling the arduino which servo to move... So you send the identifier like "L" for left and then send the position (90)... the arduino knows now to move the left servo to 90.... same for the other servo but your identifier would be "R" instead...

An example ez script movement command would be...



#from the pc com port (Bluetooth com port)
ComWrite("Com1", "L",90 )
# or from the ezb4 digital pin 0
SendSerial(D0,"L",90) #move the left servo to 90

#12  

Thanks Richard, I just got back from a trip and started on this idea. I was asked to help with a Halloween project with remote servos. I guess this concept will work the same way as the minion one we discussed before I left. Thanks for the help and the code. I will let you know how I make out as the parts come in. Once we build the Halloween layout I will get some pictures and maybe a video.

Ron

#13  

No problem... there is obviously a bit more needed to the above script, but basically what I gave you could work as your movement command...

PRO
Synthiam
#14  

Andy, there's a secret pricing change in our entire store happening next week. I would recommend holding out on fighting with arduino and simply purchasing an additional ezb. The time and hardware costs that it will take you to program arduino with xbee modules will be much higher than the cost of an ezb, which includes the wifi, servo controls, software, etc....

Other than controlling a neo pixel ring, I have no clue why anyone would own an arduino over ezb for anything robotic related. An arduino is a closed loop system. Meaning it's good at running a short loop repeatedly with borderline acceptable performance to do a single task. Essentially, it's good at flashing LEDs or something in a loop while your ezb does real robot stuff. Don't get me wrong, arduino has its place with localized processes, but it shouldn't be considered for applications like this.

Specifically servo control / it's quite terrible at that.

For the hardware and time cost... Wait for the new prices and purchase another ezb:) save yourself the headache. Fact is, if you spent time and money on the arduino route, you'd be circling around back to ezrobot once your hair turned grey or pulled it all out:D haha

#15  

A really "off the wall" idea! Hack a cheap RC transmitter like this one.http://www.hobbyking.com/hobbyking/store/_8338__Hobby_King_2_4Ghz_4Ch_Tx_Rx_V2_Mode_2.html

User-inserted image

Remove the pc board from the transmitter, connect the EZ-B power and ground, then take two of the stick pots, remove the center wires and connect them to 2 analog ports of EZ-B. Write the EZ-B scripts to control your device.

Put the receiver in the remote device and hook up the servos.

#16  

@DJ... It's not much of a secret since you just told us... LOL...

@Andy Roid..... DJ has a point.... If you can figure out how to get an ezb onboard your Minions all your complex problems would be solved.... No need to fumble with separate wireless setup, don't have to worry about complicated arduino coding (it's C++ by the way) and best of all you have 100% of the ezb capabilities onboard now.... Just a thought, but maybe you can strap the ezb's on the minion's back to make them look like they are just wearing backpacks....?

#17  

I really didn't want to go the arduino route. I am VERY happy using the EZB and realize the great abilities of the unit. The size is my only problem.

DJ, thanks for the tip. I will be watching for the "secret" next week and will be putting in my order. By the way,,, LOL,,, my hair has gone gray already..

The EZB is the way I want to go. The Halloween project will use two units, one new and one from my "Lilian" robot. She will be quiet those two weeks in October. The additional unit with base will run the remote servos and now we can add more to the stand alone area using the additional I/O and features.

Thanks to All for the options and help.

Ron

P.S. Where can I get a plug for the power connector on the back of the EZB. ((not the base ) I rather not use the power shell)

#18  

I agree the easiest route is with two ez-b units. The most expensive part of alternative approaches is usually the radio modules. Xbee units are not cheap and if you already have them that is most of the expense part. If you have an arduino and know how to program it the code to control a servo with serial commands is not rocket science, although it would take a bit of work. In reality programming is not even necessary if you don't mind spending around $20. Pololu makes a servo controller that can be configured to take serial command and control a servo. It is a six-channel Micro Maestro . The coding on the ez-b side to use the micro maestro is a bit of work, but very doable. You will most likely be happiest with two ez-b though. I am also looking forward to any deals that may be coming.