MAIN PCB V2: ATmega1284P TQFP-44 w/ switching power supply for 2S LiPo

assembled main PCB front assembled main PCB rear KiCAD PCB board screenshot main PCB connected inside case

Design goals and notes:

  • Simplicity and low-tech requirements for manual etching and soldering in a DIY setup: TQFP44 and 0805 SMD
  • Easily sourceable parts
  • Integration of switching power-supply on main PCB board, 2S battery with full-range use and monitoring, but keep charging circuitry external for the moment.
  • Run the whole board at 3.3V: saves the use of level-shifting for XBee and I²C preipherals. Use ATmega internal oscillator for 8MHz.
  • Keep all peripherals connected by headers for modularity, add SPI header to allow future upgrade to SPI OLED. (1.3" OLED looks very nice, and they have a full library, plus the ATmega1284 with 16K SRAM allows a framebuffer - would even allow double-buffering)

Known limitations on final design:

  • PCB is a little larger than the prototype without PSU => serial and I²C connector must be plugged/unplugged by unscrewing PCB from case.
  • Voltage regulator output 1000µF capacitor is farther from the VR than it should be => added 2 10µF X5R 0805 caps close to absorb spikes.

Bill of materials

Quantity Item Description Format / Case
1 PCB    
1 LM2576S-3.3 3.3V switching voltage regulator TO-263
1 SMD 1000uF 1000µF 16V SMD capacitor 10x10mm
1 SMD 330uF 100 to 1000µF 16V SMD capacitor (i had many 330µF in stock) 10x10mm
1 SMD 100uH 3A 100µH 3A SMD power inductor WE-PD 12x12mm
1 SS34 1N5822 SMD 3A 40V schottky diode DO-214
2 CMS0805 10uF 10µF 10V SMD ceramic capacitor 0805
1 ATmega1284 ATmega1284 or 1284P in TQFP-44 TQFP-44
2 SMD0805 1uF 1 to 10µF SMD ceramic capacitor 0805
1 SMD0805 220nF 220nF SMD ceramic capacitor 0805
1 SMD0805 100nF 100nF SMD ceramic capacitor 0805
1 SMD0805 10K 10K SMD resistor 0805
1 SMD0805 47K 47K SMD resistor 0805
1 SMD0805 10uH 10µH SMD inductor 0805
1 SMD Zener 5.6V SMD 5.6V Zener diode SOD-80
1 ang.male.hdr 2.54mm 40 pin angled single-row breakable male header 2.54mm
2 ang.fem.hdr 2.54mm 40 pin angled single-row female header (*) 2.54mm
1 str.double.hdr 2.54mm straight double-row breakable male header 2.54mm

(*): or see the list of detailed female headers below if you get them at a local store and don't want to bother with cutting them apart.

Build instructions

Etch & Drill, or get PCB from fab house

TODO: front and rear PCB masks in PDF format and KiCAD archive
You may tin the thermal dissipation plane for the regulator but that's not mandatory, this LM2576 regulator seems very efficient and even after 4 hours at 300mA load (equivalent to XBee Pro at max TX power & duty-cycle) it doesn't even get barely warm (have to test at 500mA)

Break the pin-headers

You will need:

  • male single-row angled: 1x 2-pin connector (battery)
  • male double-row straight: 1x 2x3-pin connector (ICSP)
  • female single-row angled: 1x 2-pin (power-switch), 2x 4-pin (serial and I²C), 1x 6-pin (SPI), 1x 7-pin (buttons), 1x 9-pin (axis), 1x 11-pin (bargraph)

tip: the female header aren't formally breakable, but with a plier to remove a metal-pin and small diagonal cutters to split at removed pin location, a bit filing to smooth... I usually buy common and small values (2/3/4/6 pin) to have them ready in my workshop and cut 40-pin ones for custom odd and/or large values. Remember you lose 1-pin for each cut you make.

Solder components

SMD on front PCB sideSMD on rear PCB side

This includes VADJ_R1 and VADJ_R2:
If you're using a LM2576 fixed 3.3V regulator you leave VADJ_R1 unconnected and connect the two pads of VADJ_R2 (feedback pin to the output of the power inductor) with a bit of wire or better if you have a 0805 0Ohm shunt use this...
I've provided those pads to allow an adjustable LM2576 for more flexibility and to test from 3.0V (more battery time?) to 3.6V (more transmit power?) but never tested it yet.

We solder this diode after the regulator and power inductor because it could get in the way of the soldering iron for those two

note: some pin headers also serve as VIAs so unless you have a board from a fab-house with plated through-holes, be sure they're soldered on both sides of the board, and include them even if you don't plan to connect something to them.

  1. The components should be soldered in this order, from the lowest to the tallest:
  2. If you're etching the PCB yourself: VIAs (i use spare resistor leads for 0.5mm micro-vias) and thermal vias (U-shape the leads and insert in two holes from front, press against top side to flatten, then on rear side bend leads outward). 0.8mm pin-headers leads are better for thermal conduction but much harder to bend, needs pliers and thermal dissipation isn't at all critical with this regulator at this load.
  3. The ATmega1284 microcontroller
  4. small 0805 components on both sides (resistors, ceramic capacitors, the 10µH AVcc filter inductor)
    • rear: 10K RESET PULL-UP, 47K VBAT-MON-LOAD
    • top: the two 10µF VR OUT capacitors, the two 1 to 10 µF MCU stabilizers, the 220nF AREF stab, the 100nF and 10µH AVCC filter
  5. The 5.6V Zener for VBat monitoring on rear side
  6. The LM2576 Switching regulator
  7. The 100µH power inductor
  8. The negative voltage supressor schottky diode at regulator output (1N5822 = SS34)
  9. Regulator input and output chemical capacitors VREG-IN and VREG-OUT
  10. pin headers not covering components: battery (2pin male), switch (2p female), axes (9p f.), I²C, UART (4p f.)
  11. pin headers that covers components and vias (SPI at rear (6p f.), buttons(7p f.) and bargraph(11p f.) on top)
  12. ICSP (straight 2x3pin male) in low-profile (this one is a little bit tricky, here's how i do it)

Then clean the flux residues with a hard toothbrush and isopropyl alcohol.
While this is not mandatory, remaining flux residues will cause some oxidation layer on copper/tin/iron surfaces in some weeks, that won't prevent functioning but can make any future soldering on the board (upgrade or repair...) very difficult. Not to mention it will look awful.

Then add some electrician tape for extra protection against shorts under place of mating connectors for those: battery, switch, buttons and bargraph.
Now it should look like this:

assembled main PCB front assembled main PCB rear

Testing and programming the microcontroller

PCB connected to USBASP programmer

-access from avrdude via USBASP
-fuses setting: avrdude -c usbasp -p m1284p -U lfuse:w:0xe2:m -U hfuse:w:0xd1:m
-configuring the Arduino environment for this platform: sanguino, +modif 8MHz Int Osc, +req libs
-TODO: give already-compiled firmware image

Legacy/obsolete modules

old-1S-supply.jpg, déc. 2012

(skip to next chapter for production version) POWER MODULE V1: 1S LiPo + 3V3 linear regulator (obsolete) The first power-supply i made for the first prototype. Based on a LM1117 3V3 regulator with a 1S battery, could only work with battery between 4.2 ad 4.0V (very short battery usage). Once tested  […]

Lire la suite

Radio enclosure

4ch-usb-rc-sim.jpg, fév. 2014

For the radio enclosure, i chose to use one of those USB RC simulators you can find on eBay for about $30: TODO: eBay search link TODO: list distinctive features / large pictures to allow identification of the right model. Now there are different models on the market at this price. The fact that  […]

Lire la suite

Radio modules alternatives

XBee-pro-S1.jpg, sept. 2015

Here is a brief summary of the various radio modules i tested / plan to test and my conclusions. For the foreseeable future i plan to stick to 2.4GHz models. Will maybe move to 868/900MHz awesome range modules by the time i engage in long-range FPV, but now i'm far from it. At the time chosing those  […]

Lire la suite

Introduction

dplomatx-close.jpg, sept. 2015

Here are the plans and build instructions for DplomaTX: an Open-source XBee-based RC radio command transmitter and receiver (work in progress) Project presentation, objectives and status A long time ago i thought about embarking a microcontroller and many sensors onto an RC plane. As i wanted  […]

Lire la suite

Bienvenue sur Dotclear !

Ceci est votre premier billet. Quand vous serez prêt à bloguer, connectez-vous pour le modifier ou le supprimer.

Haut de page