Suggestions needed for object detection for motorized lid - Page 1
Forum section: electronics / projects

author: pintek
author_rank: Newbie
timestamp: June 25, 2021, 09:36:00 pm
content: I am currently building a cabinet that has flaps that open and close, powered by a linear actuator.As Murphy's law dictates, it would be only a matter of time before someone is silly enough to stick a digit or pinky in the wrong spot as the flaps close, ending with the obvious outcome of a whole bunch of squealing and a touch of the crimson paint. So, I am looking for some suggestions from the gurus on what would be the best option for object detection.I have looked at a few options like edge bumper switches used on industrial machinery (expensive & overkill) & copper tape for touch sensing (could work but not sure how effective).I assume that automatic car doors monitor the motor current and stop when it hits a setpoint, but I have no idea how they would not get false triggers with startup currents and shifting load as the door closes.Any suggestions on what detection system I could install to stop the motor when the inevitable happens?

author: pqass
author_rank: Super Contributor
timestamp: June 25, 2021, 09:43:18 pm
content: Make the linkage between the linear actuator and door flap flexible (springy).Then use a hall-effect sensor+magnet to detect that the connection point has stretched/compressed.

author: mindcrime
author_rank: Unknown
timestamp: June 25, 2021, 09:52:27 pm
content: If you only care about walking meatbags of various sorts (eg humans, dogs, etc.) then maybe an IR sensor?Or maybe an ultrasonic distance detector?The current measurement idea is interesting. I had briefly toyed with trying a similar idea for a project I'm working on but never got around to it. I'm curious to know how effective that would (or would not) be.And another idea... it might seem like overkill, but in some ways it can actually be one of the easiest approaches: a webcam connected to an rPi using OpenCV and doing object detection. I know, I know... "computer vision is way overkill and way too complicated for this" is probably what you're thinking. And yes, doing stuff like individual level facial recognition and suchlike is still moderately challenging. But it's not so hard to simply detect if an object appears in a certain spot in the frame. I had a friend who was doing something with liquid level measurement and eventually gave up on all sorts of complicated and expensive sensors and solved the problem with a $25.00 webcam. Just a thought...

author: m98
author_rank: Frequent Contributor
timestamp: June 25, 2021, 10:01:42 pm
content: Way too complicated and error-prone. Limit the maximum force the door can apply to something in its way, by both limiting the force of the actuator and choosing an appropriate acceleration profile, i.e. the closer the door comes to the cabinet, the slower it moves.I guess the easiest way would be to use soft-close hinges and just using the actuator to pull the door to their tripping point.

author: pintek
author_rank: Newbie
timestamp: June 25, 2021, 10:09:31 pm
content: Brilliant suggestions gents. Very much appreciated. Will definitely be trying a few of these out to see which works best.

author: ajb
author_rank: Super Contributor
timestamp: June 25, 2021, 10:17:58 pm
content: Motor overload protection is a generally good idea anyway, and current sensing is usually a good way to do that. So if a finger in the way of the door would cause a measurable increase in motor current before serious injury then that could be a reasonable way to go. This depends on the load and mechanics, though, if it's a very light mechanism then maybe it would never cause injury anyway, or if those doors weigh a couple of tons then the difference a finger would make is well down in the noise. So you'd have to be somewhere in the middle. It's possible to work around the startup current by either doing a soft start (assuming the load allows this), or disabling the overload protection for the initial startup, or only tripping the overload when the current is over the limit for a certain period of time. Having some compliance in the mechanism (whether deliberately added in the form of a spring, or just inherent flex in the mechanism) may help. If you have position feedback, you can schedule the current limit as a function of position to account or any changes in actuator load with position (like if the mechanical advantage changes as the load moves), which allows a tighter current limit.One extra thing to watch out for with overload detection is the dynamic behavior of the load. I have a motorized desk that has overload protection and sometimes when it starts moving--especially if I haven't moved it in a bit--the jerk of the initial stiction breaking loose will make my monitor arm bounce up and down enough to trip the overload.

author: RJSV
author_rank: Super Contributor
timestamp: June 27, 2021, 09:09:55 pm
content: "edge bumper is expensive & overkill "How about: "COST of hand injury, in emergency room".Try Google: 'LOST wages, due to partial disability'.I believe that EYES and FINGERS have, legally speaking, a high priority for worker safety and future.(Although difficulty walking is also prioritized.)If you gotta do it, m98 post has good start.Don't misunderstand, I not expert.Hey, you might come up some 'patentable' safety improvement ! In tech stuff, it is always good to be seeking new solutions!Try also, make friends w an Industrial Safety person!

