My first project (arm and solenoid controlled by arduino)

So I’m wanting to venture into the world of a arduino :smiley: But I would like to start off on the right foot and hopefully buy all the needed equipment in one shot (or scavenge parts) for my first project. So what I’m wanting to do is have a arduino connected to 2 devices. The first being a solenoid that will have a 5 second timer on it. So Every 10 seconds power would be applied to it then cut off. At the same time when the power is applied to the solenoid, power would also be applied to a push arm. This push arm would drag a stylus across a screen then reset when it gets to the end of the track. After it resets the whole process will start over. I attached a rough diagram of what I’m wanting to do. Is this feasible for a beginner or am I over stepping? :slight_smile:

I hope this is the right place to post this :smiley:

The Arduino part seems extremely simple. The external hardware is what is going to take the effort to design and build.

You don’t give any hints about the size of the device or the force, distance or speed requirements of these two actuators, but if you’re able to use a plain old RC servo for either of them that would make the project a lot easier.

I’m always on the lookout for low tech solutions to problems like this. Guessing that you want the solenoid to be ‘up’ when the arm is moving one way, and ‘down’ when it is moving the other way, you could consider using a car windscreen wiper motor for the reciprocating movement, and limit switches to turn the solenoid on and off.

I'm new to all this so please bare with me :slight_smile: The distance for the arm is roughly 4-5 inches. The solenoid should be independent of the arm. It's main job is to push a button on say a cell phone to unlock it. So if power stays on then that will turn the phone off which is bad. So a brief on and off state for the solenoid. The arm with the stylus will land on (since were using a cell phone for example) the screen and slide the "unlock" bar down or across. So the distance is small.

If you’re just operating a smartphone, I’d use servos for both jobs. They’re easily capable of the sort of force and distance you’re talking about here, and far easier to control than solenoids and motors and so on. Just remember that the servos need a separate power supply which must be grounded to the Arduino ground.

So would these parts suffice?

Arduino Pro Mini 328 - 5V/16MHz
Micro Servo details:
Size : 23x11x29 mm
Voltage : 3V to 6V DC
Weight: 9g / 0.32oz
Speed : 0.12 sec/60 (at 4.8V)
Torque : 1.6 kg-cm
Working Temp : -30C~60C
Teflon Bushing, 19cm wire, coreless motor

I take it the 2 power supplies would need to act independently from each other in order to get the timing right? If the arduino is 5V and each servo is 3-6V would I be able to use a 12V input with dimmer switches to reduce the current going to each device to power it?

That seems like a reasonable starting point.

The servos need far more current than the Arduino itself can supply (i.e. going through its internal regulator) so the servos need to be connected directly to their power supply. A typical servo can draw up to about an Amp, so with two servos it would be sensible to aim for a 2A power supply for the servos. You might be able to get away with powering the servos and the Arduino from a shared 5V supply, but servos generate a fair bit of electrical noise which can upset the Arduino - it's safer to give the Arduino and the servos their own separate power supplies. If using separate supplies, you need to connect the servo power supply's ground to the Arduino ground.

The Arduino Pro Mini is a poor choice for a first Arduino and requires an extra programmer that you would need to purchase. Stick with an Arduino Uno.