I am a car guy,new to arduino, and am going to design an Arduino project to help with an electronically closing fiberglass hood. I have a fiberglass car that uses two linear actuators to close the hood. I have two problems though. One is that as the hood closes if one linear actuator is slightly faster then the other the hood gets crooked and binds. The second is to stop the hood precisely at the end of its travel. My solution to the problem was a proximity sensor on each of the two sides of the hood opening and comparing the distance to the hood edge. It could slow/disable the leading edge until the trailing edge caught up. Secondly it could determine the final stopping point. I have searched through the arduino projects and there are loads of proximity sensor projects. The biggest issue comes down to which proximity sensor to use? I figure when the edges are within 10 inches of the sensor until about 1 cm is the range that I need. Is an OPT101P what I need or a QRD1114? any other suggestions?
Wikipedia will help you decide on the sensor:
A proximity sensor often emits an electromagnetic field or a beam of electromagnetic radiation (infrared, for instance), and looks for changes in the field or return signal. The object being sensed is often referred to as the proximity sensor's target. Different proximity sensor targets demand different sensors. For example, a capacitive proximity sensor or photoelectric sensor might be suitable for a plastic target; an inductive proximity sensor always requires a metal target.
So, since you have an insulator automobile part, you need either a capacitive sensor or a photoelectric sensor.
If this was my project, I would just use a microswitch to detect the closing.
Which linear actuators? The common Firgelli ones have built-in switches to stop them running off the end. If you need slightly less travel than a standard one, you can open them up and move the switches to where you need them.
As for the problem of one getting ahead of the other, that's more complex. For just opening and closing a hood, I'm surprised that they get far enough out of sync. If one is consistently slow, put a small-value high-wattage resistor in series with the other one. If one is slow going down and the other is slow going up, you can add a diode to bypass the resistor in one direction or the other. However a diode has a minimum voltage drop: you need the drop over the resistor to exceed the diode drop, otherwise the diode will do nothing.
To get more complex than that, it would be pretty easy to buy an "encoder" or "feedback" version of the actuator and send that signal to the Arduino for processing. Adding an additional encoder outside of the actuator will be mechanically complex and ugly.
Morgan, thank you for replying to my post. I am not sure why you have chosen to redesign my project rather then to help me make it work.
a) I don't have Fergolli linear actuators. The ones that I do have were chosen because of their fit, their aesthetics and the length of the throw from recessed to full extension. Yes I suppose I could replace then with another set but several hundred dollars and weeks of trial an error. Then I could polish then. Then you want me to open them up and somehow tinker with the preset "off limiter"? Yeah, I don't think so. I do wish my LAs had stepper motors and an internal potentiometer however the models with the pots had different dimensions and unflattering appearance
b) I know you are surprised that the one LA might be a bit faster than the other as am I. Nothing you would notice except as the hood binds. Trust me it does hence the need for a controller. I have them running with only relays up until now
Which linear actuators?
Since you want a distance sensor, and neither of the ones posted appear to offer that capability, a time of flight sensor might be of interest.
If it matters mostly for the last part of closing, two of those distance sensors would do great indeed. By the time the hood comes in view of them, you can start to correct speeds and make them get back in sync. Dust and dirt may pose a problem for them, though. A bit of dirt or a drop of water is enough to mess up the measurement.
Could you connect a pot to the hinges of the hood? Absolute position feedback, easy to water/dirt proof, and easy to hide from view. Get a good quality one for stable readouts.
You may also need a limit switch (or two) to detect the hood being shut completely, and that it can be latched.