Yet another controller board
ManAtWork
Posts: 2,307
I'm currently designing a replacement for one of my old P1 based controller boards:
The new one will have similar size and features but with a nicer case instead of an open PCB. I plan to use this DIN rail enclosure. The primary application is CNC control but it will also be suitable for general PLC and motion control. I'll use it for controlling my flight simulator, for example.
Feature wish list:
- 6 axes step/dir interface (optionally 9 axes)
- alternatively 6 ports for high speed RS422 communication (smart abs, SPI, BISS...)
- 18 general purpose 24V inputs (sensors, switches)
- 12 general purpose 24V outputs (solenoids, relays)
- 2 analogue outputs 0..10V
- 2 analogue inputs +/-10V
- 2 PWM outputs 5V
- 1 incremental encoder input (A/B/Z)
- 24V supply
- 100Mbps Ethernet (UDP, IP or custom protocol)
- 128x64 OLED display for status and diagnosis
The controller will have two stacked PCBs. The main board at the bottom will hold the P2 and the 24V IOs. The upper board is for the Ethernet, encoder and axis ports. The upper board can be modified to fit special needs in the case customers request it. For example I could add more IOs or more axes by multiplexing some of the slower signals to save P2 pins.

The CNC controller will be a commercial product running proprietary code that I won't disclose. But if the hardware turns out to look interesting for somebody else's project I might sell the boards for the production cost and provide some sort of "skeleton" code to handle the IOs. If required the upper board could even be replaced with a patch field / breakout board for custom circuits. Not as versatile as the P2 EVAL board but better suited to industrial applications.

Comments
very nice!
Layout of the main board finished.


My friend Ingolf: "The board is almost empty. You should add some more features."
Mariss: "I hate the color of green."
My excuse: "The enclosure dictates the board size."
If there is a free pin, you may add a microphone to program the plc verbally
Amazing PCB layout work.
Question: how do you protect the 24 VDC output power from random noise, voltage spikes, RF coupling, and all the rest ?
Follow on: how are the input I/O control lines protected, buffered and filtered ?
and how are the output I/O signals amplified and protected ? TIA...
I'm not sure what you mean with "24 VDC output power". Outputs are short circuit protected and have an internal voltage clamp so that they can directly drive inductive loads like solenoids or relays without getting damaged by voltage spikes. I use automotive lamp drivers (VNQ860) that already have full protection built in (overheat, overcurrent, reverse voltage).
For the inputs I use a special circuit that is effectively a constant current sink combined with an RC low pass filter and schmitt trigger. It takes any voltage from 5 to 60V as high and everything <5V as low with a reaction time of ~1ms. Proximity sensors can be used without shielded cables.
Yesterday, I assembled the PCBs.



Those FFC cables save a bit of money, space and weight but I don't like the assembly at all. I'm always scared to break something and never sure if the connectors are tight and locked.
The cutouts for the upper board and the OLED display are still missing.
Wow. Very nice!
Very nice! those DIN rail enclosures are great for that. what brand is yours. I'd only seen ones with dividers in not-always-great positions, would prefer what you have with one wide open slot top and bottom.
The link to the enclosure manufacturer is in post #1. The BRT-80005-A1 has slots for the green terminals on both sides while the -A3 version has no cutouts. There is a transparent acrylic cover on the top side but it's of bad quality (unequal thickness causes distortions and rainbow reflexions). I will replace that with a custom made front panel. The inner board fixtures (see drawing) are also quit sub-optimal for my case. Standard M3 spacer posts also don't fit into the screw holes but that can be fixed with little effort.
BAHAR offer customization to their enclosures like laser cutting and screen printing but I like to keep the enclosure itself standard and rather add customized panels which can easily be exchanged for different variants of the PCBs if customers requirements change.
Today, I've machined the top cover.

I've made some mistakes regarding the measurements of the enclosure. It's not exactly a rectangular box but has a slightly truncated pyramid shape to help extracting it from the injection mould. This means it gets narrower towards the top and the upper PCB doesn't fit exactly. I also have to move the display slightly inbound.
Nice . I’m starting to like rj45 for connecting things too.
Guess got the idea from @refaQtor …
I use RJ45 cables since 2006 for almost everything where up to 4 twisted pairs are sufficient:
Here's a RJ45 vibration test:
I use many, many RJ45 connectors since ~20 years in hundreds of machines and never had a single problem that could not be explained by excessive abuse, except...
I just had that broken tab thing on a Beckhoff system. They reported intermittent problems. It looked like someone had broken the tab but shoved the connector in anyway.
Puny components and fat-fingered maintenance people = not good.
"Industry needs Mack trucks, not Ferraris" - Dick Morley "father of the PLC"