Author Topic: PLC with a PIC Microcontroller  (Read 4141 times)

0 Members and 1 Guest are viewing this topic.

Offline thomieboyTopic starter

  • Contributor
  • Posts: 20
  • Country: be
  • Hello!
PLC with a PIC Microcontroller
« on: October 07, 2013, 03:47:59 pm »
Hello, everybody!
I'm 16 years old and a student at VTI Roeselare in Belgium.

I just want to show you guys what we are "designing" and mayby you guys can give me some advice or ideas!  :-+

We are making as the title said, a PLC with a PIC. It's for the pupils of the previous year who learn to work with programming (Flowcode).
I will atach a .zip file with the eagle drawing, don't mind the pcb design, it's not ready yet. If you have any questions you can ask me !

Hope you like it, and please leave a comment of what you think about it!  ;)



http://imageshack.us/f/163/5u3o.jpg/

p.s. Sorry for bad English....
Thank you!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PLC with a PIC Microcontroller
« Reply #1 on: October 07, 2013, 06:54:51 pm »
Nicely drawn.

Simulating a PLC with a PIC is quite doable and has been done before.

Since you already used optos on the input / output, it is a shame that you have to die the ground together.
================================
https://dannyelectronics.wordpress.com/
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7611
  • Country: nl
  • Current job: ATEX product design
Re: PLC with a PIC Microcontroller
« Reply #2 on: October 07, 2013, 07:16:38 pm »
Really nice. One consideration: The LED and the optocoupler in series might prevent you to use 5V signals on the digital inputs, as too much voltage drops on them. You can relocate the LEDs after the optocoupler maybe.
 

Offline thomieboyTopic starter

  • Contributor
  • Posts: 20
  • Country: be
  • Hello!
Re: PLC with a PIC Microcontroller
« Reply #3 on: October 07, 2013, 07:41:29 pm »
Really nice. One consideration: The LED and the optocoupler in series might prevent you to use 5V signals on the digital inputs, as too much voltage drops on them. You can relocate the LEDs after the optocoupler maybe.

Hello, Thank you! And about the led, the inputs are designed to receive 24 volts. (or less)  :)
Thank you!
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: PLC with a PIC Microcontroller
« Reply #4 on: October 07, 2013, 07:44:36 pm »
That's not the point: you don't have to share ground with the input / output, as you have couplers on both ends.

And I would also back-to-back connect the input diode to the leds to reverse protect them better - your scheme works now but can do better.
================================
https://dannyelectronics.wordpress.com/
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7611
  • Country: nl
  • Current job: ATEX product design
Re: PLC with a PIC Microcontroller
« Reply #5 on: October 08, 2013, 03:55:46 pm »
Really nice. One consideration: The LED and the optocoupler in series might prevent you to use 5V signals on the digital inputs, as too much voltage drops on them. You can relocate the LEDs after the optocoupler maybe.

Hello, Thank you! And about the led, the inputs are designed to receive 24 volts. (or less)  :)
Sorry that I will not look into your layout, but I'm not eagle guy. I was only suggesting the 5V compatibility, because then you can interface it with 5V logic, which is nice.
Also, for 24V input, you will have ~20mA input current on the optocouplers. A single 1K resistor will dissipate 0.4W in this case. So make sure that they can dissipate this heat. Usually this means that "the smallest" through hole resistors and 0805 SMD will not be able to handle this, you need something bigger.
 

Offline thomieboyTopic starter

  • Contributor
  • Posts: 20
  • Country: be
  • Hello!
Re: PLC with a PIC Microcontroller
« Reply #6 on: October 08, 2013, 04:13:53 pm »
Really nice. One consideration: The LED and the optocoupler in series might prevent you to use 5V signals on the digital inputs, as too much voltage drops on them. You can relocate the LEDs after the optocoupler maybe.

Hello, Thank you! And about the led, the inputs are designed to receive 24 volts. (or less)  :)
Sorry that I will not look into your layout, but I'm not eagle guy. I was only suggesting the 5V compatibility, because then you can interface it with 5V logic, which is nice.
Also, for 24V input, you will have ~20mA input current on the optocouplers. A single 1K resistor will dissipate 0.4W in this case. So make sure that they can dissipate this heat. Usually this means that "the smallest" through hole resistors and 0805 SMD will not be able to handle this, you need something bigger.

Ok, Thank you, we were planning to use a 1/2 watt resistor, and if they get to got a 1 W one.
Thank you!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf