
PRO
Andy Roid
USA
Asked
— Edited
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
Here is how a servo works... it works in microseconds, not milliseconds.
Ron
Thanks Robot-Doc,
Ron
Seems more complex than it is worth unless you are so tight on space that you need to use an arduino mini or something.
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
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
Ron
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
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...
Code:
Ron
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
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
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.
@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....?
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)