|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Arduino - RoboRIO Question
We've created an Arduino based indicator that we want to use, which gets triggered by the relay signal that is sent to a Spike. (One action is activated when the motor is run in one direction, and a different action is activated when the motor is run the other direction. A third "neutral" action runs when the motor is not engaged.)
Before installing, we measured the voltage of the red and white PWM wire leads (with respect to the black) and found them to be very close to +5v (for each direction the motor is run, respectively). Using the 5V supply from the Arduino itself to simulate the voltage from the PWM wire signals, the program worked perfectly off the robot. When we put the indicator on the robot, it remained in the "neutral" third action no matter what we did with the motor. When we checked the voltage again (white and red from PWM WRT black), we found it to be now only approximately 1 volt. So I guess my questions (finally) are (1) Why does the voltage read 5 Volts when not attached, and only 1 Volt when attached...and (2) Is this normal or have we done something wrong. Then (3) If this is normal, we can use an analog input...what minimum voltage should we expect at each signal pin, so we know what to use as our "trigger" value? |
|
#2
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Without a circuit diagram it sounds like you are overloading something.
How much current does your circuit input draw when it works correctly? |
|
#3
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Quote:
Without a circuit diagram, I'll try to explain...eight groups of LED's are wired to the digital pins 6-13 - configured as outputs (anodes) and to ground (cathodes). Red PWM wire to pin 1 (configured as input) and White PWM wire to pin 2 (also input). Black PWM wire to ground. Program runs only as if there is no voltage on either of the red or white PWM wires...however the robot works perfectly - motor goes forward and reverse exactly as controlled. When we checked the red and white wire voltage with everything connected, the voltage was much lower than the 5V we expected. |
|
#4
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
What motor are you describing?
|
|
#5
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
We have split the PWM going to our lift motor's relay...the cable now simultaneously controls the Spike, and thus the lift motor...and is input for the indicator LED apparatus through the Arduino.
The motor is still responding, though the Arduino is not receiving a sufficient voltage to activate the indicator action. |
|
#6
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Quote:
Make sure to check the voltages before you hook up just the Arduino. Last edited by techhelpbb : 15-03-2015 at 11:10. |
|
#7
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Without a circuit diagram, I can only make suggestions that are nothing more than a guess.
That said, the first thing I would suggest is making certain that you are also tying ground from the RoboRio to the ground on the Arduino. The next step I would do would be to put 10k ohm pull down resistors on the inputs to the Arduino. That would make sure that you have a solid ground reference, and not have the inputs to the Arduino floating. |
|
#8
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Quote:
|
|
#9
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Quote:
|
|
#10
|
|||||
|
|||||
|
Re: Arduino - RoboRIO Question
[Disclaimer: I cannot find a schematic to the Spike internals. What I say here is from many-years-old memory and not guaranteed.]
The Spike inputs are not logic level signals. They actually provide power to an optical isolator. The current is supposed to be limited to 40 ma; I do not know what voltage that ends up corresponding to. The roboRIO Relay outputs have a 40k resistor to ground, so there is no need for a pulldown on the Arduino inputs. |
|
#11
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
True. I was not aware of the internal pull-down resistors.
|
|
#12
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
I would probably connect the Arduino to a digital output from the robotRio and just have the program control the digital outputs wherever its controlling the spike.
|
|
#13
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Much like your I/O issue you've left this topic in an indeterminate state
![]() So did you figure the issue out? |
|
#14
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
Quote:
(SuperBK is a recent acquaintance...and will be at the NC Regional with us on Thursday...perhaps I'll monopolize some more of his time!) Last edited by Qbot2640 : 17-03-2015 at 22:38. |
|
#15
|
||||
|
||||
|
Re: Arduino - RoboRIO Question
AFAIK the red pwm wire is 5v and not a data line.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|