NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Project help

October 25, 2010
by FrankyRizzo
FrankyRizzo's Avatar

I am looking to build an automated shop press. This press works on the same part all of the time so it should be somewhat easy. So here's the idea. There will be a conveyor belt to bring the part onto the press table. The part will be pressed then another belt will bring the part off of the table and into a basket. I need to power the first and second conveyor belt with a electric motor. When the part gets to the right place under the press there will be a gate or some other stop. The "stop" will have a contact sensor telling the electric motor to stop. Keeping in mind that the part is against the "stop" sensor I need the press to complete one cycle and lift or retract the "stop" and carry the part off and repeat the process. I am very new to electronic engineering and would appreciate ANY input you guys can give me.

October 25, 2010
by Rick_S
Rick_S's Avatar

PLCs (programmable logic controls) are industrial devices engineered for just that purpose. While a microcontroller with external sensors and drive controllers, etc.. could fill the purpose, sometimes it's better just to use something made for the task. There are a lot of safeties involved in designing a control system. If you do decide to attemt this, make sure you have as many safeties as you can in mind.

Rick

October 25, 2010
by mongo
mongo's Avatar

PLC's are very popular in industry. Programming them is usually pretty easy with the newer ones but there is a very steep learning curve. You might find used PLC's on Ebay and maybe even the comm and programming software for them too.

I have a couple of old Allen Bradley SLC100 PLC's. I had to write my own software but there is something called PCIS that does exactly the same thing. I also had to build the interface because they do not use RS232.

They make the Christmas tree lights look cool though.

Rick is right about safeties. By handing over operation to automation, every way someone can get hurt needs to be well thought out and dealt with. Either with safety switches or engineering devices like guards and barriers.

Most safety circuits disconnect the operating voltage to all outputs but not the control system. You also need to look at the failure modes of them so that they prevent operation in the case that a safety device becomes inoperable.

October 25, 2010
by FrankyRizzo
FrankyRizzo's Avatar

Thanks for the input. I do have a safety switch. The press is in it's own cabinet with a plexi-glass door and the machine will not operate with the door open.

October 25, 2010
by FrankyRizzo
FrankyRizzo's Avatar

Will you please explain exactly what a PLC is and how it works?

October 25, 2010
by FrankyRizzo
FrankyRizzo's Avatar

One thing I forgot to mention is that this machine runs off of a 12 volt car battery will a PLC work in this application? Does a PLC require a PC to run or is the PC just for progamming? A PC would put a damper on it's portability.

October 26, 2010
by Rick_S
Rick_S's Avatar

