Sunday, December 1, 2019

Universal ATmega 328p Board



Often there is a need for an Arduino project to control various power consumers. These can be low-voltage consumers, which should also be controlled with PWM. On the other hand, it can be about consumers who just want to turn on or off with relais. Of course, there are appropriate modules on the market that just need to be plugged. But when sensors and other modules are added, it gets confusing because of the many cables.
That's why I've developed a small PCB that contains some commonly used components, but also includes 2 power mosfets and 2 relays. As MCU serves the well-known ATmega 328p. The designation of the pins is Arduino Nano compatible. For a USB function you have to install the corresponding bootloader and connect a USB / TTL converter.
In the Arduino IDE the harddware must be adjusted accordingly on Arduino Nano.



The following features distinguish this board:
  • Buck Regulator with LM2596
  • Real time clock with DS3231
  • EEPROM socket
  • To control the buzzer and the relays the analog pins are used as output (A0, A1, A2)
  • 2 Power MOSFETs (FDD8447L) controlled via PWM connected to D9 and D10
  • The coil voltage of the relays can be 5V or the input voltage, selectable by jumper. If SSR is to be controlled you do not need to use relays and instead can solder a wire bridge to switch the SSR to the drive transistors of the relays)
  • Status LEDs for the relays, power transistors and alarm output of the DS3231
  • Additional connections for I2C and ICSP
  • EEPROM can be write protected via jumper



I originally designed this circuit to control my aquarium. The circuit can regulate the LED lighting via PWM with different lighting profiles. Furthermore, the temperature is controlled via relays and the CO2 system is switched. In addition, the water level is monitored and refilled with a small 12V pump if necessary. The sensor module contains a temperature sensor (DS18B20) which is cast in synthetic resin and a capacitive proximity sensor, which responds very well to the water surface.
However, I have not finished this project yet. I do not have a real idea for the case yet. It should not only be compact, but must also be overheating resistant and meet the necessary safety requirements for operation with 230V. Funny enough, I seem to need a lot more time for the case than for all the electronics. But that's exactly what I have not got at the moment because of my job. Not to mention that, for safety's sake, I have to take a multi-day test under supervision before I can run it self-sufficiently. And finally, the software is not finished yet. 95% of the MCU memory is already used up and I have to find optimization potential. ... That also led to the development of my "MightyNanoS", which can also be found on this blog. 

What works so far you can see in this video, but I did not connect the sensor assembly for this.

But why am I releasing an unfinished project? The answer is that during development I took care to keep it as universal as possible. So it is not a dedicated controller for an aquarium, but can be used in many fields. Just the currently much acclaimed home automation offers itself here, to name just one example.

My KiCAD project files can be downloaded from my Google Drive:
Google Drive
KiBoard_V2.3.zip
Bytes: 3905564
MD5: EFF29FD6D84D87A90EEA18ED76B6FD8F
SHA256: 285607216C3D8941B064AD230EE128B87AC86C69B0982ED9B892F85C83F2A788

There is another archive in the ZIP files. This can be uploaded directly to a board manufacturer (I use Seedstudio or JLCPCB) to order professional PCBs in your desired color.
My project is free for private use. It is aimed at experienced people. I take no guarantee! Duplication is at your own risk and responsibility!
You are welcome to customize or modify my project and publish it. However, you always have to refer to the origin!