Help on coding/wiring a GEARS IDS II and Air cannon

Hello, first time here. I am currently trying to use a GEARS IDS II Speed Controller with Integrated valve control to control a pneumatic solenoid to release a puff of air. I cannot seem to figure out how to code the GEARS properly, I was told to treat it as a servo but it hasn't worked. I believe I figured out wiring but am unsure, could you guys lend me some help with either the code or the wiring?

Assuming this photo uploaded correctly, this is the wiring I have currently in the best view I could get for a clear view of the wires.

Read the how to get the best from the forum threads. How to get the best out of this forum

Properly posted code and a (hand drawn if necessary) clear schematic would be of more value that the photo. Label all components and power supplies.

What does the project do now? How is that different from what you want?

#include <Servo.h>
Servo Motor;
Servo Piston;

void setup() {
  Serial.begin(9600);
  pinMode(1, OUTPUT);
  Motor.attach(11);
  Piston.attach(10);

}

void loop() {
  digitalWrite(1, LOW);
  Motor.writeMicroseconds(1700);
  Piston.writeMicroseconds(1500);
  delay(1000);
  digitalWrite(1, HIGH);
  Motor.writeMicroseconds(1500);
  Piston.writeMicroseconds(1700);
  delay(1000);

}
![diagramofwiring|375x500](upload://nQXIA3l2gzkLtNNSnMhNeCwDHCl.jpeg)

I need the project to let out a controlled burst of air from the pneumatic solenoid when input is given from a switch or when a sensor value reaches a certain amount.
Currently all I can do is make a light on the GEARS box glow from red to green and back to red with nothing happening. I don't know what this does or means. Do you have any advice on how I could code this or wire it better?

Here is a photo of the diagram I drew, since it uploaded wrong.

From above:

I need the project to let out a controlled burst of air from the pneumatic solenoid when input is given from a switch or when a sensor value reaches a certain amount.
Currently all I can do is make a light on the GEARS box glow from red to green and back to red with nothing happening. I don't know what this does or means. Do you have any advice on how I could code this or wire it better?

How did you decide on the value of 1500 and 1700 in the writeMicroseconds?
Those are around 90 degrees in most servos, the range is typically about 1000 to 2000 but servos can vary. I've even seen 640-2400 iirc. Have you tried values of maybe 1100 or 1900?
Best to keep conservative if overdriving risks damaging anything as in a servo. I don't know your air cannon at all.

Do you have any documentation (data sheets, manuals) on the components of your project? I have looked, but came up with nothing.

Is the solenoid vavle supposed to be proportional?

1 Like

How did you decide that the GEARS IDS II speed controller was the right way to control the solenoid? Like, it's a one-shot action you're looking for right? To @groundFungus 's question, are you certain the controller is the correct choice for the desired action?
Did you look into using a relay or MOSFET for the solenoid valve?
Are you hoping to to use a radio controller to set it off, like a switch on an RC aircraft radio?
What's powering the higher power side, pneumatic valve? I wouldn't think using the Arduino to open and close the pressurized valve would be the best choice.

Is there part number on the soenoid valve that we may use to get data on it?

Where are you getting the instructions to set up the project?

I was told to treat it like the servos we had in class by my professor so I assumed a default of 1500 and 1700. I have also tried 760 and 960 since it had some "example" code on a paper in there from 2005.

I've got some example code stuff that I can post, need to take pictures of the paper from the classroom so might take a little bit.

I was told it was the right thing to use by my professor to work with the air tank. It's all powered by the cord connecting the arduino to my computer since we don't have batteries of high enough voltage.

What light? Like an integrated LED on the Gears box? I don't know what the yellow wire is plugged into on your shield, nor do I have experience with that shield, but when I zoom in I can see that the yellow wire isn't plugged into any of the shield digital I/O pins. (Edit it is but had to find a different picture online myself, c'mon man!)

You declared pinMode(1, OUTPUT);
but there's nothing plugged into any digital I/O from what I can see. What is supposed to be on digital pin 1?
Speaking of digital pin 1, it's not often I see folks selecting that pin. Nothing wrong with it but pins 0 and 1 are also connected to the Serial UART TX, so it's not preferred unless you really are running out of pins and don't need the Serial monitor.

Edit: I looked up that Parallax Education Shield and indeed, the yellow wire id plugged into digital pin 1. I would still change that out. Is it for an LED on the speed controller?

Oh, I see. Next time can you supply something like this:
https://www.parallax.com/product/board-of-education-shield-for-arduino/
so we don't have to Sherlock Holmes your components?
I see two servo connections coming out of the Parallax board which are automatically on D10 and 11.
Those go into the speed controller and come out to two signal wires which you have feeding into two separate marretts, via yellow and a green wire, which come out of the marretts as grey and red and go into the solenoid valve. If there's only two wires going into the solenoid,
it's just a typical solenoid and if you want a burst of air, not flow control like an adjustable damper, then I wonder why you are using servo pulses at all.
Usually a transistor would handle a solenoid like this, and you'd need a base resistor and a snubbing diode, but probably that's all handled in the speed controller already since servos, motors and solenoids are all inductive loads.
The speed controller seems like overkill for an air cannon in a repeating, single shot mode, but that's what they gave you.
I would just try low side switching and since your ground from the solenoid is already connected through the speed controller and you have a servo signal wire and either the other servo signal wire or +5V plugged into the solenoid, I would try doing away with all the servo stuff altogether, but keep the same wiring, and

const byte motorPin = 10;
const byte pistonPin = 11;
const byte controllerLED  = 13; // pin D13, is it an led for the controller I don't know

void setup() {
  Serial.begin(9600); // with that yellow wire on pin 1 you will have issues, move to D13
  Serial.println("yourSketchName"); // insert your sketch name here so you can see later
  pinMode(controllerLED , OUTPUT);
  pinMode(motorPin, OUTPUT);
  pinMode(pistonPin, OUTPUT);
  digitalWrite(motorPin, HIGH); // default should show 5 volts between red into solenoid and Arduino ground
  digitalWrite(pistonPin, HIGH); // start high for low side switching?
  digitalWrite(controllerLED, LOW);
}

void loop() {
  digitalWrite(pistonPin, LOW);
  digitalWrite(controllerLED, HIGH);
  delay(1000);
  digitalWrite(pistonPin, HIGH);
  digitalWrite(controllerLED, LOW);
  delay(1000);
}

Best I could come up with given the limited info you supplied. Good luck.
If the sketch doesn't work, I'd try reversing the logic of motorPin throughout next.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.