How would I interface a flash drive to the RC?

I know it’s a crazy idea, but I’m getting frustrated about having bugs on the field that don’t show their ugly faces in testing, and I believe a thumbdrive counts as a COTS item. I would like to save a log file to the drive; saving the printfs maybe for the entire match. And I’m interested in how the transitions happen at the beginning of the match (is it Disabled -> Auton -> human control or is it Disabled and Auton -> Auton -> human control). I would like to log all that data to a flash drive. Now, I have no idea how to do that. I only got the idea because it is a universal serial bus drive and therefore should work…somehow…

If anyone has any ideas on how to do this, or even any hints, I would be most grateful to hear them.

Thanks
JBot

You could never interface a USB thumbdrive directly to the RC, but you COULD write some software for your PC and run it off the dashboard port. You’d probably end up writing a terminal application that saves its output into a file

I’m not a programmer, so I wouldn’t be positive about this, but I believe that 116 used a laptop connected to the Operator Interface to log data that the robot transmitted.

I have been working on a project similar to what you want. I plan have an external PIC that will log all sort of information to a microSD card which you could then put into your computer and read the log of.

That’s the closest I was thinking of. I need to get myself a pic board…will probably do so tomorrow. That would be really nice. I would think the hardest part would be the filesystem. I might get lazy and just record raw data to it and make my own program for the PC to read it; I don’t want to have to deal with FAT.

JBot

Gumstix (gumstixes? stixi?) have USB and serial support. I imagine one could read data sent to it from one of the RC’s serial ports and then write it to a flash drive.

I highly would recommend simply doing it using the Dashboard port on the OI. It’s really an underutilized port, and if you search the whitepapers section, most of the work is already done for you. You’d have the data get recorded straight to your laptop, and then you can just parse it however you feel.

And it doesn’t count towards your weight limit or total cost :wink:

Theres alot of info about your bot that that doesnt tell you. All your sensors that you have on your robot. None of that data gets outputted to the Dashboard.

Every single PWM variable gets sent back to the Dashboard. Are you using every single PWM variable to drive motors? There’s a whole bunch of bytes you can use to send data back, on top of I think four bytes that it gives you already specifically for dashboard information.

I didnt even think about that. However that does limit how much information you could get. The more I think about it though I cant see a reason for needing that much so putting it on the dashboard port would also work.

Dashboard? Pfft.

Why take the easy road, when you get to do all the fun engineering on the hard one?

Logging serial data to a CF card seems like a fun project. It’d be a pretty universal and useful thing too, I’d think.

I think if it uses the dashboard port that will be more user freindly. So once I finish the design it will be something thats easy and more people will want to try. However some new PICs I ordered are still in Asia and the rest of the cool stuff I ordered is backordered. Hopefully though ill have a working demo up soon.

look at these


http://chipdos.com/

hope this helps

An offboard PIC or AVR with an attached dataflash module could easily do it, AVRs can be entirely self-contained so all you’d need is a serial connector, the AVR and the flash memory, I’m not sure if you can draw enough power right off the serial port, but you should be able to draw from a few PWMs to power it, it’d be a nice project, AVRs can be programmed in assembly, C, BASIC and a few other languages.

If you want to roll your own application/software, www.microchip.com sells a USB evaluation board:

DM163025 - PICDEM FS USB

and the MMC/SD daughter board that can be used with the above board.

AC164122 - PICtail Daughter Board for SD & MMC Cards

I’ve had both for almost a year, but not enough time to test the data logging software out.

A pre-canned serial data logger is also available like the Acumen DataBridge SDR-OEM-SF. It records all serial port traffic onto SD but is pricey.

I’d like a totally passive data logger that I don’t have to send commands to in order to get it to log/save the data.

For debugging purposes I need not only all the raw sensor data and outputs, but intermediate steps of the code in processing the data. Its usually one of the intermediate steps that is messing up and causing problems.

Bud

The PICDEM board is like $60 and then i dont kno what the AC164122 costs. I have the designs mostly finished. The final cost should be about $30. Ill have code, design all that posted for free. And ill probably sell them at the value of the raw materials since I have some exra parts laying around.

OK, I’ll have to give some of these solutions a try.

Good point about the weight issues. I know every year we are at least .2lbs overweight…a little PIC board and flash drive are surely seen as expendable and will be ripped off (“Jake, are you sure we need that?”).

I’ll have to look at how big our EEPROM is; I might be able to just use that–even though using a PIC with an SD card or CF would be the funnest (wow, spell check isn’t whining about the word “funnest”) project.

Thanks for all your suggestions,
JBot

If you run it off teh dashboard port then it wount be any weight to the robot.

Actually, we (Cross the road electronics) have a device that will allow reading and writing to/from an SD card or USB thumb drive. Powered by the same technology in USB-Chicklet, it interfaces to the SD/USB device and provides a gateway to serial rs232 port (program port) on the RC. Not only will you be able to log data into FAT32 files, but will also be able to script autonomous and PID gain control. The script can be written on any laptop with a card reader or USB port. The device is called Chicken-AID (Autonomous Interface Device). Chicken-AID will require an RC driver similar to the camera but no where near as complicated.

Omar Zrien
Chief Software Engineer
Cross The Road Electronics
Team 217, The Thunder Chickens

It says it will be release November 06 but i dont see any pictures or prices for it on your website.