We are building a very cool project for school (x-wing fighter) with functional cockpit canopy that opens and closes by linear actuator (Arduino, relay, limit switches, etc.). We cannot figure out an efficient way to detect resistance/obstruction while the canopy is closing but before it reaches the limit switch (i.e. kids hand or leg is in the way). the actuator can impose 250lbs force and definitely do not want a child getting squashed in there.
it should be fairly easy solution since all automatic trunks for vans have this feature - door stops as soon as it detects an extra resistance. One guess is that it detects when motor starts drawing too much current? If this is correct, how does it handle the fact that the motor naturally would draw much more current when the door is horizontal (extended) as opposed to vertical (close to being closed)?
Or is there another way an external resistance is detected? thanks in advance,