author: pintek
author_rank: Newbie
timestamp: June 28, 2021, 12:05:51 am
content: Was referring to safety edge profile that acts like a switch contact that is normally installed on industrial machines like CNC enclosure doors.https://www.omron.com.au/products/family/2617/It's about $250 AU per meter plus the cost of the controller = $250 + ~$300 = ~$550 plus GST + freight ≠ the contents of my wallet.Current/force limiting is the path I am heading down and may have come up with another solution that I will install as an extra fail safe using tactile switches and a bump bar.Will post that when I have something put together.

author: sandalcandal
author_rank: Unknown
timestamp: June 28, 2021, 12:47:47 am
content: As you mentioned safety edges are probably the "approved" way to do this.I think a touch sensor is the strongest alternative mentioned so far. It has the potential to be very sensitive and reliable. All you need is some conductive tape and an IC capable of running capacitive touch (Even an Arduino is capable of capacitive touch but maybe not suitable for this safety application)SawStopuses a capacitive detection system. The problem with implementing a capacitive touch system is it won't work well if applied on top of a conductive surface and could be prone to erroneous triggering from moisture or other potential contaminants leaking current/charge. Protection from ESD and ensuring high reliability might be challenges. Would have to see more of what your application looks like for context.The force/load based trigger methods don't seem like a great idea to me since if this thing is operating with enough force to cause "a whole bunch of squealing and a touch of the crimson paint" then the relative change in force/load due to an intrusion/obstruction might be hard to detect before actual damage is caused. A capacitive touch sensor only requires the slightest physical contact to trigger (or can even trigger before contact).

author: pintek
author_rank: Newbie
timestamp: June 28, 2021, 03:13:53 am
content: Thanks for the comment sandalcandal. I thought the capacitive touch system would be the best bang for money but I am a little concerned about reliability and false triggers too.The project I am building is a racing & flight sit in arcade cabinet. To be able to swap between the gear stick and flight throttle controls, I have a 'pod' beside the chair that uses linear actuators to open two flaps, then the centre section rotates to the alternate controller, and the flaps lower back to the closed position. I have all of this working - just looking at the safety aspects now.Will get some photos and video of the cabinet that I am building for clarification.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: June 28, 2021, 03:18:06 am
content: Is this for a flimsy door in front of your television, or for a 20 ton vault door?For a small door I'd use a motor and mechanism that is inherently weak enough to not get into the danger zone. One of the options is to use a magnet between the motor and the door, that just dislodges during an overload.Next step up would be a long piece of metal or plastic along the edge with a few microswitches, that activate when that long piece is moved.

author: sandalcandal
author_rank: Unknown
timestamp: June 28, 2021, 03:21:39 am
content: Quote from: pintek on June 28, 2021, 03:13:53 amSounds cool! In that case I think the suggestions other users have already made of just being sure to limit the power and force of your actuators is probably best and what you can and should do anyway. I'm guessing the controllers aren't too heavy so [load-position based] jam detection from a kid's pinky shoudn't betoobad. I'd look more at mechanical design to avoid any pinch points and potentially using counter weights and just reducing weights overall where ever possible to reduce the force actuators need to operate at. Maybe have a separate mechanism to lock the controllers in place after the flip instead of relying on the actuators to supply a force.Edit: Elimination of risk is always the number one preferred option. Only if it cannot be eliminated/avoided should you start looking at putting controls over the top of the hazard.

author: pintek
author_rank: Newbie
timestamp: June 29, 2021, 05:46:23 am
content: Here is a quick video of the pod switching from flight mode to race mode.

author: RoGeorge
author_rank: Super Contributor
timestamp: June 29, 2021, 06:41:29 am
content: Watch the current/power through the motor. Any obstacles will increase the current by a lot.That's how the windows in car are usually made. I think it is called anti-pinch window lift control. Found it:https://www.microchip.com/content/dam/mchp/documents/OTH/ApplicationNotes/ApplicationNotes/doc7678.pdfSee if the same idea can be adapted to your application.

