![]() |
Use of Arduino to control a Spike Relay
We are trying to resurrect our 2010 Breakaway robot using an Arduino Mega. I've gotten the motor control in hand (solenoid PWM), and have worked out how to run the 12 V Festo values. Our Jag's and Victors are behaving themselves (although I haven't gotten everything running at once so don't know if I'm going to over load the Arduino outputs). Was playing around today with Spike Relays, they hold a lot of potential. I wrote the code to run the compressor and read the pneumatic switch and was about to run it when that little voice in my head said, "You'd better look into the amount of current that will be sourced into the PWM control port from an Arduino pin". Could not find anything on line about how much it takes to activate the Spike. Anyone know? Also, hooked the Spike power input to 12 V battery, got nice orange light, hooked white line to 5V power supply, green for go, 5V to red line red for reverse. Wonderful. So put meter in circuit and got 65 mA flowing. Way to much for Arduino. But thought I'd measure resistance and do Ohms law to check. Measure resistance from white to black...infinite???? Obviously I'm missing something. Can anyone help. Basically my question is, can the Arduino directly control the Spike using a DIO line. Thanks....
|
Re: Use of Arduino to control a Spike Relay
Quote:
Quote:
http://www.ifirobotics.com/forum/vie...bb0ac07 5720b http://www.chiefdelphi.com/forums/sh...ad.php?t=47835 |
Re: Use of Arduino to control a Spike Relay
I do understand that the Spike is not powered by a PWM signal...we just use a PWM cable and so generically refer to it as the "PWM input to the Spike"..... I realize that the black is ground, white is 5V (TTL) for forward and the red is 5V (TTL) for reverse.
I checked the references you included. My impression is that it should work, but there was one mention that the 5V source might not be able to source enough power. I'm not familiar with the 2004 EDU RC. Can you tell me how much the TTL output lines could source? |
Re: Use of Arduino to control a Spike Relay
Quote:
|
Re: Use of Arduino to control a Spike Relay
Geoff,
So I'm assuming you did not use a limiting resistor. You just connected the Arduino pin and set it high? Doc |
Re: Use of Arduino to control a Spike Relay
I just connected the Arduino digital line and ground line and set the digital line high. (I was only interested in switching the relay in one direction.)
|
Re: Use of Arduino to control a Spike Relay
The control input on the spike relay is optoisolated.
Google CNY17F for the optoisolator data sheet, your 65ma reading is correct. (I checked a spike i had on my desk and got the same thing) I would use a transistor just to be safe. |
Re: Use of Arduino to control a Spike Relay
Jet,
Yeah, that's the conclusion I've come to as well. I had hoped for a minimum of additional components and such, but I need transistors to drive the Festo's as well, so guess I'll go that route. My ideal solution is to develop an Arduino shield that I can plug the cRIO end of DB37 from the digital side car directly into, to minimize the fuss of conversion. I take heart that the new 4 slot cRIOs are cheaper...but they still toooooo expensive for a couple of old robots or playing around, and here of course I mean "serious experimentation". On the positive side, I'm having a great time with my Arduino and have found one of it's cousins, the Netduino, equally intriguing. I see a lot of home automation, hobby robotics, quadcopters and robotic arms in my future. Now if I can just get my son to work out the wireless aspects of the connection from drive station to Arduino / Netduino..... Y'all will probably see posts on that some time soon! Doc |
Re: Use of Arduino to control a Spike Relay
2 Attachment(s)
I don't know if this is authoritative, but it purports to be from the IFI Tech Support Site Administrator. The same author claimed that the EDURC IO could drive the Spike directly. |
Re: Use of Arduino to control a Spike Relay
Ether,
Thanks for your input. I have to admit I'm in a quandary. I've also seen info that says even the cRIO-DSC DIO output is no more than 2 mA. But I can't get anything that gives me that rock solid feeling. An Arduino can be had for $35-60 but I'm hesitant to just give it a shot. I'm going to get a hold of a NI tech support guy I used to interface with when I was in industry. I'll put the burden of getting the info on him. I do hope you're right since it makes the whole replacement thing much simpler. If anyone else picks any info, I'd love to hear it!!!!! Doc |
Re: Use of Arduino to control a Spike Relay
Quote:
The cRio does not drive the relays direct. That is what the digital sidecar is for. The drive circuitry and current is part of that interface. |
Re: Use of Arduino to control a Spike Relay
There are several low side or high side switch chips on the market. Check ST Micro or Infineon. You can get up to 8 outputs in a package. This is what they are designed to do. I do not know of any company making a break out or shield for them unfortunately. Note that some Arduino's are 3.3 volt devices and not all driver chips can operate at lower voltages.
|
Re: Use of Arduino to control a Spike Relay
Al,
Can you tell me then how much the relay lines from the digital side car can source? My searches have led to mentions of from 2-100 mA. And that would be from the DSC side not the cRIO. G, I'll look into those components....but I am but a poor biochemist, with little electronics training... Looking at those specs and little symbols gives me a tremendous head ache..... I never thought such a simple question could be so complicated! |
Re: Use of Arduino to control a Spike Relay
Quote:
To add to that in the past I have ran a spike connected directly to 2 DIO lines on a microchip part which could only source 20mA per line and it worked fine (back when i just assumed an optoisolator would not pull 65mA) Theres seems to be something simple were missing here that hopefully someone can explain |
Re: Use of Arduino to control a Spike Relay
Ok, I'm almost crazy enough to laugh and cry at the same time. In the following reference:
http://www.vexrobotics.com/217-0220.html They say, "It (the spike relay) can not be connected to an R/C hobby type receiver". Then lower in the specs they say, ---- "Control Signal:Hi: 3V min @ 4mA; Lo: open or ground." Surely we have one electronics expert in the forums that can wade through this mass of info and render an expert opinion?? |
Re: Use of Arduino to control a Spike Relay
Quote:
http://www.pololu.com/catalog/product/752 |
Re: Use of Arduino to control a Spike Relay
Doc,
I checked with an NI rep on this issue and although the individual outputs can handle higher current, NI recommends users stay with the 2 ma spec for source current. The IFI spec of 4 ma and 3 volts sounds just about right as minimums. Typically this will be higher current when energized from a 5 volt driver. Typically I would expect 5-10ma depending on the series resistor that IFI chose in this design. I didn't have a chance to check the higher current spec earlier but it relates to the maximum input current of an opto-isolator. Anything above that current will destroy the LED inside. According to TI, the chip maker, the relay output driver of the DSC sinks or sources up to 16ma at 5 volts. The designers of the DSC included a 680 ohm resistor in series with the output to limit the current in case of a dead short. I agree with Ether on the hobby controller PWM outputs. |
Re: Use of Arduino to control a Spike Relay
Al,
Ok, so what you are saying is that it should be ok, since the Arduino only sources 20 mA per output line. But are you saying I should use a 680 ohm resister in series on the Arduino output line going to the Spike relay. Doc |
Re: Use of Arduino to control a Spike Relay
Doc,
The series resistor on the DSC is something that the designers chose to protect the output of the chipset they used on the DSC. You should be fine. The current spec is not how much is supplied, it is an indication of the safe range of the output chip used for digital I/O on the Arduino Mega. According to the manufacturer, the Mega can handle 40 ma per pin. |
Re: Use of Arduino to control a Spike Relay
Slightly unrelated...
Quote:
Netduino Control System We used one of his previous control system designs on a mobile robot we made last year....it used regular Arduino with an Ethernet shield and a second Arduino to send the controls via a traditional joystick. Mobile Robot with Arduino Control System |
Re: Use of Arduino to control a Spike Relay
Anthony,
This is fantastic! A great piece of work. I've downloaded all the files and will be looking at it in the next few days. I've copied my son on it as well. I love the use of the Android device, I've got an old Droid phone I'll try to use. Have you worked out a system to take input from the standard FIRST driver station? As I've mentioned in my posts, we'd like to create a transparent duinoectomey for our old robots so that we can experiment with them and do driver training. We can develop a new drive station or use the Android approach, but it changes the experience, if you will. Thanks again for your post!!! If you need a letter docummenting your cooperativity for next season, let me know. Doc |
Re: Use of Arduino to control a Spike Relay
Ok, ok....
After much gnashing of teeth and a good look at my toy budget (in case I did accidentally blow up my Arduino) I just said "what the heck" and hooked up the Arduino to the Spike Relay and ran it. Worked fine on the bench, only sourced 44 mA and activated the Spike fine. I'm feeling good. Took Arduino and breadboard circuit to robot....NADA. Took 20 minutes to figure out it was a bad PWM cable. Now, compressor runs. I'll have the Festo valves running tomorrow. |
Re: Use of Arduino to control a Spike Relay
Quote:
I have been fortunate to leverage his extensive skill to build some really cool robots and control systems. As for your question regarding the control system....this system is wifi based so it can be modified to run on a laptop, another Arduino or a droid phone like the video shows. The FRC driver station is just a laptop...so yes, it could be used to send commands. It would not interface in the same fashion as a cRIO, but it would be similar. The main advantage to a system like this is cost. In the past we have built full control systems for less than $200. :) |
Re: Use of Arduino to control a Spike Relay
To close out this thead. I used a transistor 2N2222 to run the spike. I set it up petty much like the Arduino documentation says with the output pin from the Arduino driving the base of the transistor through a 1k resistor. Worked fine! Just make sure the ground from the 12V source to the transistor is connected to the Arduino ground.
We are now in gear for running all of the functions of the 2010 robot. Next the stiff learning curve in getting data from the drive station to the Arduino through an ethernet shield. This stuff is SO cool! Doc |
Re: Use of Arduino to control a Spike Relay
Quote:
To anyone looking to implement this system, I've open sourced absolutely everything you need here: http://code.google.com/p/ipgamepad/ I'm currently working on a video documenting the whole system, but until then you should be able to get the gist of the setup from the Google Code page. I just finished up a simple python app to implement the controls using a PC/USB joystick if you're without an Android device. This is now available on the Google Code page. To build the control system, all you need is a wireless router, Arduino w/ Ethernet or Netduino, and your PC or Android device. Just connect your PWM speed controllers to digital pins 5/6 for tank drive. All of the data is there in the code if you want to tap into the X axis of either joysticks as well. I'm always available via PM if you'd like any help implementing the system. I'm definitely looking for developers to help out in feature implementation so please let me know if you're interested! |
| All times are GMT -5. The time now is 04:21. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi