So, as I said, I needed to get information from a couple of sensors a send it over RS-485. This was for a project that needed to monitor pressure and volume of fluids injected to an oil well. The information would then be displayed on an HMI (human machine interface) with a 10" screen that we're developing around an OlinuxinoA20 board.
There were to paths to follow. I could build the hardware just for what I needed or I could go the extra mile and build something that could be useful for future projects. Needless to say I followed the second.
Around this time I was paying close attention to the CIAA (not CIA) which would translate to something like "Open Source Argentine Industrial Computer" which is an open source PLC. It comes in many uC flavors and you can get everything you need from their website. I've never worked with a PLC so I took this design as a reference to get an idea of which IOs would be useful to include as well as communication protocols, power supply voltage, etc.
On the other hand I was used to working with NXP family of ARM uCs. The LPC1769 in particular always seemed quite powerfull and feature rich so I picked it right away. Luckily it had every interface I needed, even D/A! which is not that common. At this stage of the design I didn't want to be bothered with designing the PCB that would hold this IC. Mainly because the first batch of PCB were going to be homemade and since I'm not yet able to produce PTH, the routing would get quite messy. So instead I decided to take advantage of the LPCXpresso board and just make a craddle for it. By doing this I could get the IC routed and soldered as well as the PHY for ethernet and a little I2C memory. This ended up providing two key advantages. The PCB would be much simpler since there were less high-connection-density ICs on the board and I would get a more generic and "uC independent" design. This means that if I want to switch to a bigger processor capable of running Linux I just have to design that board so as to fit in this "PLC motherboard".
The features I have right now implemented can be seen in the following image
I chose this format for the PCB to fit it on a standard case for din rail like this one
I'm gonna have cut a couple of square holes for the ethernet and usb connectors.
So far I'm pretty happy with the outcome although I feel like I should've in included a couple of things more like a micro-sd socket and a pin header with unused uarts, spi, I2C.
The micro-sd would be great to use this as a datalogger but I guess I'll include that in the next iteration. The pin header connector would be useful if I could place it on the edge of the board. This way I could connect other modules just by placing them next to each other. The modules that I'd like to have, and can think of right now, are more IOs, more relays, GPRS, WiFi, etc.
I'll be documenting the project and uploading more of it in the future but in the meantime make sure to check out CIAA's homepage and GitHub! It's an awesome project!
Hope you like it!