non-'FRC legal' control systems?

Before I get any flak for this – no, 675 isn’t planning on building our own control system.

My senior project involves motors and I’m already somewhat familiar with robot control systems, but if I can’t get permission to use an old IFI FRC control system for my project, I’ll need to figure out how to take the values from the two pots in a joystick and turn them into PWM signals. And as cheaply as possible.

Essentially, I need to build a system that will be light, cheap, effective and robust for use in a wheelchair I am designing and building that is based off of some of 675’s previous chassis designs.

so… potentiometer value to PWM, so I can feed it into a vic or jag into a motor. Suggestions, other than FRC control systems?

I would just use the IFI Control System or the NI cRIO, but they’re both quite expensive, so…

Try some of these:

http://www.robotmarketplace.com/products/electronics_main.html
http://www.robotmarketplace.com/products/rc_gear_main.html

Is using a PC an option? There are clever ways to do this using your parallel port to generate the PWM signal.

new vex transmitters sell on epay for about 30 bucks plus shipping, you can tether it to a signal splitter (another 20 bucks plus shipping from vexrobotics) and get 6 pwm outputs from two joysticks and four buttons…I think that’s how it works…

Keep in mind that the PWM signal used by our speed controllers (Victors/Jaguars) is taken from the R/C world for controlling servos. Sounds like what you want is an R/C “Servo Tester”.

You can buy them premade reasonably cheap: http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXVK79 or you can make your own.

Just Google “Servo Tester” and you will find tons of links to circuits, plans, kits, and pre made units.

Another option would be to look somewhere like www.Parallax.com. They sell various borads and microcontrollers that are designed to drive servos (PWM signals) that you might find useful. A Board of Education and a Basic Stamp might be just what you are looking for or maybe a serial or USB servo controller might could be used to control your motors via a laptop?

Check places like Trossen Robotics and any of the other robotics related suppliers. They all have neat stuff that will generate the PWM signals you require.

Simply put: “Arduino”

$35 and you are good to go. All you need to do then is learn a little coding for the FREE Development environment. That’s right, FREE!!:wink:

The code to convert analog to PWM is EASY!!
10 bit A/D gives values from 0 -1024.

Set the dig out high, wait 1 millisecond + wait a number of microseconds equal to the digital value read from the pot, set the dig out low. Repeat every 20 milliseconds.

This is just a rough outline and may require a little tweaking, but it works. I know, I already did it.

Can’t you just use a Vex controller?

I also have an Arduino and some Zigbee modules, although my course load has prevented me from doing anything really serious with them yet.

I think the cheapest way this could be done would be using a 555 timer, I found some instructions here. However, using the arduino would give you more options that may come in handy when you want to do more than control the motors directly from the potentiometers.

I was thinking Arduino because when I’m done with my senior project, I can cannibalize it and use the Arduino for come other really cool stuff.

What shield or module would I use to be able to utilize two PWM outputs?

Actually, I have a friend who’s done work with pwm output and an arduino (he made a two wheeled ‘bot’ that auto-balanced… think segway except smaller). I could probably ask him.

Any arduino with the mega168 chip has hardware support for six pwm signals. The older models with a mega8 will have hardware support for three pwm signals. All 5v arduino’s should meet your needs as far as I know. A shield will not be necessary unless you would like to bring the pwm outputs to a convenient 3 pin header to plug a pwm cable into.

Seeing as how I’m a complete knob when it comes to electronics, yes, I would like a convenient three pin header for a PWM cable. I’ll probably be feeding two PWM outputs to two Victor 884s, so.

How hard is it to program the Arduino for this? Taking the joystick input, telling the Arduino what to do with it, then outputting it to PWM? If it’s too difficult (keep in mind, I’m seriously not that good with electronics. I can assemble circuits but I couldn’t tell you what they do, and basic HTML is probably the extent of my coding knowledge), I could just get the Vex Controller and also a Vex signal splitter. No programming required. A bit more expensive (well, close to three times as much actually).

If the Arduino is pretty simple to assemble and program for such a simple application, though, I’d rather use that.

so, CD, does the simplicity of the Vex system outweigh the cost of the Arduino? Especially for somebody as ham-fisted as me?

I haven’t worked much with Arduino stuff, but I’ve got a punch of PIC stuff I play around with. I’ve got a basic understanding of C (still can’t wrap my head around pointers) and I’ve gotten little robots driving around under the control of two 100K Ohm linear pots. Joystick would be the same thing, if you used a Gameport Joystick (not to mention, Goodwill/Salvation Army has them for like $2). So, it’s very doable.

I think the arduino is easy enough for beginers, but its also expandable for more complex things. I took this example right from arduino’s reference page. This example does exactly what i think your trying to do, read a pot and generate a pwm. I remember seeing a shield and an arduino clone that provided the standard 3 pin header like the ones found in the control system, but I don’t know where to find them.

int ledPin = 9;      // LED connected to digital pin 9
int analogPin = 3;   // potentiometer connected to analog pin 3
int val = 0;         // variable to store the read value

void setup()
{
  pinMode(ledPin, OUTPUT);   // sets the pin as output
}

void loop()
{
  val = analogRead(analogPin);   // read the input pin
  analogWrite(ledPin, val / 4);  // analogRead values go from 0 to 1023, analogWrite values from 0 to 255
}

Motorshield v3 is what I was looking at.

The motor shield is for small DC motors, not for ones found in the wheelchair you mentioned in your original post. You will need a bigger speed controller to do that, like the victor or jaguar you also mentioned. The arduino by itself can generate the pwm signals to feed the speed controller of your choice. The roboduino is an arduino compatible board that already has headers for pwm cables. With a normal arduino board, this is basically how it would need to be plugged in. A fuse would be a nice addition.
http://img185.imageshack.us/img185/961/victormc4.png

You need to learn a few things about the Arduino before you jump in. But don’t sweat it, it’s all easy stuff.
One thing that you will need to understand is that the predefined PWM outputs on the Arduino WILL NOT work for driving RC type speed controllers, ie. Victors or Jaguars. They are more fitted for adjusting the brightness of lamps and/or LEDs etc. You will need to generate your own “PWM” pulse train. The code I mentioned in my previous post is much more suited for the purpose of RC speed controllers.

Don’t be afraid to learn the Arduino programing environment. It is easy and very user friendly. There are tons of pages and sites on the Internet dedicated to the Arduino. You can learn more in a few hours than you might have thought possible.