CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

I want to learn about door jamming algorithm and formulas

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

I want to learn about door jamming algorithm and formulas
PostPosted: Wed Nov 30, 2011 7:32 am     Reply with quote

my project is automate lift door controller with 18f.
I have 24V,100W dc motor. I have made this device with 4 mosfet h-bridge.
I can detect current with 0R1 ohm resistor
but my problem is:

when the door is jamming with some pressure, I want to detect instantly jamming with current sensing and stop running and run the door back to the start.

but there is different current at different position's the door.

how can I detect this stuation clearly. I can use velocity and current together but how? is anybody teach me this?
Ttelmah



Joined: 11 Mar 2010
Posts: 19363

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 9:09 am     Reply with quote

'Instantly'. No. Not physically possible.
At reasonable time, with a current sensor. Maybe. This is the system used on things like old car windows. However, the window _has_ to push with significant force, before an obstruction is detected.
If you look at things like modern train doors & lift doors, they may have pressure limit stop and reverse systems, but only as the 'backup' to the primary obstruction detection. Normally they use a variety of things like:
1) Optical reflection detection on the edge of the door.
2) Proximity detection on the edge of the door.
3) Optical 'curtain' detection just in front of the door.
4) Optical obstruction detection between the doors.
5) Gas pressure detection on the edge of the door (tube).
Now normally a 'lift door', would be moved by a PWM controlled servo algorithm, with optical encoder feedback of the door position. The system uses a PID algorithm to accelerate, move, and decelerate the door, and there is a learning cycle, used when the door is installed, or setup at the factory according to the weight of the door. Reversal is triggered if the power required moves more than a small fraction away from the expected parameters, once they have been 'learnt'. You then bring the door together at a slow speed once more. The speed variation needed, and the change in power needed over time, means that something rather more complex than a simple on/off control is required.
Then the second problem for this sort of detection is that if the door is to handle things like dirt, there has to be some margin in the allowed figures, and this means time/pressure before responce. Hence the preference for using things like proximity detection...

Best Wishes
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 9:28 am     Reply with quote

I think I can do something using velocity of door, and current.
I have made something but there is no instantly. I think I need good algorithm for this.

so for example, the way is 90 cm.

when the door is at 10.cm, then the v=10 and current is 1A.
when the door is at 30.cm, then the v=50 and current is 4A.
(...)
when the door is at 70.cm, then the v=10 and current is 1.5A.
when the door is at 80.cm, then the v=5 and current is 1A.

I have pid and smooth acceleration.like this(look the shape only):

-----------------
I have search this from other forums and found this formula:

pressure=kfi*I-damping*velocity-lassitude*acceleration

what is this formula mean?
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Wed Nov 30, 2011 3:53 pm     Reply with quote

Hello,
Dear zamzam23 I also project lift door drive. But I don't have hardware jet. My proposition is do it this like others. Implementing function teaching and store distance and average current for specific distance.
Can You show Your H bridge solution because I have many problem with this ??

Best regards
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

PostPosted: Sun Dec 04, 2011 1:51 am     Reply with quote

Any ideas for my problem?
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Sun Dec 04, 2011 4:38 am     Reply with quote

Hello,
You writes is max current is 4A. So can you set overload to 4.2A and check what is a force at all positions of doors. Max for lifts is 150N. Also you can parallel detect move of doors: distance[n]< or > distance[n+1], sampling this 1/100ms.

P.S. 4A is strange large current. What type of doors you use EI90??
In my experience max current for normal doors 900 is about 2A. I use 24V dc motor with gear.


Best regards
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

PostPosted: Sun Dec 04, 2011 3:40 pm     Reply with quote

My motor is 100W 4A without gear. brushed motor.

I have already make an algorithm that is check the current as over 4A and detect the force on motor but this is not good algoritm. when motor is high velocity, the current is 3A and I am checking 4.2A and the motor is slow, current is 1A and I am also checking 4.2A.

I want to calculate real pressure so it must be max 150N as you told. and I am seaching a formulas that I can do it. or nearly solution for it.I want to make motor more sensivity for force.
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Mon Dec 05, 2011 8:48 am     Reply with quote

Hello,
I have idea. You have something like this:

[img] http://msdl.pl/ramp.bmp [/img]

So If you set current limit like this:

if(distance<distance_acc)
current_limit=4A
if((distance>distance_acc )&& (distance<distance_dec))
current_limit=3A
if(distance>distance_dec)
current_limit=1A

Maybe this help You.

Best regards
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

PostPosted: Mon Dec 05, 2011 9:08 am     Reply with quote

Thanks for your effort.
Maybe the door is 700,800,900 or more. I need a function that works for all of these doors. Just I will change the parameter of door 'pressure'. Then it will work all of doors.
I think the best way is save current and velocity for all every 50mm. Then recalculate the average current and velocity every 50mm and compare with the set point in the memory.

How is your project going? Which level do you choked?
Lemosek



Joined: 15 Oct 2011
Posts: 36

View user's profile Send private message

PostPosted: Mon Dec 05, 2011 9:55 am     Reply with quote

Hello,
This is simple Smile
You must implement function "teach in". After install this door drive adjuster must press the learn button.
In function teach in:
1. learn door width - low speed and if distance[n+1]=distance[n] then you have end door way.
2. you must learn the cam path.
3. learn distance for mode: acc, normal, dec.

So if you have this algorithm then you don't need set new parameters.

Best regards
zamzam23



Joined: 25 Aug 2010
Posts: 47

View user's profile Send private message

PostPosted: Tue Dec 06, 2011 1:33 am     Reply with quote

Smile I know all of these.

My project is completed but I want to rewrite the door pressure part of my software.
Anyway maybe I must want help in another forums. Tthanks everybody who care my subject.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group