Skip to content

7. Electronics Design

1. Individual assignment; Redesigning Hello Word -board

To Redesign the boards first the schematics were obtained.

To This board an LED and a button are added. LED needs also a current limiting resistor. The button needs a couple of passive components for debounce circuitry.

The connections were reverse engineered by help of Antti, The instructor of the week.

For the PCB design Autodesk Eagle was used.

Before anything can be done. The FabLibary needs to be installed.

From the Fabacademy gitlab page under the Eagle file

The fab.lbr was downloaded

The download was started using the download button.

The libraries were then added to Eagle.

Under the options menu the Directories can be found.

To the Libraries path the directory of witch in the fab.lbr was downloaded was added.

The addition of the library adds a library mark under the libraries manager. The Eagle_fab.lbr needs to be enabled by tacking the gray dot to green before it can be used.

Green mark indicates that the library is now in use. and the parts can be added to the designing.

Schematic


A new project was created and opened. From the File>New>Project.

To start the design, into the schematics parts needs to be added. This is done by the “Add Part” button.

THe add part button opens a list of available parts. From the eagle_fab directory the necessary parts are picked and fist crudely placed on the schematics

Needed parts:

  • ATTINY44-SSU
  • 20MHz Resonator
  • AVRISPSMD 2x3-pin connector header.
  • 1x6-pin smd side connector.
  • 1x 10k ohm resistor Pull up resistor for header vcc.
  • 2x 49.9k ohm resistor. Debounce voltage ladder
  • 1x Omron 6mm Button The Button
  • 1x 1 uF Capacitor Debounce filter
  • 1x 10 uF Capacitor attiny44a Vcc filtering
  • 1x 1k ohm resistor Red LED current restrict.
  • Red LED The extra part

The parts were them randomly added to the schematics.

after adding the components a Vcc and GND symbols needs to be added also.

The Vcc and GND symbols were added.

The connections are made with the net connection tool.

After some furious point and clicking the net connections are ready.

By clicking the Generate/switch to board the program moves to beard designing space

The components are first on the bottom left from the board. The designed connections can be seen on yellow and the physical space requirements of the components are on red.The design space is on yellow

The components need to be moved on the design space and placed so that the connections can be made without interference or crossings.

The Design rules was firs adjusted for the machine on the fablab. The diameter for the milling bit is 16mil

all the clearances on wire,pad and via for different signals and same signals was changed to 16mil.

The clearance was also adjusted to 16mil on minimum width.

After the design parameters were adjusted the design itself can begin.

The autorouter design tool was tried with interesting results.

Autorouter gave odd results and always resulted a bunch of air wires.

The traces were then designed by hand.

After some fiddling with the wires a trace route solution is found.

Few words about the design.ATTiny input capasitator was also used as the resonator ground dampener by placing the capasitator ground near the resonator ground connection. The button also doubles as a jumper to the GND to jump over the 5V trace pull around the board.
After the traces was made the ground plane is nested around everyhing.
The ground connections was made by making a polygon around the design and naming it GND in the popup menu that appears after the polygon is done.

After The Ratsnest button is pushed. This creates a ground plane that connect every GND tab. This also reduces the milling time because more copper is left on the board. Also the copper ground plane conducts more current,shields from EMP disturbance and cools hotspots by heat conduction.

The Design was then exported to milling.

For export to milling anything other but the top copper layer is deselected.

The DRC check results two air wire errors. The Design Rule check tool omits the fact the button is internally connected the same sides together. And is used to route the GND layer over the 5V rail and the Button trace to the GND side.
The error is thus disabled.

The expoting to PNG milling.
The PCB top copper layer is exported to PNG image by selecting the export selection from the File menu.

PNG image was exported at 2400DPI and monochrome.

The milling layer was selected and a line was drawn around the PCB.

This line was then exported as 2400 DPI monochrome image. This is the image for milling the board off from the bulk PCB.

The straight export from Eagle produced a png image of 3x size of the intended 4007x3063pix at 12021x9189pix. One reason can be the used 4K resolution monitor. But the scaling is a tad odd. The nominal 1080P would be 1/4th scaling, not 1/3. Nevertheless, I first tried to upload to mods and set the resolution of the input png to 12021x9189pix. Pressing the calculate button promptly crashed the site. The crash was so hard that the site crashed apparently from everybody. Three people from three different computers working in the same room trying to make the traces for the milling reported that the site did not load anymore. The site was again reached after 20 minutes of waiting. After this the image was scaled down in Gimp to required 4007x3063pix. After this the calculation finished normally

The traces to be milled.

The cut outline.

The board was done exactly like the FabTinyISP on week 5

