Compact PLC or Discrete Components?

Thread Starter

flon_klar

Joined Feb 21, 2018
11
Hey Guys-

I'm very new at electronics and still getting my feet wet, building guitar effects and other small projects. My biggest problem is that I have lots of ideas, but I still lack the knowledge and proficiency to realize them. I'm currently thinking about a small electro-mechanical apparatus that basically would utilize a couple of servos to manipulate a few mechanical parts, initiated by the output signal of some type of proximity or opto switch, and all wrapped up in a user-adjustable timed sequence. I have decades of mechanical experience, including a bit of PLC ladder programming, but I don't code (yet).

I'm weighing the use of a circuit board/components against using a PLC unit (something din-rail-mountable would be great!). I'm not too up on the current state of miniature PLCs, so I'm not sure exactly what's available or good. My project has a fairly simple layout, so I don't want to spend a lot of money on a controller if it's not feasible, but it would make the design much cleaner. I'd like to ask for advice that would help to guide my decision. If any of you have experience with relatively modern PLCs (I'm not necessarily looking for state-of-the-art), I'd appreciate any assistance you can offer. Thanks.

John
 

Dodgydave

Joined Jun 22, 2012
11,285
Your choice of plc/ microcontroller would be decided by how many inputs/outputs you need to control, Schneider do one for £90/€110, it has 10inputs, 4 outputs, @24v powered. I'm sure you can search Google or ebay for your desired one.
 

Thread Starter

flon_klar

Joined Feb 21, 2018
11
Your choice of plc/ microcontroller would be decided by how many inputs/outputs you need to control, Schneider do one for £90/€110, it has 10inputs, 4 outputs, @24v powered. I'm sure you can search Google or ebay for your desired one.
Lol! It’s the Googling and eBay-searching that brought me here to ask the question. I was so bewildered by all the toys, their add-on modules, and peripherals, I didn’t even know where to start. I don’t know who’s making reliable equipment these days, or what would be considered a good value. I don’t think I could see myself spending $200 on a controller.

As far as I/O, I expect to need 2 ins and 5-8 outputs, so the Schneider you mentioned probably wouldn’t suit me. But thanks for the tip, I’ll check out their catalog to see what they offer.
 

mcgyvr

Joined Oct 15, 2009
5,394
Servo? As in tiny plastic hobby/RC servos.. Or more industrial servo...

If you want to do PLC you can certainly do a PLC..
You might also want to give an Arduino a shot assuming this is hobby servos you are talking about..
 

kjj

Joined Mar 30, 2018
31
I would guess that a PLC is overkill. Do you have any reason NOT to go for an Arduino? Free and open source libraries for almost everything, including servos. Arduino Nano is my favorite, costs about 3 dollars on eBay/Aliexpress.
 

dendad

Joined Feb 20, 2016
4,452
I would vote for the Arduino, even if you just use it as a learning tool. They are very cheap, programming environment is free, and there is loads of help and examples out there.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
The main problem with PLC for servo operation they do not operate in 'real time' so in the case of servo's etc, motor with feedback etc, a specialty module has to be implemented, IOW you cannot use regular I/O.
Also the expense would be rather high compared to say a Pic or other μP solution.
The solution using a picmicro is relatively simple and Cheap..
Max.
 

strantor

Joined Oct 3, 2010
6,782
If this is something you're just playing with home, PLC is overkill. In order to do this with a PLC you would need an advanced model with high speed IO (motion control axis).

Arduino or PIC can do this easily for very low cost. But there is a learning curve. If you can spare a few days/weeks/months (I don't know how fast you learn or how involved your project actually is) in a knowledge quest to figure this out, then go with Arduino or PIC.

If you're in a rush and already familiar with PLCs, and you have several hundred $ laying around looking for purpose, then get a PLC. But be aware there will also be a (shorter) learning curve with the PLC, based on what you've indicated.
 

shteii01

Joined Feb 19, 2010
4,644
The thing to keep in mind is that you don't need to build the whole thing at once.

You know what parts you want. Light, sound, motion, etc. So build each sub system using cheap, easy to find, community supported parts. Yes, you will be using hobbyist, toy like sensors and stuff, but you learn what does what and how, and you will have core of the code that you would need if you ever move on to the real thing.

Arduino boards have been suggested already. Uno is good start. Cheap Chinese Uno from ebay is the way to go. Here is something you will want in addition to the Uno board: https://www.ebay.com/itm/Arduino-Pr...111796?hash=item3f627a2574:g:pLYAAOSwubRXLN39 These pieces plug into the board and provide you with ability to simply attach wires from your sensors and other stuff, no need for special jumper wires.

uno overall.jpg

uno inserting screw terminals.jpg uno screw terminals inserted all the way.jpg
uno screw terminals.jpg
uno screws of screw terminals.jpg
 

Thread Starter

flon_klar

Joined Feb 21, 2018
11
Thanks for all the input everyone. I have been working with the Arduino a little bit, which is why I said that I don't code yet. I do have another planned project that will rely on processor speed to function properly, so Arduino is already figured into that project. With limited spare time, it's difficult to sit down and learn coding, but due to financial costs, it sounds like that will be my best option, even though none of the components of the current project really need to actuate in rapid-fire succession. One of the servos will need to have relatively high torque, so it won't be cheap- Adafruit has some things that look promising. Thanks again!
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Do you require precise servo positioning or will point to point position by means of L.S./sensor etc suffice?
Point to point is much easier to program and implement, if over-run is a problem, motors with build in brake can be obtained also these can be separately sourced.
Max.
 

Thread Starter

flon_klar

Joined Feb 21, 2018
11
Do you require precise servo positioning or will point to point position by means of L.S./sensor etc suffice?
Point to point is much easier to program and implement, if over-run is a problem, motors with build in brake can be obtained also these can be separately sourced.
Max.

The tightest servo position tolerance I need is probably somewhere around .030”, so accuracy isn’t so critical. Now I’m thinking I could use a linear actuator in place of one of the servos.
 

MaxHeadRoom

Joined Jul 18, 2013
28,619
Linear Actuators position fairly precise as the mechanism tend to resist back-feeding due to the type of mechanism and has the effect of braking the motor.
With a suitable DC motor you could drive it with a simple 555 PWM controller if rpm control is needed.
Max.
 

danadak

Joined Mar 10, 2018
4,057
You might consider PSOC -

https://program-plc.blogspot.com/2015/02/build-very-cheap-plc-using-programmable.html

It has both analog ( OpAmps, DACs, Vref, Muxes, A/D DelSig and SAR, Comparators )
and ARM core and digital logic elements and digital filter (PSOC 5LP family), another
simple GUI wizard to set it up.

Has state machine wizard where you can do a HW sequencer based on GUI tool
to set it up. Tons of onboard HW like counters, timers, PWM (for servo).

https://www.hackster.io/PSoC_Rocks/psoc-4-how-to-control-a-servo-93b14c

You can start by just drag and drop components onto its schematic, right click to
config settings, wire them up to pins, and for most issue one command, a Start()
command, and you have basic controller.

To start there are lots of logic components that require no code. Just drag onto schematic,
and wire therm up to input, output, internal to each other........

There are two boards to consider, PSOC 4 board low end, $ 4, and high end board,
PSOC 5LP $ 10.

Tons of videos to get started. Google "PSOC 101" series and look at lesson 1 - 4,
there are 16 lessons in all I think.

http://www.cypress.com/documentation/development-kitsboards/psoc-4-cy8ckit-049-4xxx-prototyping-kits

http://www.cypress.com/documentatio...oc-5lp-prototyping-kit-onboard-programmer-and

Attached is a list of components PSOC has, a component an onchip resource. The 5LP has
virtually all, whereas the 4 family a subset.

element14.com has tons of projects already done. So does Cypress. Tool, "PSOC Creator" and its
compiler free.

https://www.element14.com/community/thread/23736/l/100-projects-in-100-days?displayFullThread=true


Regards, Dana.
 

Attachments

Last edited:
Top