ATmega1284p Controller /w pluggable connectors for 9DIO, 2ICP, 6ADC
Posts: 165
Joined: Sun Sep 18, 2016 6:07 pm


Postby rpu_bus » Tue Sep 19, 2017 10:27 am

An ATmega1284p with pluggable connections for nine digital I/O (2,3,4,9,10,11,12,13,22), two input capture for event timing (ICP1, ICP3), and six analog loop inputs (ADC0..ADC5) with current sources for sensor loops.


Github page

The Punica should run on 7 to 36V power if I did everything right. The input protection is a 40V PMOS biased with a current source that will light an LED somewhat when the voltage is high enough. The protection circuit will probably need some tuning. I have connected ADC6 and ADC7 to the input power for an option to self-monitor. There are three groups of Digital Input/Output (DIO). Each DIO group has a 20mA current source which each pin can safely sink. A level shift protects the MCU when it is not sinking current. The DIO can be connected to voltages up to the input power but cannot safely sink or source that power, however, it can safely sink the 20mA current source (allowing all sorts of fun doing series of optocouplers, solid state relays, and LED's). Each ADC channel has a current source that should allow a loop sensor to operate over its full range, but protect my wiring when I short the loop (I can short a loop and nuke a fuse just looking at it). The loop sources also have digital control so they can be used to blink chains of LED's or even something useful like turning off the sensor between readings.

Why only nine DIO? Well it keeps the board small but also the MCU will not handle more than 200mA so with nine I can drive nine red LED's at about 20mA (LED has 2V and 127 ohm has 3V) while the MCU takes 20 mA for itself. That is its absolute maximum (which the chip will not last long doing, a few hours or days perhaps).

Note: this started as a controller for testing shields, but I removed the test specific hardware and will place that on an application specific board, this just looked too nice as a general purpose PLC replacement, and I could write the programs in C rather than a interpreted language or ladder logic. Also now that the [RPUpi] is working there are more projects lining up that need a wide range of power options.


Return to “Punica”

Who is online

Users browsing this forum: No registered users and 1 guest