![]() |
Controlling robot with arduino
Hi,
I am trying to control one of our old robots with arduino. But I really don't know where to begin. Arduino UNO has 6 PWM pins to which I can connect the victors. But I am not sure how I can control with joysticks. Could you please give me some clue? |
Re: Controlling robot with arduino
It is doable, but requires much more effort than its worth.
First, you'd need to get an Arduino Ethernet Shield to connect the Arduino to an ip network. You'd then need to write a client application that controls the robot, along with sending the joystick button states, axis values, and other data to the arduino, over the network. (Not as easy as it sounds) You'd also need to write a program for the arduino that SAFELY gets the values from the computer (joystick and control mode: disabled or enabled), and uses them to set the values of victors/spikes/solenoids/etc... Be sure to implement important safety features like having the robot automatically disable when communication is lost, not driving out of control, etc. It's a long process, and can be a great learning experience. IF you're looking for a quick and easy way to get an old robot running, this is not the way to do it. Feel free to contact me if you want more details or have any questions. |
Re: Controlling robot with arduino
First off, this is a great project! I would definitely suggest you do this. It's not anything that hasn't been done before so you should find plenty of information in a quick Google search (remember there is nothing really different between the FRC robot and a robot someone made in their workshop using RC car components - the building blocks are the same. You may want to look at ArduRover and ArduPilot.
There are actually some products readily available to help, such as this shield that interfaces with the digital sidecar <http://www.andymark.com/product-p/am-2258.htm> I assume you will simply be replicating what the FRC control system does on this old robot, so I would suggest to first list out all the motors, motor controllers, sensors, spike relays and the method which they are controlled in software (PID loop, PWM, Meccanum drive, tank drive, etc.) This will help you build a plan for the pins and the coding. From there on out, you will be tackling each subsystem: drive, manipulator/shooter/scoring/collecting device, and any other features of the robot in code. I'd focus on getting it controlled one motor controller at a time and work up to more complex loops as your skill increases. Are you using pneumatics? |
Re: Controlling robot with arduino
An Arduino Motor Shield will help, too.
Arduino site: http://arduino.cc/en/Main/ArduinoMotorShieldR3 Ladyada tutorial: http://www.ladyada.net/make/mshield/ Sparkfun's version: https://www.sparkfun.com/products/9815 |
Re: Controlling robot with arduino
This is not a hard challenge! Check out our RobotOpen driver station app...
www.robotopen.biz Our HTML5 app will allow you to read USB gamepads and directly control your Arduino board. It offers two way communications, data logging, live parameters and a host of other features. Free open-source download. We have shields as well if you'd like to interface with an existing digital sidecar or pneumatics bumper. |
Re: Controlling robot with arduino
Quote:
|
Re: Controlling robot with arduino
Quote:
|
Re: Controlling robot with arduino
Quote:
|
Re: Controlling robot with arduino
There is a USB Host shield for the Arduino. There are 3rd party library's available that would allow a wireless PlayStation 3 controler to work with the arduino. This would give a minimal blue tooth connection to the arduino for control.
|
Re: Controlling robot with arduino
Quote:
|
Re: Controlling robot with arduino
Like I stated above, you only need our RobotOpen Control Shield if you want to continue using your digital Sidecar.
Some features will be lost of course, but in general our driver station app will perform as expected using just an Ethernet enabled Arduino. |
Re: Controlling robot with arduino
You can do this cheaply and easily... you just have to think outside the cRio/FRC "box" a bit. I currently have a small "fleet" of vehicles running using Victor 888 controllers and CIM motors attached to Arduino Unos. It works great, and is quite easy to do... I've etched custom shields to attach the speed control pins and joystick (or bluetooth) connections, but you could do this easily enough using a breadboard, and then solder it up onto some perfboard/protoboard. I did have to recalibrate the Victors, as the Arduino was giving me slightly longer pulses than expected, but that is really easy to do... just push the "calibration" button on the Victor and move the joystick full circle to give "max" and "min" signals to the Victor, then let go of the stick.
Here's some code for controlling Victors on Pin8 and Pin9 using "joystick" mode, from a joystick connected to A2 and A3. The code will also print the values to your serial monitor. The downside is that it requires a joystick to be wired to your uno/robot at all times. (Which, in the application we have, where the driver is sitting on the vehicle... works great!) Code:
#include <Servo.h> //include the Servo library for controlling the Victor speed controlsBy the way, you can get BlueBots Pro for $1.65... definitely worth it to support the developer considering that you'll replace about $1,000 of robot control equipment with a $30 Arduino, $10 bluetooth dongle and an Android phone that you may already own. Code:
#include <Servo.h>Jason |
Re: Controlling robot with arduino
Highly recommend the Romeo robotic controller board. It supports XBee devices, so all you need is this device as a remote controller. All up, Romeo, controller, 2 - Xbees and battery sets will be $175.
|
Re: Controlling robot with arduino
6 weeks ago I saw AndyMark had the Arduino kit for $130 and now they have sold out. Could this possibly replace the CRio?
|
Re: Controlling robot with arduino
I have just purchase one of this arduino from AnyMark and I have done all the programming and I am ready to test it on a robot that we have design and pour our personal money. My question is how can you attached a solenoid? Would you hook it on the relay ports on the sidecard? or would you use a spike to operate the solenid, we are using 12V solenoids. Also I though about using this cheap relays that we use at my school for simple projects but the coil is rated at 12VDC as well and as far as I know the sidecard can put out a max of 5V.
|
| All times are GMT -5. The time now is 04:57. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi