What do you think of my plc design? - Page 1
Forum section: electronics / beginners

author: little_carlos
author_rank: Regular Contributor
timestamp: March 23, 2015, 01:08:53 am
content: hello guys, ive designed a plc with a pic16f628a and I want any advices from you that can make it betterhere you can get the design on proteus 8 :https://drive.google.com/file/d/0ByZ0-o9i4wPNemJCaVFVdkE2LWs/view?usp=sharingthanks

author: picandmix
author_rank: Frequent Contributor
timestamp: March 23, 2015, 10:06:41 am
content: First off could not load your design into my version of proteus 8 and your pdf file only shows part of the circuit, perhaps you could post a fuller pdf.As to the detail of the circuit, a bit of work is needed.While the 628a is a decent enough chip, the 16F88 is so much better if you can get it.Its got ADC inputs and the same pinout as the 628a.There are some even more modern pin compatible chips around but you have to be sure you have the right programmer for them, some need a PK3 , the 628 and 88 only need a Pk2 .For the inputs, if you look around there are quad opto chips so easier to use than individual chips.On the input pins you want to fit a polarity diode to prevent damage by reversed connections.The optos leds ground connection should come from the input device, not the ground connection to the Pic circuit, otherwise you do not have isolation.On the outputs you do not have the flyback diode shown, plus again there is the UNL2803A chip which has 8 channels and has all the input resistors and flyback diodes included.See here -https://www.eevblog.com/forum/beginners/unl2803a-relay-driver-pin-connection/Looks like you might need some other improvements but until you can post a complete pdf cannot be sure whats needed.

author: little_carlos
author_rank: Regular Contributor
timestamp: March 24, 2015, 03:24:51 am
content: well, il follow what you say, thanks for the adviceabout the optos ground, im following the same connection that a normal or industrial plc have, the ground connection is provided by its own power supply, switches or sensors will only give between 5 or 12v to the input so, i dont need that much protection

author: aidan2496
author_rank: Contributor
timestamp: April 16, 2015, 11:09:14 am
content: Its pretty good!

author: wraper
author_rank: Unknown
timestamp: April 16, 2015, 11:26:00 am
content: Strange selection of the microcontroller for the new design as it isveryold. Only one 100nF capacitor on the 5V rail is not enough. Connecting inputs of the optocouplers to GND severely negates their purpose. They no longer protect from the ground loops / transients introduced. Contacts of the relays needs some protection against arching if you planning connecting any significant load to them.PCB layout is not good, no decoupling near to the MCU at all.Edit: I see that you are intended to power input of the optocouplers from the same 5V rail as MCU power, so optocoplers are useless as provide almost no protection at all.

author: Quark-elec
author_rank: Contributor
timestamp: April 16, 2015, 12:06:28 pm
content: Sound great?

author: wraper
author_rank: Unknown
timestamp: April 16, 2015, 09:35:33 pm
content: BTW, there are no reverse voltage clamping diodes (or trasil, something else) connected to the relay coils, so all BC547 will fail.

author: wemme
author_rank: Regular Contributor
timestamp: April 16, 2015, 10:12:31 pm
content: Hello,Any chance of a pdf schematic i don't have protous and the sch pdf is not complete.From what I can see you have no flyback diodes on the relay coils and perhaps insufficient decoupling on your regulator.RegardsBart