|
KiCADKicad
|
|
|
arduino IDEArduino
|
RPI - 8 IO PLC With ATTiny85 Watch Dog
This Project is the starting of a big project which control a big process in low cost. I choose raspberry pi and its my first project in pi. I already work with i/o controllers for my official project, and also work with some plc and scada. But here when use raspberry pi we can able to save data in the pi data base and also have GPIO pins for io controllers. But for process we want some isolated Outputs to safe guard the raspberry pi. First i design the circuit in the prototype board and after complete the project i make a sketch and print pcb.
Symmetric Diagram
1) Use Pi GPIO pins 17,27,22,5,6,13,19,26 for input.
2) For Output use pins 24,25,8,7,12,16,20,21.
3) Use 2N2222 Transistor to control the 24V dc Output Voltage.
4) Use pin 18 for Watch Dog.
5) All the output pins power supply go through the watch dog relay.
Develop Prototype
As usual I develop a circuit board in a proto type board and solder the track and component and test the circuit and found ok. So want to develop the pcb print layout. I search for more than 3 free software and finally found Kicad is the best of all kind. After complete the PCB in Kicad i send the Gerber and Drill File and receive the PCB.
PCB Received
I received the PCB in 5 Days and found all ok. Check all the lines and found ok. But for components it take some more days.
Solder the PCB
I never take photos of components separately. Its very compatible when compare to the prototype. Also only 30 minutes to complete the single board. For both IC Attiny85 Ic and ULN2803A Ic have ic base 8 pin and 18 pin base. So after complete the circuit we insert the IC. Before insert the Attiny85 IC it want to program.
Attiny85 Programming - Watch Dog
I Use arduino uno to program the ATTINY85 IC. Lot of reference available to explain how to upload program to Attiny85. Please check it.
The main concept of watch dog program is pin 3 to read the input from raspberry pi pin no18 and use pin2 to control the relay. Input pin has a sequence of high and low from pi, if there is no change in the pin for set secs then the output relay swicth off and this relay NO terminal is the path for all relay 24v supply. So if this relay switch off all the 8 pins switch off.
Code added in code section.
Control Setup
Connect the Raspberry pi with the IO control board using 40 pin ribbon cable. Connect the 24V Dc power supply to the IO controller board. In the controller Board there are two sides, top one is Digital input side and bottom one is Digital output side. So for input take the common out put form the right side first pin and if short with all other 8 pins it reads the input. For output right side pin is 24V dc common get from watch dog relay and all the other 8 pins are the ground pins, connect a 24V relay module to the output pins with common positive. Now the setup is complete.
Raspberry Pi Python Programming
I use python to develop the program. Use leafpad for programming. In the terminal type leafpad IOcontroller.py. This open a new file in the dir. Compile the program, the program contain lot of small functions. For Watch dog a small function is available at each cycle this function called, so if program hanged to closed then it switch off the all the output. Currently i program to show how it works so if a pin is input is read then a output pin is trigger. If progam closed then the watch dog Attiny85 close the relay. After complete the program In terminal type python3 IOcontroller.py, this run the program it show the visual of which pin is read in the display form and the out put pin trigger is visual in the relay module. See the next video in action.
Working
1) When the program on the watch dog relay ON.
2) When the input signal is sense then the output realy ON and Off when input remove.
3) When input is sense and the output relay is ON, at that time when program close with in few seconds all the relay switch off.
Python program is added in the code area
Not End Its Start
1) Use the USB to 485 convertor to read data from other instruments in pi.
2) Save that data in mysql data base in pi.
3) As per the data received and input switches on status, turn on off the lamps and motors for control.
Its is a perfect low cost automation system with 8 inputs and output with data from other instruments also.Thank you all for reading it.
RPI - 8 IO PLC With ATTiny85 Watch Dog
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(1)
- Jeffery Thompson Apr 21,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Jegatheesan Soundrapandian
- RPI - 8 IO PLC With ATTiny85 Watch Dog This Project is the starting of a big project which control a big process in low cost. I choose rasp...
- BT Control Power Extension Board - Arduino Power extension board with bluetooth control, is used to control all single phase appliances in our ...
- Inchworm Robot - Modular, Move Allsides With BT App All the robots are the inspiration of some natural things. In worms, Inchworm has some special featu...
- Baby MIT Cheetah Robot I like very much to see robots walk like animals. Lot of Robots MIT Cheetah, Boston Spot wow amazing...
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
56 0 0 -
-
-
-
Sega Master System RGB Encoder Switcher Z80 QSB v1.2
57 0 0 -
18650 2S2P Battery Charger, Protection and 5V Output Board
78 0 0 -
High Precision Thermal Imager + Infrared Thermometer | OpenTemp
422 0 6 -
Sony PlayStation Multi Output Frequency Oscillator (MOFO) v1
129 0 2