AVR 4 Relay Board

AVRRelay-X4Now we move to a more interesting project. A small(and smart) module with 4 relays, RS232 and RS485 interface.

This is a very good example about what can be done with these small hardware projects from this site (open source projects).

So. I joined three projects:

And the result is here: AVR 4 Relay Board. It is very interesting to notice that all of that modules are tested in “real world” some of them are ordered at PCB factory, some are made with “home-made PCB” or made on test-boards (and the combination of these).

It took me a few hours to finish this project, because I benefited from work already done. It is not about only the design (PCB and Schematic) work, I is about all research and decisions about various components… price, availability, how they work together, “this schematic really works?”, “what software I will use with it”, “I could adapt the design for mass production?” and so on…

Now let’s turn to this project. It is designed to be used with ATmega DIP40 microcontrollers like ATmega16, ATmega32, ATmega644 and ATmega1284/ATmega1284P.
Can be used with RS232 or RS485 (not both) selectable with 3 jumpers. This was a design decision to be compatible with older ATmega microcontrollers which have only one UART. If we need both interfaces in same time we can modify schematic and PCB traces to accomplish that. Also a design decision was to not use a “software UART”.

Right now I will not publish firmware for this module. I’ve done experiments with various libraries (with/without Arduino) and will take time to put all together, I tested some MODBUS, PROFIBUS, RS232, RS485 libraries… and also tried with OpenHAB on the server side (and other custom unreleased software).

In conclusion, the project is versatile, can be scale up (or down) other features can be added easy. My next task is to add some digital and analog inputs (and use this project as a small PLC with a specific role in an automation system (made for a friend).

So this project can be used as is or can be used as a step to develop other more complicated projects. I will definitely return with news as these projects will advance.

AVRRelay-X4-sch

Download gEDA project: AVRRelay-X4.zip

Updated: June 6, 2016 — 3:15 pm

3 Comments

Add a Comment
  1. Hi there Silvius,is there a way to upload modbus codes for this project?

    Best regards 🙂

    1. Hmm… I did some tests at the time… and it worked… But it was ugly, unpolished code.
      I have to reorganize the code… put some comments…you realize… It was not meant to be published…

      I hope to change this in the coming days/weeks. The comments of this kind drive me to move forward with some projects 🙂

      So. I think you need a modbus slave code to drive those 4 relays with a modbus master(PLC or even PC)?… no? 🙂 First I will try to put some results about this…so … stay tuned 🙂

      Regards!

      1. Yes Silvius, i’ll need modbus slave codes for that. I can use some modbus master interface to drive them but that is the easy part actually 🙂 there is still some problems when i use atmega16a as modbus slave :/ so i’ll need your help
        Best regards 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

OpenHardware.Ro © 2017 Frontier Theme