-- Leo's gemini proxy

-- Connecting to ew.srht.site:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

2019-03-24

AVR Boards: first batch of prototypes

tags: hardware TheStack


This item was resurrected from

https://erwaelde.gitlab.io/posts/0005-avr-boards.html



AVR Boards --- yet another


Noone needs yet another version of AVR controller boards (Arduino clones anyone?) with another form factor compatible with nothing else. Definitely! You may stop reading now and that's ok!

Yet another microcontroller board



Why?


Still with me? Ok, so why did I choose to create a set of boards anyway? Well, /the journey is the destination/, apparently attributed to Confucius. Being on a journey is a wonderful thing in my humble opinion, and I encourage you to embark on your own --- even if it would be only for a few evening hours during a month or so.


Along the journey I wanted to fulfill some of my personal goals:


I wanted to learn using KiCAD[0] and commercial prototype services. I really like the layouting part, but I wanted to do away with funky chemicals at home. Been there, done that. The commercial service gives me double layer boards, solder stop masks and silk screen prints on top --- almost effortless. Some even accept kicad files!

[0] kicad home page


I often read or hear the argument, that using surface mounted design (SMD) components is too difficult to be bothered with. However, I think it is entirely possible to use them. Don't be put off. Try it out! Boards will become smaller and storage space for parts will shrink as well. So I wanted to create a board that could be used as an exercise to learn handling and soldering SMD components. I also wanted it to be a little more involved than just a blinky. I wanted something to be tinkered with, thereby hopefully becoming even more useful to its owner.


I chose a microcontroller[1],

[1] Atmel AVR atmega (now Microchip)

because I have multiple uses for them. Along the way I created a small platform to teach programming those controllers. The owner is free to use any suitable language, like

C [2,3,4]

[2] gcc C compiler

[3] gcc-avr compiler for AVR targets

[4] avr-libc library

AVR assembly [5,6]

[5] Atmel AVR Instruction Set

[6] wikipedia: AVR Instruction Set

LISP [7]

[7] ulisp

Ada [8]

[8] Ada for AVR

J [9]

[9] wikipedia: J programming language

or my favourite Forth [10,11]

[10] wikipedia: Forth programming language

[11] AmForth home page

There are more [12,13,14], keep searching ...

[12] more languages

[13] more languages

[14] Flowcode programming language


I decided to keep the arrangement of peripheral devices completely undefined --- even the status LEDs need to be connected with extra wires.


The structures should be big enough to be handled manually:

- pads large enough for hand soldering

- components of dimension 1206 or maybe 0805

- connectors in 1/10 inch pitch, stackable connectors prefered



Inspiration


Of course, I took substantial inspiration from elsewhere.


There is a ATmega project by DL1ZAX[15] featuring a back plane and separate boards for the cpu, peripheral devices or sensors, display etc. That one came close to what I had envisioned, but I did not like the connectors.


Once upon a time I happened to receive a Parallax Quickstart Board[16] which is a nice little board with an interesting controller. I boldly recycled the form factor from this board.


/Keep it simple/ is always good advice, so I decided to not add power supply or RS232 components on the controller board itself. However, with all the empty space I could not resist the urge to add footprints for a DS3231[17] clock chip.


I have seen several types of SMD prototype areas. At this time I settled for solderable quadratic pads the size 90/1000 inch with a pitch of 100/1000 inch. This layout is inspired from printed circuit boards by AATiS[18].

[15] DL1ZAX Atmega project page

[16] Parallax Quickstart Board

[17] DS3231 data sheet

[18] AATis BB55 prototype board



So a big "Thank You!" to all those giants on whose shoulders I comfortably rest.



Schematics and layouts


The kicad files of the project can be found at [19]. The files are available under the CERN Open Hardware Licence v1.2 or later[20].

[19] TheStack web page (moved to sourcehut.org)

[20] CERH Open Hardware License



Board 1: Controller Board


