PIC, BASIC STAMP or microcontroller as a PLC

hickman

Member
Join Date
Aug 2003
Location
North Central Texas
Posts
31
I was wondering if anyone has experience using microcontrollers (aka PICs or BASIC STAMPs) as a PLC. I know I/O would be extremely limited, but that's precisely the point. I'm thinking that one of these programmable controllers might be great for small applications. They are mainly used, at this point in time, by hobbyist, especially robot junkies. PICs are a hot topic right now in all the electronics publications. A BASIC STAMP can even be purchased at Radio Shack or direct from the mfgr, Parallax.

I would've already tried one, but I don't know enough about them. I bought a book on PICs and read it. It told all about the processor, memory, etc, etc, but it didn't go into any practical usage, sample programs, etc.

I'd love to tinker with one of these if I could get some good info.

Let me know about your experiences.
 
I built a working PLC based on the Basic Stamp 2 right
after it came to market. 16 I/O. I setup 8 sinking outputs,
1/2 amp rating each, using Darlington transistor IC's.

I had visions of this being a money maker because
it could be programmed in BASIC. Coming from the field
of Assembly and C programming I thought PLC's were obsolete
with their electrical schematic approach to programming.

WELL, it was precisely at this time after writing and testing
programs for my new prototype PLC, that I realized the beauty of
the visual ladder logic programming method.

It is ugly reading thru lines of

If in1=1 and in2=1 or in3=1 then out 1
If in4=0 and in5=1 then goto 200
If in6=1 then gosub 500

Imagine reading thru pages of this stuff to troubleshoot
a machine or process! No good.

Over the years I've kinda come to the think that
programming will become more visually oriented in the future.

Who knows, C++ may be obsolete some day if a good visual
programming methology comes along similiar to ladder.

Back to your question, Stamps are a great product and
a lot of fun to work with. If you are interested in tinkering
with microcontrollers this one gets my highest recommendation.
Just keep in mind that if you use one for an industrial app.,
some day someone will probably have to work on your Stamp controlled
machine or process.
 
Last edited:
Try this, http://mindstorms.lego.com/eng/products/ris/index.asp , it will get you started on using them.

This is another good resource http://www.robotics.com/robots.html

There are also ways to control I/O directly with a PC or you can play with a stamp etc and try to create something.

Its fun to try.
I agree with Allen, the key to this would be the programming and communication aspect.

Once upon a time I was thinking of getting, any may get, SoftPLC. Its based on AB PLC5 ladder, is its own OS, need dos but no windows. Maybe one day.
 
Last edited:
What are you trying to do?

If you are trying to do something that a PLC would normally do then I would look at at AD DL05. If you are doing something that is math or communication intensive the I would look at a Z-World Rabbit. The Z-World Rabbit is programmed using Dynamic C which isn't quite standard but it has a multi tasking OS that allows one to do real projects.
It also has a fast floating point package and a TCP/IP library.
 
Lego product...

rsdoran: What Lego product were you referring to? That link seems to be dead. I got to the MindStorm main page, but I wasn't sure what specific product you were referring to.

Thanks for the info!
 
PLC's are versatile devices. They can be easily programmed to do a mulitiple of process's and the trouble shooting with ladder logic is simple. However, while being a device that "one size fits all" it can not do a dedicated funtion that is out of its realm. Example: You have a motor-leadscrew positioning device with a 1000 pulse per rev resolver. Most PLC's have a high speed counter input BUT it is limited to 5Khz. 1000 pulse per rev at 1800 rpm is approx 1.8 Mhz. Way out of realm for a PLC! Using a PIC running at 40Mhz, a MAX232A for communication, optoisolators for inputs, and a telecommunication relay or NPN transitor for the output you could make this project work. Using the PLC seial port to upload the information to the PIC and have it run the motor drive. This is where I see the future for these devices.
 
Robotics Invention System 2.0
or
Spybotics

These things are just plain fun and give you an idea how to use stamps etc. Look at the robotics link I gave too, it has alot of resource links that will show you have to build things using motors off old printers etc.

I did have a pen plotter I made using old printer motors, I need to make a more sophisticated model.

Personally I dont think it matters whether using stamps etc are worthwhile or cost efficient in an industrial environment. The path(s) and learning will be invaluable, plus you get to have a little fun with it. There will always be a place for the knowledge gathered.
 
