|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
We are in the process of wiring up a t shirt cannon for my pre-rookie team to be mounted on our modular robot. We have a Arduino micro-controller with the robot open shield. We code to activate the relay, probably in PWM port 9, for a split second to give power to our solenoid to open and shoot the cannon. I have no idea how to code in Arduino or really at all so any help is awesome.
|
|
#2
|
||||
|
||||
|
Re: Programming a 12V relay with Arduino
There is a relay library I'm sure. There should be an example in the Arduino IDE. I hope you're using an external power source.
Last edited by pastelpony : 18-09-2014 at 14:50. |
|
#3
|
|||
|
|||
|
Re: Programming a 12V relay with Arduino
Arduino is well documented, so I'm sure there's resources for the particular syntax. You'll probably want to use a simple output rather than a PWM. Just pulse the output to get your relay to switch.
The bigger deal is driving the coil. You'll need to make sure your relay will actually switch at the Arduino output voltage. If that doesn't cut it or if the coil needs more current than the arduino output can provide, you'll need some extra circuitry (like a transistor) to handle the coil drive. Last edited by jee7s : 18-09-2014 at 18:24. |
|
#4
|
||||
|
||||
|
Re: Programming a 12V relay with Arduino
Quote:
Page 71 has the relay example, and you can probably reference what they do in the guide with what your kit does. |
|
#5
|
|||||
|
|||||
|
Re: Programming a 12V relay with Arduino
If your budget is up for it, you can add the RobotOpen Solenoid Shield to your Arduino. It's perhaps a bit steep for controlling a single solenoid, but it's perfectly supported by the RobotOpen code library.
|
|
#6
|
|||
|
|||
|
Re: Programming a 12V relay with Arduino
Do you have any spike relays? An arduino can drive them directly.
|
|
#7
|
||||
|
||||
|
Re: Programming a 12V relay with Arduino
Quote:
There are several that I know work well. A spike is also good option. Just reach out and we'll gt this fixed. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|