Skip to content

Latest commit

 

History

History

Hardware

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Hardware

Overview

ATmega328p based controller board with options for DIN mounts and 3.5mm spaced through-hole for user connections and headers. Eight level shifted (same as VIN range) digital I/O (10, 11, 12, 13, 14*, 15*, 16*, 17*), the last four (*) are analog channels (0, 1, 2, 3). Four 22mA current source used with loop sensors are available with enables (5, 6, 3, 4). One 17mA current source for a pulse sensor and it has an enable (7). ICP1 is pulled down when enough current (>7mA) arrives from the pulse sensor. Alternate power input may be enabled (9), and power to the shield VIN pin may be disabled (2). Power with 7 thru 36V DC.

The ATmega328p can be programmed with the GCC based toolchain for AVR found in Debian packages (it is available on, Ubuntu, Raspbian, Mac via brew, Windows via Windows Subsystem for Linux). Bootloader options include optiboot and xboot. Serial bootloaders cannot change the hardware fuse setting which reduces the occurrence of accidentally bricking the controller (I recommend using a serial bootloader during application development). Note that optiboot clears the watchdog so it will not get stuck in a watchdog loop.

Inputs/Outputs/Functions

        Toolchain: gcc-avr binutils-avr gdb-avr avr-libc avrdude
        Wide input power range from 7..36V DC
        High side current sense on input power connected to ADC6.
        Input power voltage is divided down and connected to ADC7.
        Eight digital input/outputs (10,11,12,13,14*,15*,16*,17*) with level conversion.
        Four of the DIO may be used for ADC (*) channels 0..3 (ADC0,ADC1,ADC2,ADC3)
        Four 22mA current sources with enable (3,4,5,6).
        One 17mA current source with enable (7).
        Power to the shield VIN pin may be disabled (2).
        Alternate power input may be enabled (9).
        MCU power (+5V) is converted with an SMPS from the 7..36V input power.

Uses

        General Purpose Control for Automation
            Bare Matal (e.g. infinite main loop checks inputs, performs algorithm, and writes outputs)
        Data Acquisition using Capture Hardware (ICP1).
            Flow Meter
            Rotating Hardware
            Pulse Output Temperature Sensors
            Pulse Output Capacitance Sensors
        Automation
            Shield VIN pin can power down a Raspberry Pi on the RPUpi shield.
            A current source may string through inputs of multiple Solid State Relays to control multi-phase power.
            Program in C with an open source toolchain (e.g. GCC, avrdude...).

Notice

        ADC4 and ADC5 are used for I2C exclusively and not routed to the analog header.
        AREF from ATmega328p is not routed to the header.
        3V3 is not present on the board, the header pin is not connected.

Table Of Contents

  1. Status
  2. Design
  3. Bill of Materials
  4. Assembly
  5. How To Use

Status

Status

        ^9  Done: Design, Layout, BOM, Review*, Order Boards, Assembly, Testing,
            WIP: Evaluation.
            Todo: 
            *during review the Design may change without changing the revision.
            Remove ICP1 10mA pull-up
            Replace digital curr sources with CS2 and CS3
            Replace IO3 and IO4 with ADC2 and ADC3
            Swap MOSI (IO11) with ADC3
            Use IO3 and IO4 to enalbe 22mA CS2 and CS3
            Add level shift to ADC0 and ADC1 so they can be used as digital IO
            Add bootload port (e.g. for Adafruit Friend)
            Add alternate power input (e.g. disconnect a solar pannel to stop charge)
            Pull-down IO9 and 100k ohm on zener to make sure alt power is off at init

        ^8  Done: Design, Layout, BOM, Review*, Order Boards,
            all boards scraped, no assembly done

        ^7  Done: Design, Layout, BOM, Review*, Order Boards, Assembly, Testing,
            WIP: Evaluation.
            use an ESD_NODE like Irrigate7.
            don't turn off the current source used with digital outputs since the digital IO's can do that. 
            DIO protection resistor (change 182 Ohm to 127 Ohm)
            remove LT3652 and reduce size of board.
            add an IDC connector for everything that was used with LT3652 (5,6,7,ADC2,ADC3).
            add JSK plug for I2C
            location: 2017-11-1 reflow oven.

        ^6  two test units (T1,T2) made, four units made to see if anyone is intrested.
            location: 2017-3-24 T1^6 damaged MCU while taking power example image.
                    2017-3-25 T2^6 using on test bench.
                    2017-6-12 T1^6 replaced MCU from a scrped RPUno^4 and tested again.
                    2017-7-19 T2^6 + RPUadpt^5 in SEncl NightLight testing.
                    2017-8-26 T2^6 NightLight ended, unit is in an enclosure with battey but is not in use.
                    2018-4-15 T1 and T2 scap.


        ^5  only unit of this version made
            location: 2016-12-18 Test Bench /w an RPUpi^1, start power management testing
                    2017-1-1 had ADC7 parts (and BOM) changed to measre battery.
                    2017-1-5 had ADC6 hacked to measure raw PV.
                    2017-2-4 moved to SWall Encl /w K3^1, RPUadpt^4, SLP003-12U, 12V battery.
                    2017-3-19 remove 10k thermistor which was used by  LT3652 to turn off chrg when over 40 C
                    2017-4-17 running Solenoid fw, @ SWall Encl, Update K3^2, Update RPUadpt^5, SLP003-12U, 12V battery.

Debugging and fixing problems i.e. Schooling

Setup and methods used for Evaluation

Design

The board is 0.063 thick, FR4, two layer, 1 oz copper with ENIG (gold) finish.

Top TAssy Bottom BAssy

Electrical Parameters

Power Voltage: 7 thru 36V

Mounting

        DIN rail

Electrical Schematic

Schematic

Testing

Check correct assembly and function with Testing

Bill of Materials

The BOM is a CVS file, import it into a spreadsheet program like LibreOffice Calc (or Excel), or use a text editor.

Option BOM's included
A. BRD
M. BRD SMD HDR
W. BRD SMD HDR PLUG
Z. BRD SMD HDR PLUG DIN

Order Form

Assembly

SMD

The board is assembled with CHIPQUIK no-clean solder SMD291AX (RoHS non-compliant).

The SMD reflow is done in a Black & Decker Model NO. TO1303SB which has the heating elements controlled by a Solid State Relay and an ATMega328p loaded with this Reflow firmware.

How To Use

The application should have a wiring diagram to show the setup.

Solar

Trickle charging a battery can be done directly through a diode when the PV source is less than or about .02C (e.g. 200mA into a 10AHr battery). This means that the need for a charge controller depends on if the user wants to size the PV and battery storage for trickle or quick charging (i.e. >0.02C). When I use an SLP003-12U panel that charges at less than 200mA and a 10AHr AGM battery with a diode that blocks dark current no charge controller is needed.

Input Power LC

Input wiring can have inductance that oscilates as an LC circuit with the input capacitor. The problem can show up when the SMPS has a frequancy component that drives the oscilation. There are many ways to deal with the issue, a few examples include twisting the input power wires to lower there inductance, adding a ferite to dampen the oscilation, adding a bypass or two along the line to shift the oscilation nodes.