A PLC is somewhat like the industrial equivalent of a microcontroller. It is a self contained unit that has inputs and outputs. The ones I have seen (though I've never programmed one) use their own ladder logic type programming and are used for doing exactly what you are wanting to do.

All the PLC's I've been exposed to are in industrial metal cutting CNC machines (My profession is CNC programming). These plc's are running on 220 or 110 VAC. They have their own power supplies and their I/O is at 24VDC. There are most likly others that operate on different voltages.

A project of this nature is not one to jump into without a real good understanding of what is used to make controls like this work. How is the machine currently operated? Is this a simple manual machine you are wanting to automate or is it a machine you are trying to design?

My suggestion would be to read up on PLC's, look at what you are trying to do, determine what will work best, and pursue that. For a microcontroller to run machinery, though it will, you will need to isolate it from the outside world while still talking to it. You'll need shielding to prevent stray RF (Radio Frequency) interference from messing with it. You'll need clean power. You'll need several different types of sensors including but not limited to limit switches, proximity sensors, emergency stop buttons, possibly encoders, etc...

This is a big undertaking and maybe even a bit beyond the scope here. But we all have different experiences so you may get some of the help you need. :D

Rick

October 26, 2010
by Ralphxyz
Ralphxyz's Avatar

A PLC is a Programable Logic Array.

While this could be very involved as described above I think you could start with the nerdkit, I assume you have one, to turn your first conveyor belt motor on and off (start stop) see the motor tutorial. Then lets try stoping the belt with some sort of sensor again using the Nerdkit mcu. Most conveyor belt sensors either use optical or proximity sensors again these are doable with the ATmega168, they essentially are just on or off switches.

And so on, one step at a time if noting else you will see the feasibility or futility in implementing your idea and gain a lot of knowledge about electronics and mcu programming.

You can find examples of code implementing the above steps here on/in the forum, you will have to modify what you find but it is doable.

We will be glad to help when (not if) you have questions.

Yes you have to be careful but most prototypes do not go for UL listings.

So how would you start and stop a motor from a button press? How would a sensor stop the motor? Using optical or proximity sensors instead of a gate would eliminate the step of removing the barrier.

Once you have these steps implemented the remaining steps would be either reusing what you have done or reversing it.

This sounds like fun.

Ralph

October 26, 2010
by FrankyRizzo
FrankyRizzo's Avatar

Here's what I have done. I purchased a standard manual shop press and an electric hydraulic pump (used for a snow plow). I removed the manual pump and plumbed in the electric pump. I used the switches and relays that came with the pump and the press works great. I put the press in a metal cabinet 36"x36". I cut a piece of plexi-glass to fit on the front with a piano hinge. I added a safety switch to the door frame so that when the door is open power is cut to the pump motor. I have a 12v car battery powering the hydraulic pump. Like I stated before all of parts this machine works on are exactly the same size. All I need is something that tells the electric motors when to go. I have collected most of the parts necessary to construct the conveyor assembly. I need the Nerd Kit to trigger on relays to start the right motor at the right time. I have 10 years of fabrication experience. Computers and electronics have always been a hobby of mine and recently I have become fascinated with micro controllers. Just trying to wrap my head around the programming, it's a little confusing at first.

October 26, 2010
by Rick_S
Rick_S's Avatar

If you choose to use a microcontroller, you would most likely want to controll your pump motor with a relay as I'm sure it has a pretty high current draw. You may want to controll drive motors for the conveyors with relays as well. If it were me, I would probably put opto-isolators between the relays and the micro-controller to eliminate the worry about any feedback. That would take care of the drives. You would also need either proximity switches, optical sensors, or limit switches, or a combination of the above to determine the position of the workpiece and press to know when to actuate the conveyor motors and press pump. The programming wouldn't be terribly complicated. Getting all the hardware positioned and timed would be a little more difficult.

Look over the motor tutorial Ralph suggested, also look at how buttons are recognized as your limit/proximity/optical sensors would feed back similarly.

Rick

October 26, 2010
by Ralphxyz
Ralphxyz's Avatar

Just take it one step at a time.

You need code to:

    1. recognize a button press.
    2. pull a pin high to activate a relay or a transistor to start the motor when the button is pressed 
       (you do not even need to know how to do interrupts, I prompted a long discussion on

AVRfreaks

            about using interrupts for button pushes and it turns out that there is no advantage to using interrupts
            for a button press the replies got rather hostile but the general consensus was that button presses 
            are a good way to learn interrupts but essentially not needed for human button presses. Of course there never was a consensus
            on how to process a button. So for now you you do not need to spend the time learning interrupts. 
            You will still need to de-bounce your button of course. 
        3. turn the motor off if the door is open this may or may not be needed but having a button to shut everything down 
            would be best.
        4. decide how you are going to "sense" the presence of your work piece and it's position.
            Using leds and light detectors is probable the least expensive method, you can either use reflection or interrupt
            a beam of light. How are you going to position the piece on the press? You might use a servo with a arm to move the 
            piece into position and then to push it to the out conveyor. Maybe this would need two servos I do not know how heavy 
            your piece is.
        5. reuse your button start/stop code for the sensor.
        6. write code to control positioning.
        7. write code for extracting (could be the same code as above).
        8. reuse the motor start/stop code to start the out conveyor.

I would assume positioning of the piece is critical, you probable don't want to apply pressure off sensor so possible your original of using a stop that lays flat would be needed.

I am sure I have missed steps but everything I have outlined above is already done here on the forum just do a search. In fact the tutorials will be your best guide. Possible there isn't a tutorial on positioning things (hint hint) but the basic concepts are covered here in the forum.

Ready Set Go!!

Ralph

October 26, 2010
by mongo
mongo's Avatar

There are PLC's available that operate on 12V but they are not cheap. I ran a portable unit off an inverter. The inputs and outputs were 24VDC but the main power had to be 120VAC.

A PLC has a variety of inputs and outputs which act like the inputs and outputs of a logic circuit. Here is a short example.

INPUT 1 INPUT 2 INPUT 3 OUTPUT

--][----------][------------]/[---------(100)

It looks at the conditions of the inputs or other portions of the program called "rungs" of the ladder, as this is one. It looks for inputs 1 and 2 to have a signal while input 3 would not have a signal. If these conditions are met, the output is energized. Think of them as switches in a circuit where they are either on or off. They are only representative of the real world and the inputs can be anything that provides a usable signal. The advantage here is that they can be thought of as relays with any number of contacts.

October 26, 2010
by mongo
mongo's Avatar

Programming a PLC has changed over the years. They started out with hand-held units that had to be translated from the ladder logic program to a boolean format that used words of a sort, to enter the instructions. It is a labor intensive process and many times, has to be done in one sitting. From there, it progressed to dedicated terminal machines that resembled computers. They connected through the same programming port and the programs could be created and edited much easier. They were cumbersome but better than the hand-helds. Nowadays, almost any laptop can be used. The software is installed on the laptop and the cable is connected directly or through a converter, (depending on the setup) and the program can be loaded into the PLC easily.

The newer units can be programmed remotely, through TCP/IP and the internet, as well as monitored and modified real-time.

Post a Reply

Please log in to post a reply.

Did you know that the Timer/Counter modules on the microcontroller can be configured to output a PWM (Pulse Width Modulation) signal? Learn more...