Project: Lira-PLC
Updated: 14 Dec, 2024
I was browsing Mercado Livre the other day looking for a USB-RS485 converter when I came across a mini PLC for panels. At that moment, I thought: this would be a great project to publish on this site.
And so, it is with pleasure that I begin my first public project: the Lira-PLC.
The idea is to make it a completely open-source project while showcasing the entire journey of developing a product like this, from conception to testing and improvements.
Motivation
I’m doing this for three reasons:
Marketing and Learning - This site is meant to be my personal brand, and with this project, I can demonstrate various skills as well as learn new tools and processes.
Giving Back - The internet has always helped me a lot, and for a long time, I’ve wanted to give back to the community by sharing some of my experiences. Who knows, I might help someone along the way. That’s why I want to keep this and many other projects open, developed with open-source tools and permissive licenses whenever I can.
Delivering Value - I often find circuits online, but it’s quite difficult to come across proper documentation about the process of developing a product. I also want to present all the reasoning behind product development and problem-solving.
What already exists?
Before diving into developing anything, it’s necessary to research what’s already available to identify market patterns and trends.
One of the greatest lessons I’ve learned in my professional life so far is to be humble before the market.
For a long time, I believed the market was making several mistakes and that I knew what was better for the customers.
I was wrong.
Most products and services often have solid reasons for being the way they are, and at the beginning of our careers, we fail to see those reasons.
I’ll write an article about this one day.
Autonomy is an open-source, multi-hardware IDE for PLC programming that follows IEC 61131-3, which is used to program various PLCs in the market. Therefore, I’ll use Autonomy as the firmware and programming IDE for the Lira-PLC. It’s based on Beremiz, which, as far as I understand, converts IEC 61131-3 languages into C.
On the web, I found Facts Engineering, a company specializing in manufacturing low-cost automation products. The PLCs I researched are priced at around 50 USD per module, meaning a PLC with a CPU, an input module, and an output module would cost approximately 150 USD.
During a visit to the USA, I came across a company called Controllino. They offer PLCs compatible with the Arduino IDE. Their entry-level models cost around 150 EUR.
And the model I saw on Mercado Livre that inspired me, the Mini PLC, costs approximately 385 BRL. It’s a good model but quite limited, with 4 inputs and 4 outputs.
To summarize, basic models from three different continents have an average price of around 100 USD.
My goal is to be aggressive and deliver a robust PLC for 50 USD.
It may be necessary to use ready-made modules to achieve this goal, but between price and open-source design, I'll choose open-source.
Regarding open source, in a quick research I've found the following good and solid projects:
- PLC Demo on Analog Devices;
- Small Open Source PLC on Starting Electronics. The site also features the Large Open PLC project, which is basically an extended version of the Small PLC.
Resources
Texas Instruments makes many open projects available on their website. I’ve learned a lot by researching there. If you search for PLC, you’ll find many examples of circuits.
Texas also provides the TINA-TI simulation tool for free. It’s a great software that I use in all my projects. This free version is more than enough for most applications.
Other electronics manufacturers, such as Microchip, Analog Devices, and STM, also provide open projects. They’re excellent for learning and using as references.
The Arduino website has several resources like schematics, 3D files, among others, for research. And since Autonomy has high compatibility with Arduino, I might use resources from there.
I’ll use KiCad for electronic designs. It’s an excellent software and doesn’t fall short compared to Altium or Eagle when it comes to basic development (I know Altium has other advanced functionalities).
I’ll do everything from home, so my resources for electrical and mechanical testing are limited. That’s why I’ll conduct simple tests with the tools I have available. If I need to manufacture something complex to test the PLC, I’ll lose focus, so I probably won’t do the test.
Project Requirements
These are the initial desired requirements for the project. Changes may occur as the work progresses.
- Power supply: 5 to 24V DC - I believe this is the best approach since 24V is the market standard and 5V is used by hobbyists.
- DIN rail case.
- Digital IO: 8 inputs and 8 outputs: 6 digital and 2 relay.
- Analog IO: 2 inputs 0-10V 10 bits.
- Communication: RS485 Modbus RTU and USB type B for programming.
- Tests: vibration, galvanic isolation, short-circuit, temperature, and humidity.
Project Constraints
- Only IEC 61131, no other programming languages - Although it’s possible to program it in C or another language, I don’t want to complicate things. The market uses IEC 61131-3, so I’ll use it unless Autonomy doesn’t work.
- $50 budget for raw materials.
- No modules - I want a complete PLC.
Deadlines and Tasks
Every project must have well-defined goals and deadlines, so I broke it into the tasks below using Jira for personal task management, as I’m working alone.
I’m just starting to use Jira, so things are pretty simple for now. As I learn more, I’ll share my insights.
In Conclusion
The Lira-PLC project is now officially open.
I’m very excited about this project and wanted to include a lot more information here, but as I’ve been learning in life: less is more, and done is much better than perfect.
In the next posts, I’ll start developing the schematic and will release access to GitHub.
Next Post: Schematic Design Part 1