PLC on a motorized wheelchair

A

Thread Starter

Anibal Hernandez

Gentlemen: I'm just wondering if I could do the following with a PLC (any brand) If I install a PLC on a motorized wheelchair and have the user ride it around the house for a few minutes, can I somehow "RECORD" the trajectory of the wheelchair, remove the user and "REPLAY" this same trajectory by just simply pushing a button? Just the wheelchair alone. For example; If the Joystick on the wheelchair is inclined to the left and hold it by the user for 20 seconds and then to the right and hold it for 10 seconds and then to the front and hold it for 14 seconds, then again to the left and hold it for 20 seconds thus creating the full trajectory. Can I somehow store in the memory of the PLC all this sequences of "Timers" and "Joystick Inclinations" into a table or file in the PLC and "REPLAY" the whole sequence any time I want, in other words can I command the wheelchair to stroll around the house completely unattended by itself? By just commanding the motors to turn on for the specified amount of time as per the table created in the trajectory. This will be sort of like a "Teach Mode" on a costly Servo/Stepper system. Thanks
 
S

Steve Bailey

It can certainly be done. However, without feedback, the repeatability of the trajectory will be subject to the level of charge in the battery, load seen by the motors, room temperature, etc. You should put encoders on the motors and keep track of their rotation, rather than just depend on time.
 
C

Christian Felde

Yes, this is possible. The wheelchair does, on the other hand, need to start form exactly the same spot each time. And neither can there be any changes. I mean like objects which has moved into its recorded path. For security reasons, the wheelchair should have sensors which will stop it if there's something in front of it. It wouldn't be nice if the wheelchair ran over a little child or an animal or some other thing like this.
 
A

Alan Rimmington

While it would be possible to record such times and directions for later replay, you would have the following problems. The recorded data would have to be from a benchmark location, and the number of moves that could be recorded would be limited. The main problem you would have in applying the playback would be that the start location would have to be exact, and even then it is likely that small changes will affect the final result, eg the fact there is no load (person) and the fact the battery condition will be different means the times will not put the wheelchair in the same position, not to mention the effects of speed, traction, inertia ...... doesn't look very reliable.
 
J

Jeffrey W. Eggenberger

There used to be a toy that you could program in this fashion, unfortunately, the path followed rarely would follow the exact path. What you would really need would be some kind of feedback from the room. We use an automated parts delivery system at work; it uses signal lines imbedded into the floor. Jeffrey W. Eggenberger Electrician: Industrial, Commercial, and Residential
 
D

Dobrowolski, Jacek

Hi Anibal, Writing such a program is possible. But reliability of such a system can be very low. I think that after few repetitions, accordingly to mechanical inaccuracy and skids, the wheelchair won't follow the path correctly. (that's why in factories they've got painted lines on the floor and tracking systems) Regards, Jacek Dobrowolski Software Eng. Automation Department Secondary Division International Tobacco Machinery Ltd. POLAND mailto: [email protected]
 
A

Anthony Kerstens

Most PLC's have a fifo, but these fifo's are usually limited in the number of registers they can use. You could program a storage routine with indirect addressing, for which you would then only be limited to the maximum offset available for the indirect address (but which you could probably program around). Anthony Kerstens P.Eng.
 
C

Christian Felde

> The recorded data would have to be from a benchmark location, and the number of moves that could be recorded would be limited. You really don't need to use much memory to store the moves. So you could have quite a few moves. Lets say that we use a word (16 bit) for the time data. And the time unit is 1/100 second. This gives us 2^16 or 65536 1/100 seconds. This gives us good time resolution and a total of almost 11 minutes of time, and that's only in the current movement and not total! Then, right after this word, we use a byte to store what movement to use. A byte might be waste of space if we only have 4 different movements, but it sure is a lot easier to work with 8 bits than any less. This gives us a memory map of: |16 bit time data|8 bit movement data|16 bit time data|8 bit movement data|..and so on..| Each unit of time and movement data uses therefor 24 bits. If we therefor have a PLC with even only 1 Kbyte of space for this use, we can store a total of 341 movements with a total time space of just over 62 hours. Space math: 1 Kbyte is 1024 bytes. This is 8192 bits. This means about 341 time and movement units. This is also 341 different movements. Each time unit can store 65536 1/100 seconds. This means a total of just over 62 hours of time data in total. Time math: 65536 * 341 = 22347776 1/100 seconds 22347776 / 100 = 223477.76 seconds 223477.76 / 60 = 3724.6 minutes 3724.6 / 60 = 62.1 hours
 
A

Alan Rimmington

I was assuming that Anibal would be wanting to use a low cost micro PLC, which would typically only store 255 or less 16 bit integers (eg Micrologix 105 intergers in one data table). If you stored the values as 8 bit in a micrologix you could only store 210 values in the range 0 - 255 seconds in one datatable. While you could use a more powerful and costly processor, I think the other limiting factors, such as inertia etc would cause many more problems than recording/playing back the data.
 
C

Christian Felde

Ah, I see. I have had no experience with any micro PLC. The smallest PLC I have been in contact with is the Siemens LOGO type. And I agree to that there would be other bigger problems.
 
D

Donald Pittendrigh