At this point the design rule of 16mil(0.404mm) clearance can be problematic: The needed 0.4mm end mill bits were:
• 1. Lost in mail
and the two that we had received from the 20 ordered were
• 2. Broke.

A last-minute desperate decide to use the week 5 settings for the V-shaped milling bit was made. Luckily there were hundreds of extra those mill pits laying around.
The V-shaped milling bit cutting width was calculated from macroscopic picture to be enough wide.

The monochrome png image of the traces was imported to mods. The good tested settings on week 5 was for the 0.2-0.5mm ∠90° milling pit:Tool diameter: 0.3mm Cut depth: 0.1056mm

The board came off good from the milling.

The parts were acquired from the mess stock.
The parts were:

  • ATTINY44-SSU
  • 20MHz Resonator
  • AVRISPSMD 2x3-pin connector header.
  • 1x6-pin smd side connector.
  • 1x 10k ohm resistor-Pull up resistor for header vcc.
  • 2x 49.9k ohm resistor-debounce voltage ladder
  • 1x Omron 6mm Button-The extra part
  • 1x 1 uF capacitor-debounce filter
  • 1x 10 uF capacitor-attiny44a vcc filtering
  • 1x 100 ohm resistor-Red LED current restrict.
  • White LED-The extra part

The resistor for the LED was calculated taking to account the nominal 5V voltage. The forward voltage of the LED is 3.2V The resistor needs to have a voltage drop of 5V - 3.2V = 1.8V The Nominal current is stated on the LED is 20 mA. This gives minimum resistor value of R = {(Vin -VLED)/I} ==> {(5V - 3.2V)/0.03A} = 60 Ohm. Closest higher value resistor found from the inventory was 100 Ohm. This gives the usable current from Ohm’s law U/R = I ==> 1.8V/100 Ohm = 0.018 A = 18mA. This is below the absolute maximum DC current of 40mA of the ATTiny44A pins and can be used.

Parts needed for soldering th board.

The same soldering rules apply as in the week 5.
Rules to hand solder PCB
• the hardest to the easiest
• the lowest to the highest
• the middle to the edges

The ATTiny44A SSU was first to be soldered.

Next the resonator,LED,button,resistors and the header were added.

The finished board.

The board was checked with multimeter after the soldering. No Short circuits were found

Programming the board.

The Programming was done in Ubuntu 18.04. The hello.ftdi.44.echo.c was programmed to the board using the programming board,FABTinyISP that was manufactured in week5 The Board was connected with the 2x3 pin header to the FABTinyISP noting the place of the ground pin and orientation. Into the 1x6 pin header a 5V input was connected.

Programming the board in make in Ubuntu is easy. * First the fuses are burnt. The fuses are permanent bits that determines how the chip will act. Does it has a bootloader,

The programming was made in Ubuntu 18.04 via the make program. The necessary tools ( flex, byacc,bison,gcc,libsub and avrdude) was already installed to the ubuntu installation on week5.

The necessary files were downloaded from the Fabacademy classes site The hello.ftdi.44.echo.c and the hello.ftdi.44.echo.c.make files.

The hex file was made by compiling the code by command make -f hello.ftdi.44.echo.c.make

The fuses are the bits that control the microcontroller setup. Such as the external resonator speed.

The fuses are set by sudo make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses

Then the code is pushed to the board.

By entering sudo make -f hello.ftdi.44.echo.c.make program-usbtinythe program is flashed to the microcontroller.

To test the Echo program the board was connect to a FTDI cable to USB to read the Serial data.

Putty was used to listen the COM5 port.

Everything written to the putty was echoed back by the board.

2. Group assignment.

Group: Marjo, Gleb, Lucas and I.

The group assignment was to measure and observe the working of the board. We measure the working of the serial signal coming from the TRX pin. The same setup was used as in the testing the boards. A FTDI -cable was attached to the board and putty connection was established to the board.

The location on measurement. The GND alligator clip is attached to the GND plane and the prope is pointed to the TRX pin.

While probing the TRX line the letter U was pressed. in the UTF-8 unicode capital letter U is 01010101

When th U was pressed a nice binary line can be observed. In the beginning there seems to be one bit 0 as a start bit and the bits are send to be backwards with the least significant bit(LSB) first,

The binary for “S” 01010011. This also is observed right

The binary code for “B” 01000010 This also is observed right




The baud rate was tested on the oscilloscope by measuring the time difference between number of bits. The oscilloscope reports the baud rate at 11.49kbits/sek. This is in the 5% tolerance of the used oscillator that managers the time that determines the baudrate. The baud rate is selected from the computer to be 115200 bits/sek. This gives as a 115200/114900 = 2.6% offser from the set bit rate.

11.49kHz baud rate.

All my designed files can be found in the Git repository