
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
Thanks to you both, One way communication is all I would need. I will begin to gather the devices.
Ron
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
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
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...
Write your arduino code to receive this data sent from ARC
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
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...
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
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...
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
haha
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
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.
@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....?