http://www.hvwtech.com/pages/products_view.asp?ProductID=440

Theres a "Industrial Control Board" for a Basic Stamp II or any other compatible micro (Basic Atom ect...). I discovered it just the other day and I remember thinking to myself, why would anyone want to use a a basic stamp in industrial control, specially at that price point.

The only thing I could think of was for small servo or stepper control, but even then, I could thinking of cheaper (maybe or maybe not better) ways with a PLC and a stepper or servo IC controller.

I would be very interested if anybody has some real world applications for Stamps (or another micro controller) in an industrial environment).

One of the little projects I did with a Basic Stamp II was wire it to a Traffic Light using solid state relays. I wouldnt really call that industrial, but its as close as I came so far.

Anyways, Have Fun!
 
hickman...

Don't limit yourself by thinking that a "Stamp" has "so few I/O".

I/O can serve as an "address/data bus". As fast as those guys go, you can "communicate" with a multitude of other "Stamp" devices in very reasonable time. There might be noise issues but they can be overcome. You would have to develop a "Bus Controller" to manage traffic.

You could have one Stamp act as the Boss (Master Control) and several others as Slaves (Local Control).

All of those Stamps could be on the same card. You could end up with a True Multi-Processor in the sense that you can have ten people doing whatever it is that they do at the same time... think Military Maneuvers... think Generals and Platoon Sergeants.

The Sergents get their "orders" and use their "resources" to do what has to be done. Meanwhile, they keep the General up-to-date on the field situation - as required. The General then makes tactical changes in his orders as required to meet the changing field conditions.

And... the great part is... if you use Stamps that speak "C", then you can literally use "English Phrases" for evaluations and subsequent commands! In "C" you can name your own functions - as in...
"If Station-1_has_Finished_Processing_the_Part" then "Send_the_Part_to_Station-2".

It really ain't that hard to do. And if you do, then you are doing better than most PLC designers!

It should be readily apparent that PLC designers are trying to develop "quasi-multi-processing" (heavy on the "quasi") with software while still using the basic 8088 design. That is, they are using a "Grafcet" type scheme to make you feel that you are getting 2, 3, or more for the price of one!

Peter and his "Delta Computers" are a great example of what I'm talking about. On Peter's motion cards, all he wants is some direction... a command... "Tell me what you want and I'll take it from there!"

A Delta Computer Motion Card is what it says it is... a stand-alone Computer (it's faster than most, if not all, PLC Processors). It gets it's commands through a sorta-kinda data bus... that is, it gets its' marching orders through a set of dedicated V-Mem locations in the PLC. Those V-Mem locations (PLC-to-Delta) are updated on "PLC-time".

So anyway, hickman... if you play this game, you'll be playing up there with the BIG-BOY(S)... Peter and his Delta Computer among others.

As a mental challenge (BTW, speaking of "mental challenges", I will be posting some general, only general, thoughts on the PLC VENDOR SECURITY CODE), this is a GREAT exercise! And can easily grow to be more than simply a challenge - it could be a career!

Don't let anyone discourage you with phrases such as... "Don't Re-Invent the Wheel", or, "If it ain't Broke, Don't Fix It". A lot mo'better has been accomplished by "Re-Inventing the _______" and "Fixing the damned _______ that ain't broken!". Sometimes it's a case of, "If it ain't broken... Break the GD Thing!"

Be "System-Minded" - that means, plant-wide! Look at "bottom-line", i.e. profit!

If der ain't no profit... der ain't no jobs!

Imagination is what makes the World-go-'Round!"
 

Similar Topics

This is the motor nameplate from one of the powder hoist motors on the USS Texas an older generation battle ship, built in 1911-1914 ish. The...
Replies
1
Views
293
Hello, I'm am engineer for a plastic manufacturer. We swapped out a oem motor with one of equivalent nameplate stats made by marathon on our roll...
Replies
3
Views
482
good afternoon all I had to pull out the old 1747-pic module my question it has a 25 pin connection I need to go to a 9 pin connection do pin 2...
Replies
6
Views
1,590
Totally off topic, but strange observation. I purchased a few cisco ethernet switches off of ebay some years ago. They are part of a home lab...
Replies
6
Views
2,077
Hi Guys, Please, I need a topic that I can work on, to practise and improve my PLC programming skills and add to my portfolio. Thanks
Replies
30
Views
4,145
Back
Top Bottom