|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|
This year we were only able to use usb-hid joysticks attached to the DS, (as well as the 8 io and 4 analog). but my team would like to make our own pseudo joystick, using a microcontroller like an arduino. Would a usb-serial device (an FTDI chip) be able to be used on the driver station?
or would i have to do something like AvrUsb on the mcu? ![]() |
|
#2
|
||||
|
||||
|
Re: Driver Station Usb
[Explanation of USB device classes]
The USB specification contains several predefined "classes" of devices, each of which has a corresponding protocol of commands that are sent between the USB host (in this case the DS) and the USB device (the joystick). HID (Human Interface Device) is one such device class, CDC (Communication Device Class, the class most commonly used for USB-serial devices like FTDI chips) is another. These classes allow USB hosts to use generic drivers for devices that are connected to them, instead of requiring a driver for each specific device. The designers of the FIRST control system like this because it means that they only need one driver to be able to interface with almost every USB joystick (there are some exceptions, such as the Xbox controllers, which have been noted previously). Because each device class has its own unique set of commands, a device that does not implement the HID class will not be able to work as a joystick. It will not be identified to the host as a HID device, and even if the host could be tricked somehow, the device would not know how to respond to the commands being sent. As a side note, the USB commands are also at a lower level than the serial data sent through a USB-serial device, which is itself encapsulated in USB data packets, so it's not simply a matter of sending the right serial data over a USB-serial device. [What your microcontroller needs to do] In order to be used as a USB HID device, your microcontroller will either have to be connected 1) to another chip that formats the data into the format of HID packets, such as maybe taking apart an old joystick and wiring the various buttons and potentiometers to digital and analog outputs, respectively, on your microcontroller, or 2) directly to the USB bus, such as in the AVR USB design. [My recommendations] I do not have any experience with AVR USB, and if they already have code that implements the right sections of the HID class, that could be a very viable method. However, I have made attempts before to implement USB on other devices, and while it is possible, it's not fun to wade through the specification documents. If you use a microcontroller with digital and analog outputs, another option instead of wiring it to an old joystick is to simply wire it into the exposed analog and digital input headers on the side of the DS. This is what most teams use when adding their own custom controls. Good luck, --Ryan Last edited by RyanCahoon : 18-07-2009 at 07:19. |
|
#3
|
|||||
|
|||||
|
Re: Driver Station Usb
I would be very surprised if we have the same drivers station next year. So who knows what input will be avaliable.
|
|
#4
|
|
Re: Driver Station Usb
is it possible to bitbang the io pins on the ds fast enough for ttl level serial?
we are building a touchscreen inteface to the driver station for autonomous mode, with liquidware's touchshield slide. if we could use the io pins then that could free up a lot of programming time |
|
#5
|
|||
|
|||
|
Re: Driver Station Usb
QFT
FTDI isn't the easiest way to go about this - http://www.ftdichip.com/Support/Know...icesappear.htm Many microcontrollers will have demo code that will do what you want. I know firsthand that code for PSoCs and PICs are available, and I'd be surprised if any USB-device capable uP didn't have it. |
|
#6
|
||||
|
||||
|
Re: Driver Station Usb
Quote:
So in short, while it is possible, I believe you would be better off mapping the analog and digital inputs to the controls exposed on the touch screen, perhaps using digital potentiometers to output analog values if necessary. What kind of interface are you trying to develop on the touchscreen? --Ryan Last edited by RyanCahoon : 19-07-2009 at 01:01. |
|
#7
|
|
Re: Driver Station Usb
The screen would be used to determine the position and place the robot should travel to during the auto period. the screen would be powered before the match and the position would be saved to eeprom, so on the next power up it would report to the crio a cartesian point (or points if possible) with rotation. so it would have to be read before the robot is enabled
|
|
#8
|
||||
|
||||
|
Re: Driver Station Usb
Quote:
As a side note, for other suggestions on how to rapidly set autonomous mode parameters, see this thread. Of course. none of this applies if you need this functionality during matches as well. --Ryan |
|
#9
|
|
Re: Driver Station Usb
Though, im sure if i got it working for auto, then they'd want to use it for an operator control
, so an interface to the DS would be best.what baud could be obtained through usb? HID is for the most part uni-directional, so an output pin could be used to signal auto / tele modes. and have it dynamically update the controls. Do you know of any cheap ethernet controllers for mcus? your last point could make it into a small dashborad Telemetry, speed and other statuses could be displayed, and have it for times not in a comp ![]() |
|
#10
|
||||
|
||||
|
Re: Driver Station Usb
Quote:
Quote:
One thing to consider though is that FIRST has been very particular in the past about what types of devices can plug into the control inputs of the DS/OI. They might not allow your interface to be both connected as a dashboard and as a controller. <Insert disclaimer that I've never been a robot inspector and that rules are subject to change without warning from year to year anyway> Even USB 1 can get 12 Mbsp, but since you're limited to packing your data into the amount of data that the joystick would be sending, I doubt you'll be able to get any more data through the USB ports than you will through the exposed analog and digital inputs. It's just a matter of how the input data is being sent to the processor in the DS; it all eventually gets packed into the data packets that only get sent at 50Hz. --Ryan |
|
#11
|
|
Re: Driver Station Usb
Well, does the lantronix xport have an output saying if an ethernet cord is plugged in?
if so, then the board could dedicate all processing time to the parsing of dashboard data and ignore the touchscreen (it would still get power from the DS though and the oled screen would be showing the data) or it could send the commands for auto then switch to a dashboard display and disable the touchscreen, the dashboard data has the game mode in it right? |
|
#12
|
||||
|
||||
|
Re: Driver Station Usb
Quote:
Quote:
Just to clarify, though, you won't be able to send data back to the robot through the dashboard ethernet port (based on this year's rules/field setup), as the DS blocks all traffic besides the dashboard packets coming from the robot when it is in competition mode. I would also warn against trying to draw power from the DS. According to the information provided in the control system manual, the DS is only rated for 900 mA, total system current. I don't know what the exact specification on the exposed power pins are, but I'd be surprised if you could draw much more than 150 mA, since they're intended to be used primarily for pullup sources or similar. That may be enough to power a microcontroller by itself, but the driver for your display alone is going to draw considerably more than that. --Ryan |
|
#13
|
|||
|
Re: Driver Station Usb
Quote:
Quote:
Quote:
|
|
#14
|
||||
|
||||
|
Re: Driver Station Usb
Quote:
I did a little more looking, and I stand corrected on my previous assumption: Quote:
![]() Note, however, that the wall wart supplied in the KoP is only rated for 1000mA, so you'll have to make other arrangements to supply the needed power while developing the system. --Ryan |
|
#15
|
|
Re: Driver Station Usb
well this is the screen that will be used
http://www.liquidware.com/shop/show/...chShield+Slide i don't know its power usage, (plus an xport ethernet, and arduino (atmega 168)), hopefully it not going to be too much |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Driver Station S.O.S. | M. Gildner | Electrical | 15 | 28-11-2009 19:35 |
| Driver Station | dnrobotics11 | Control System | 2 | 18-02-2009 21:35 |
| driver station does not recognize usb 3 or 4... | aksharma | Technical Discussion | 0 | 07-02-2009 12:57 |
| Driver station only regognizes USB 1 and 2 | cvxdes | Programming | 14 | 05-02-2009 14:40 |