author: sandalcandal
author_rank: Unknown
timestamp: June 29, 2021, 07:03:25 am
content: Quote from: pintek on June 29, 2021, 05:46:23 amLooking at that, my suggestion is if you configure the mechanical design so that the lid/flap is pushed up by some partially constrained linkage so it is only pulled back down only by a spring/gravity then you could quite easily limit the force on the closing stroke to make injury impossible but still have enough force that cheeky users have a difficult time yanking it open due to the lack of holding points.Attached simple example linkage assumes the other end of the linear actuator is free to pivot as well. Can't quite see how the linear actuator is setup in the video.

author: pintek
author_rank: Newbie
timestamp: June 29, 2021, 08:54:27 am
content: This is my first attempt at trying mechanical engineering so again, I really appreciate the feedback.Thanks to sandalcandal for the drawing - I like that concept. Simple and fits the brief. Will have a tinker over the coming weeks to see if I can build that into the design.Thanks to RoGeorge. Seeing a known working example is precisely what I needed. With the suggestions of current monitoring from a few others, I am going to chart and graph the current of the motors in operation and work in a monitoring circuit.Incorporating a few of these ideas will add the factor of safety I wanted.My kids and their friends will be playing on this machine, so I guarantee that it will be put to the test.

author: Berni
author_rank: Super Contributor
timestamp: June 29, 2021, 10:51:51 am
content: That looks pretty neat.First thing to try is monitoring the motor current. On small things like this the force required to seriously hurt someones finger is likely much higher than the force required to actually move the thing in normal operation. So the motor is likely to draw a much larger current when someone sticks a body part inside. If you also use a motor controller with current limiting capability this also limits the amount of torque the motor can produce (For most motors the toque is directly linearly dependent on the current trough the motor)A good example of this in action are electric operated windows in cars. You probably never tried to close your fingers into a powered door window in a car (since lets face it its not a good idea to stick fingers in such motor powered mechanisems) but there are idiots that will. If you do stick your fingers in there, then the window will give them a rather hard squeeze but then stop. The electronics measure the motor current and stop it before the motor manages to actually break your fingers (Since it is plenty strong to do harm if it wants to). Elevator doors are similarThe aim of these systems is not to stop before its is unpleasant. They will often squeeze pretty darn hard, but there is a big difference between squeezing your finger so hard that you yell about it and leave a bit of a mark that goes away in the next few minutes (while still letting the human be strong enough to pull the finger out by force) versus squeezing your finger so hard that you break the bones and cause bleeding. A lot more extra force is needed to go from the first scenario to the second one.No idea how strong your mechanism actually is, but by the sound of how far geared down that motor is i know i wouldn't attempt trying to put my finger in there. First try it out by sticking in some sort of "test dummy" like a large carrot or something similar to a finger, see what it does to it. If a carrot can survive it then you can probably also try putting your hand in there, just make sure you use all of your fingers. That way the force is more spread out and you have a good grip of being able to pull the door back open by force to get your hand out. Perhaps the motor is weak enough to be stopped by this, otherwise look into current limiting.Another solution are spring return mechanisms. For something like that door you could consider using the motor to just push the door open by bumping a lever against it, but not actually pull the door. Use a spring to pull the door closed. That way the most closing force you can get is dependent on how strong the spring is. At the same time you don't get the wobbly mechanism that would result if the linkage between the motor and the door itself was a spring.

author: joeqsmith
author_rank: Super Contributor
timestamp: June 29, 2021, 12:01:55 pm
content: If you use current, I suggest making a profile of the current at discrete locations. You could use the commutator as a poor mans encoder and maybe one home position switch. Put a window around this profile. Then use the data as it moves to adjust this profile. Making it adaptive may help as things wear with time. You may also want to consider what is causing it to fall out of range. Is it a hard stop (bone), or a child's neck? Of course, you may want to retract rather than having it stop with the kids hand in there.You may also want to dial back the available power available to the motor depending on the position. Once you get to a point were it is no longer a pinch hazard, then increase the power to allow it to close.

author: ajb
author_rank: Super Contributor
timestamp: June 29, 2021, 04:52:13 pm
content: That's a really neat project!As scandalscandal says, it looks like a spring-close/push-open mechanism would be a great fit for this. It looks like you have plenty of space inside there for a long extension spring that pulls the panels down towards the enclosure, which will allow you to have a nice soft spring force through the required travel. You can buy long lengths of coiled extension spring that can be cut to whatever length you need, and the last two or three coils can be bent out to form an attachment loop.

author: mikerj
author_rank: Super Contributor
timestamp: June 29, 2021, 06:26:52 pm
content: Connect door to closing mechanism via spring to limit the force if it gets obstructed.