Newbie with questions...

Hi folks,

I'm a full on newbie simpleton when it comes to a Arduino but I have a project that I think it could do.

Basically I have to switch up to 6 solenoids using two buttons, have some sort of limits/positional data set for 'if' commands (I was thinking photocouplers) and have two led outputs set according to positional data.

So for example;

Button A pressed, activates + - Solenoid 1
Button A pressed. activates + - Solenoid 2 if Photocoupler 1 is blocked. If open activate + - Solenoid 1
Button A pressed. activates + - Solenoid 3 if Photocoupler 2 is blocked. If open activate + - Solenoid 3
etc etc for each solenoid.

Then;
Button B pressed, activates - + Solenoid 1
Button B pressed. activates - + Solenoid 2 if Photocoupler 1 is blocked. If open activate - + Solenoid 1
Button B pressed. activates - + Solenoid 3 if Photocoupler 2 is blocked. If open activate - + Solenoid 3

In some instances I may want to activate multiple Solenoids at the same time or with a very slight delay either in one direction (+ -) or the other (- +)

Is this something that's achievable with a Arduino? And as for the coding?....

Thanks

It's feasible. You should be able to find example circuits here, including the snubber diode you'll need for the solenoids.

As for the code, try to get one button, one photocoupler and one solenoid running first.

Solenoids have a coil like a motor, when energized it activates the mechanical part of the solenoid (such as a plunger that extends, or retracts).
That coil needs a driver. I have an 8-channel MOSFET board that can be driven a number of ways to energize coils;

  • Drive the MOSFET gates directly
  • Put data into a shift register to drive the gates
  • Drive the gates via a buffer chip (for 3.3V sources, or 5V sources).

The the inputs can be connected via male pins (press on female terminated wires), or via screw terminals, and the outputs are connected by screw terminals. Outputs have a 2A diode from the MOSFET to the supply, so an external device may not be needed.
Power to the board for the board is brought in via screw terminal.
If Shift register or buffer is used, then 5V from the Arduino is needed to power them.

Here are some built of for direct gate drive.
I have a couple ready to go, without the thru hole parts, they can be completed as desired.

chunkymonkey31:
activate multiple Solenoids either in one direction (+ -) or the other (- +)

Does that mean your solenoids are bi-directional? Most solenoids pull if they are powered and release if they are not. A spring or gravity moves the solenoid in one direction and connecting power moves the solenoid to its active position. From the symbols you are using it looks like you swap the positive and negative power wires to move the solenoid between two different active positions. If that is true, you will need something like an H-Bridge motor driver to drive each solenoid.
Do you have a table of states? Like, for each of the 16 possible combinations of the four inputs, is there a single set of positions for the two outputs? Or is it more complex, depending on both the current positions of the solenoids and the four inputs to determine the next positions of the solenoids? That would be 6 inputs and 64 elements in the table. If you can create a table that shows how you want the solenoids to move it should be fairly trivial to write a sketch to do what you want.

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