View Full Version : Interfacing the Digital Sidecar
09-20-2011, 03:26 PM
I've been working with some folks to adapt our old robots to run with an Arduino. We've got all the circuits we need up and running for our old Breakaway robot and that finally is going well.
The problem is, most of the interfacing resembles a rat's nest /wire maze / nightmare on a couple of plug in breadboards. Works ok, but heaven help us if it takes a good hit.
I'd like like to be able to come up with an interface, whether it's a DB37 pin breakout interface board, a homemade soldered prototype board, or a custom made shield for the Arduino.
Ideally, you unplug the DB37 from the cRIO, plug it into the interface, code the appropriate Arduino software and go.
I've looked at the digital sidecar schematic and MY impression, is, if I pull the right lines out, I can get them attached to the Arduino. There does not seem to be anything magical, and in fact using the DSC's power capability is a plus.
Ah, but I've messed around with enough stuff to realize I don't always know what's going on, or, things are never quite what they seem.
Can anyone confirm I can accomplish what I want to do, in other words through some mechanism, couple the DSC directly to the Arduino?
09-20-2011, 04:36 PM
I can't confirm it for sure, but I'm thinking along the same lines as you. Looking at the pinout for the DB37, it should be as simple as connecting the right pins on the arduino to the DB37 cable. I'd like to see how you do with this.
09-20-2011, 04:56 PM
Everything you need _should_ be on the schematic. If it isn't, PM me and I'll try to add it.
The fast stuff is mostly just direct one-to-one pass through (sometimes buffered), and the slow stuff is a pretty standard shift register.
09-22-2011, 05:13 PM
Was that a "yes" its possible, or a "no" it's not.
The problem here is, were I fully competent to interpret the schematic, I would not be posting. Since I'm posting, I'm kind of asking for help/guidance.
It seems as if you are associated with the device since you can change the schematic......so again....straightforward....or don't go there?
09-22-2011, 06:12 PM
It is certainly possible. All of the GPIO lines are simply pulled high within the DSC (the same as on board the Arduino) and the PWM lines are buffered. Basically, you can ignore all that and pretend that they are all direct connections. The relay outputs are controlled by a serial communication line, if you want to use those, you will have to figure out the serial protocol.
09-22-2011, 08:05 PM
That's what I was after. I suppose I could just use GPIO lines to control relays or transistor circuits to run things like the compressor till I understand the serial part of things.
Is there anything you can point me to, to get a better understanding of the serial protocol?
As I said originally, I'd love to just gin up a specialized Arduino shield that makes cRIO swapping just a take out/plug in kind of situation.
09-22-2011, 08:09 PM
It is totally possible. I think it could be an excellent project for a group of students, because it is readily divided up into separate pieces that allow for quick "first-success".
First, tie all the ground lines to your arduino. Pull 5V from the DSC to power the arduino - there isn't a line for this on the 37pin connector, so pull it from one of the spare 5V pins (there are tons of them).
I would not recommend having the arduino connected to a computer and the robot at the same time. Arduinos aren't well protected, and it is easy for a student to accidentally dump 12V across something that doesn't want it.
Next, enable /Output_EN by pulling it low with a pin on the arduino. This enables/disables all of the pins that make things move.
Then try sending some PWM signals. There are lots of threads on this board about the times for these. Quick summary - 1.5 ms for stop. Jaguars are .66ms for full reverse, 2.33ms for full forward. Servos and Victors are 1ms and 2ms. Off period is pretty forgiving.
Then try using specific sensors with the GPIO. This will be different per sensor.
Save the shift registers for last. These control the relay outputs and some other (largely useless for your purposes) pins.
I wouldn't bother with routing I2C through the DSC. Just do it raw through GPIO.
PS: This is a bit embarrassing, but I just saw that the 2010 pdf export missed one of the pages of the schematic! The Altium source files include it, but somehow it got lost in translation. The 2009 pdf has it : http://usfirst.org/uploadedFiles/DSC%20Schematic%20v7.pdf
09-22-2011, 09:38 PM
Perfect! This is where I was hoping to go. I had been running the Arduino off the Power Distribution Board (PDB) line that went to our DSC but you're right, I can pull it off the DSC when I connect it back up.
We actually have been thinking of making it a fall robotics project for our students. I just wanted to make sure it's possible, and that I understood enough about it to actually mentor the project.
I think the PWM situation is in hand. I've found that you can directly use the PWM outputs from the Arduino to the jags and it works fine (thanks for those of you who provided suggestions for that work!!!). And the GPIO lines can also directly activate spike relay's. The only problem I've had so far is having to run the GPIO output to a 2222 transistor to run our 12V pneumatic valves or a relay to run the 24V ones.
I did not implement any sensors (we were just using the old Breakaway robot for driver training), and this is another big step for me.
Thanks again folks,
01-15-2013, 09:15 AM
It's all done ..
vBulletin® v3.6.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.