|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: non-'FRC legal' control systems?
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.
Code:
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
}
|
|
#2
|
|||||
|
|||||
|
Re: non-'FRC legal' control systems?
Quote:
|
|
#3
|
||||
|
||||
|
Re: non-'FRC legal' control systems?
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.
![]() |
|
#4
|
||||
|
||||
|
Re: non-'FRC legal' control systems?
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| diversified systems at FRC Kickoff-NH | www.divsys.com | General Forum | 1 | 02-01-2008 19:34 |
| Motor Control Systems | Astronouth7303 | Programming | 3 | 05-04-2005 19:35 |
| Control Systems | dbeck103 | General Forum | 2 | 30-09-2003 12:49 |
| Control Systems | archiver | 2000 | 1 | 23-06-2002 22:15 |
| It's Raining Control Systems | CaptainPlaid | Technical Discussion | 6 | 24-03-2002 15:32 |