Shop OBEX P1 Docs P2 Docs Learn Events
potentiometer throttle - Page 2 — Parallax Forums

potentiometer throttle

2»

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 18:42
    Can the Arduino read the PS/2 pedals? Since you're already using the Arduino, you may not need a Propeller.

    I searched for "Arduino PS/2 keyboard" on Google and got lots of information about interfacing a PS/2 keyboard to an Arduino. I'd think you could modify the code to read from your pedals.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-03 19:09
    Except that defeats the purpose of the existing code, the steering wheel with an Android-powered TI AM33X, and the robots setup entirely. The way it works is the signal originates at the pedals, goes to the steering wheel, which then sends it to the robots router, which goes to the Arduino, after that it goes on to the Digital Side Card, through the PWM cable to the speed controllers, and finally to the motors. So maybe the Propeller is necessary?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 19:32
    FRC2370 wrote: »
    Except that defeats the purpose of the existing code, the steering wheel with an Android-powered TI AM33X, and the robots setup entirely. The way it works is the signal originates at the pedals, goes to the steering wheel, which then sends it to the robots router, which goes to the Arduino, after that it goes on to the Digital Side Card, through the PWM cable to the speed controllers, and finally to the motors. So maybe the Propeller is necessary?

    You lost me in all that.

    I'm assuming your Android computer can receive FTDI or comparable serial to USB data. If so, there are lots of microcontrollers that should be able to convert the PS/2 data to serial data that the computer should be able to receive. I suggested the Propeller since it's the microcontroller I'm the most familiar with. If you're more familiar with the Arduino, then it might be easier for you to use an Arduino to do the conversion.

    Technically, the code I posted above could be used to get PS/2 data to a PC. I doubt the code for an Arduino would be much more complicated than the above Propeller code. The PC would still need to know what to do with the data once it was received. As I mentioned before, it may be useful for the microcontroller to add some formatting to make it easier on the PC side to interpret what it's receiving.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-03 19:35
    As far as i know from what I heard from the RobotOpen (people who developed the code and PC/Android application) tech service people, the driver station (the app that controls the robot) needs a USB- type device. It only reads from USB :P
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 20:05
    I haven't tried to use an Arduino or a Propeller with an Android system. I don't know if an Android PC can interface with the FTDI chip (converts the serial signal to USB) or not. I thought it could.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-03 20:06
    Well how could we test it easily?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 20:12
    FRC2370 wrote: »
    Well how could we test it easily?

    Use your Arduino to send some serial data to the Android for the RobotOpen program to receive.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-03 20:14
    Like serial data from the pedals? or am i misinterpreting?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 20:33
    FRC2370 wrote: »
    Like serial data from the pedals? or am i misinterpreting?

    I have no idea what kind of control you have over the RobotOpen program. Many PC development tools allow you to receive serial data through an USB connection. I don't know if RobotOpen will allow custom devices or not. I was thinking you could send data from the Arduino that would mimic data from one of RobotOpen's possible input devices.

    If RobotOpen doesn't allow you to use custom input devices, then I doubt the PS/2 to USB idea will work.

    I was hoping you could configure RobotOpen to receive from a custom input device and then have the Arduino send data as if it produced by this input device. For example, you could have the Arduino send joystick data if you knew what the joystick data looked like.

    When I'm working on interfacing a Propeller with a piece of lab equipment, I often use a second Propeller to send data in the same format as the lab equipment to aid in developing the interface program. So if you know how the data from any of your input devices is formated, you could send data from the Arduino in this same format for your test.
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-03 20:37
    Well if this doesn't work, could it work if I found a set of pedals that connect via USB primarily?
  • SRLMSRLM Posts: 5,045
    edited 2013-01-03 20:45
    Your FRC system is able to receive serial data from an external device. So, you can have an Arduino or Propeller read the pedals, encode the value as a serial string, and transmit it to the FRC system. From there you can process it and output it to the motors.

    I'd open up the pedals, and see how they work. If it turns out that they have an analog signal internally then I'd just hook that up directly to the FRC system.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-01-03 21:05
    I just looked up RobotOpen. As SRLM says, there should be a way of interfacing the pedals with your system. I didn't see anything about pedals listed in the protocol sheet I saw but I imagine with so many ways the device can receive data, there should be a way getting data from the pedals to your controller.

    That said, I'm not sure how to go about doing this.

    If there isn't a specific "pedal" code, you could send the data as a joystick parameter and hopefully use that parameter to control your throttle. I assume it's common to use one of the joysticks for throttle control?
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-04 19:36
    Yes. The code loaded on the robot right now is set so the two joysticks on a Logitech F310 Gamepad control the left and right motors
  • FRC2370FRC2370 Posts: 128
    edited 2013-01-06 20:11
    Just got the official message from a Fanatec rep, the CSR pedals use analog potentiometers to read the data. I think the Propeller PS/2 - USB converter is sounding pretty good at this point...
Sign In or Register to comment.