The controller board features an Atmel atmega644pa controller. It is a controller featuring fairly large resources, but can be replaced by pin-compatible smaller models. All I/O-Pins are are connected to the 2x20 footprint and to the same footprint for the stackable connector. The extra footprint is there to have all signals accessible, e.g. to wire up the status LEDs.


There is a separate 2x3 pin connector to program the controller (in serial programming). There is no jtag connector.


There is a footprint for a 32 kHz crystal and load capacitors.


There are pads for pullup resistors on the i2c signals.


And there are footprints/pins for adding a DS3231 clock chip, pullup resistors and backup battery.


There are 4 status LEDs, which need to be connected individually, and a fifth LED to indicate power supply.


For the main crystal I chose the wrong footprint, so that's why a /normal/ crystal is soldered onto those pads free style.


Image Board 1: microcontroller


Board 2: Display Board


The display board features the DOGM204[21] display by Electronic Assembly. It is fairly large and covers most of the printed circuit board. Its controller is accessible via 8bit or 4bit parallel bus, spi or i2c. The latter modes are attractive due to their low pin count (4 pins or 2 pins). However, I found out that the reset pin of the display needs to be asserted after power-up, so it needs another I/O pin from the controller.

[21] DOGM204 display data sheet


Image Board 2

Back side and components of three display boards. The first (upper left) is equipped for i2c access, the second (upper right) for spi access, the third (lower left) is using 4bit parallel bus access. The extra green wire is the reset signal, which needs to be activated once after power up.


The display controller ssd1803a [22] is very similar to the well known hd44780, among other things it features the possibility to turn the displayed content by 180 degrees. So it is not important that the display is oriented correctly.

[22] ssd1803a data sheet


Board 2: display, front side

Board 2: display, front side, content rotated


Board 5: Prototype Area


If the controller board does not have a prototype area, then another board to enable additions is needed. There are several layouts possible, I added a SOIC-8 and a SOIC-16 footprint for some convenience. The top and bottom row of pads are connected to GND and Vcc respectively.


Board 5: prototype area with power and ttl-serial connections


Stacking it together


Stacking two or more boards together is easy, they will stand on your desk without difficulties (unless turned over by cable tension/torque). Only a power connection is strictly needed, after programming of course. Since I prefer working with Forth, a ttl-serial-USB cable is always connected during development.


A fully functional stack



NeXT?



There are a handful of errors/shortcomings.


The footprint of the main crystal on board 1 is wrong

An additional connector for power/serial on board 1 would be nice.

The reset signal on board 2 needs to be connected to the footprint for all peripheral signals. It needs to be activated by an I/O pin from the controller.

The board 2 layout must be flipped, because in prototype series, silkscreen is only available on the front layer.

Pads for resistors in the i2c signal path would be nice. An additional resistor pad to connect D1/D2 in i2c mode would be helpful, too.

board 2: the footprints for IM1,IM2 could be arranged such that one cannot place both components (pullup and -down) at the same time.

board 2: adding a footprint for a MOSFET to switch the backlight on and off would be nice, too.

board 5: through holes on the left- and right-most column could be helpful for cable connections.

removing the soldermask on the back side of board 5 would enable short connections to GND by drilling holes to place contacts (like vias).

I'm sure, there is more.



How about the goals?


I did learn to use kicad for schematics, components, footprints and layouts. There is a lot more to be discovered, though.

I successfully ordered a handful of my board designs without fuzz.

I'm the proud owner of the first of these boards. They are definitely promising.

Yet Another Clock


As a first useful project I added a battery to back the DS3231 RTC.

I recycled one of my clock programs [23] to create a clock showing UTC and Epochseconds. At least this is a nerd clock with a serial connection! And there is still space left on the LCD. Swatch beats[24] anyone? New Earth Time[25]? Sidereal Time[26]?

[24] wikipedia: Swatch Internet Time

[25] wikipedia: New Earth Time

[26] wikipedia Sidereal Time


Go. Get wild!


References


[23] Clockworks: AmForth program code






Home

-- Response ended

-- Page fetched on Wed Oct 20 20:01:25 2021