Hi All This is my favourite type of thread, should be good for at least 3 weeks worth. The answers : You can do this but not with "any PLC" and with many, many PLC's it would be rather difficult to do so as to make it all but impossible. I would not hesitate with an S7-300 upwards, I would succeed with most S5 PLC's but not so easy. Then there is the other thing, would the system work, well I say sort of, there is a difference in performance between an empty wheelchair and an occupied one, traction, wheel diameters etc. etc. I don't think you could do this for to long/far with out implementing some form of position correction, this could proove to be the biggest challenge of the whole project. Good Luck Donald Pittendrigh
 
D

Darwin Frerking

Anibal, Seems like a pretty straight forward project. The key requirement would be to determine the type of stimuli the joy stick provided. Does it provide a voltage divider input, a change of frequency input, etc. Once you determine the type of input then provide a switch to select either the joy stick or PLC outputs. You will need a two channel voltage (or frequency) input module and a two channel voltage (or frequency) output module installed in a small DC powered PLC. To record, a program would periodically monitor the inputs recording the levels and also measure the time between input level changes, storing the data. To playback, switch from manual to auto mode and tell the PLC to run the auto program. Of course, the chair would have to start at the identical position it was in when the recording started. Sounds like an interesting project. Regards, Darwin
 
D

Donald Pittendrigh

Hi All I have written some code to convert GPS Nema strings in an S7 300, now does this house have a roof? Regards Donald Pittendrigh > inaccuracy and skids, the wheelchair won't follow the path correctly. > (that's why in factories they've got painted lines on the floor and tracking > systems)
 
G
The concept doesn't represent much of a problem except for collision avoidance. I would suggest taking a look at the Sick Optic Electronics' Proximity Laser Scanner. I know of one company that manufactures self propelled robots that used the PLS in this manner. They were quite successful. The only drawback is the cost, about $6,500 US. Gene Wilkins, CALL Associates
 
J

John Wheatley

This concept would work in a 'perfect' environment in which the time is measured and repeated exactly, and turn angles are known precisely, etc. In the real world, this is a navigation problem. It either requires quite precise gyros or some form of inertial navigation, or better yet a GPS position input. Unfortunately, GPS would not provide 'in the house' precision. A tough problem and no simple solution. JohnW
 
Hello list. Donald Pittendrigh said this is a thread we can play for weeks and he is probably right. I am not an expert on radio transmitters and receivers, but you could place strategically in the house some kind of low-power radio signal emitters that act exactly as the NDB beacons used in civil aviation. This will give you a lot of reference points. With at least two receivers you can then cross-check the source direction of the beacons and calculate a precise position. This can be easily extended to the garden or yard. More detailed info about NDBs and other navigational aids are available from some sites of real aviation or flight simulation. regards Luca Gallina
 
Gentlemen: Re: PLC on a motorized wheelchair Modified Due to a strong consensus among engineers on this board I had modified the PLC on a motorized wheelchair application and decided to install two Quadrature Type Encoders on the wheelchair. Now focusing on the PLC side only here is the main question that is troubling me: By using a High Speed counter card on a Micro PLC able to handle two Encoders, and about fourteen k (14k) of memory and more than seven thousands (7,000) V-Memory words, would I be able to record the trajectory of the wheelchair and have enough memory in the Micro PLC to play it back. Assuming that the full trajectory takes about 20 minutes from start to finish. What kind of encoders should I use? Incremental or Absolute? Do you have an idea on how to store the encoder's pulses and play it back in the right sequence. Thank you all for your kind responses. Anibal
 
Very interesting research on use of ultrasonic for similar purpose was done at Monash Uni. Quite impressive but will not work on PLC ... RTK-GPS is accurate enough but it is costly and IMHO its operation inside of room is unreliable at best. Petr
 
J

Johan Bengtsson

First of all, I would suggest a servo system, since you then can tell it (during playback) to go to a specified position at it will do that instead of trying to correct in the PLC for whatever error you have between recorded position and actual. Well, the amount of memory needed, it does depend on how often you store thing and how, of course. If you, for example, store those two axis every 10ms you would need (assuming 16 bits per axis) 100*2*2=400 byte per second -> 8k in 20 minutes, sounds possible enough Another way of storing is "final" position for each move and (if needed) a timestamp, this takes more for each stored value since you need the timestamp too, but you don't have to save that many values. You won't need much memory to playback. Back to the application, even with a servo system on each axis you can't be sure you are on the right track, it will be much improved over previous suggestion, but not enough I think. Just consider the original position, if the weelchair is in the right place but turned just some degree in the wrong direction you will end up some place unexpected. /Johan Bengtsson ---------------------------------------- P&L, Innovation in training Box 252, S-281 23 H{ssleholm SWEDEN Tel: +46 451 49 460, Fax: +46 451 89 833 E-mail: [email protected] Internet: http://www.pol.se/ ----------------------------------------
 
I like Don's solution best. Better results with GPS could be obtained with the use of a local transmitter beacon for higher position resolution. Safety bumpers would of course still be required to prevent that (oops!) nasty accident. In this case, the GPS would be able to log the tracks as well as store predefined way-points, thereby lightening the load on the PLC. check out Garmin and Trimble GPS websites for more detailed info...then be prepared to spend 5x the value of the wheelchair on the control system !! (excluding the beacon) There is also some interesting reading in Prof. Kevin Warwick's book "In the mind of the machine" which describes some of the preconceptions, limitations and problems similar projects have encountered.
 
Top