<<<

abstract

circuit analysis

circuit design

Simulation

with Qucs

with CircuitLab

Fabrication

Milling the board

soldering components

abstract

This week assignement is
redraw the echo hello-world board,


Circuit analysis

chip

the chip is a ATtiny44-ssu: the technical datasheet will help us to set up the circuit correctly :
In the starting circuit, 4 pins are free: PB2 and PA7 (at the left), at the right PA2 and PA3
The two ports (A and B) are bi-directional with integrated pullup resistors.
Port A contains 8bit pins
and Port B 4 bits . This caracteristics are indiferent for us because we don't use the ADC functionnality.

Led

I will use a Red Led. From the datasheet :

So, because the circuit will be supplied in 5V, I must add a resistor :



R = (5-2) / 0.03 = 100 Ohms

Button

button is a switch NO (normaly open)
I checked the datasheet form pads not mistaken sense because it has 4 pins.
I connect it directly to the tiny because I plane to use the internal pullup resistor from controller.


Circuit design

As fabmodules do (almost) anything, it is possible to design PCB with the form of a descriptive language component: it is a HDL: Hardware description language.
I start from the original File hello.ftdi.44.cad and I hack it by moving a few components, and adding my own:

  1.  
  2. LED1=LED_1206('RLED')
  3. pcb=LED1.add(pcb,XTAL1.x+0.05,XTAL1.y-.22,z,angle=-90)
  4.  
  5. pcb = wire(pcb,w,
  6. LED1.pad[1],
  7. IC1.pad[5])
  8.  
  9. R2 = R_1206('R2\n100');
  10. pcb=R2.add(pcb,LED1.x-0.07,LED1.y-.15,z,angle=0)
  11.  
  12. pcb = wire(pcb,w,
  13. LED1.pad[2],
  14. R2.pad[2])
  15.  
  16.  
  17. BUTTON1=button_6mm('BTON1')
  18. pcb=BUTTON1.add(pcb,XTAL1.x+0.08,XTAL1.y-.55,z,angle=0)
  19.  
  20.  
  21. pcb = wire(pcb,w,
  22. BUTTON1.pad[4],
  23. point(IC1.pad[6].x-0.1,IC1.pad[6].y,z))
  24.  
  25. pcb = wire(pcb,w,
  26. point(IC1.pad[6].x-0.1,IC1.pad[6].y,z),
  27. IC1.pad[6])
  28.  


For the processing of the PCB, I used make_cad_png
as I found it a bit austere, I added my personal touch:

  1.  
  2. class flower(part):
  3. def __init__(self,r=.05,npetals=5):
  4. self.value = ''
  5. self.pad = [point(0,0,0)]
  6. self.labels = []
  7. d = r/2
  8. p = d*1.1
  9.  
  10. self.shape = circle(p,0,d)
  11. for i in range(1,npetals):
  12. self.shape = add(self.shape,rotate_z(circle(p,0,d), float(360*i/npetals)))
  13. self.shape=subtract(self.shape,circle(0,0,d*0.9))
  14.  

thus

  1.  
  2. LOGO=flower(0.05,5)
  3. pcb=LOGO.add(pcb,x+0.14,y+0.85,z)

draw a beautyfull flower.

helloworld.cedric.cad

Simulation

I try two softwares for simulate the comportemzent of components that I added

with Qucs

Qucs it's free electronic simulation software.
I followed the e tutorial on the project site.
Qucs seems easy enough to learn, but I guess it can quickly become very complicated to simulate complex circuits.
HelloWorld.led.button.simulation.jpg


File:HelloWorld.led.button.sch.zip
As there was no led in the library (as diodes and I could not find my settings led), I simulated one with a resistor (the time scale on which I'm studying the diagram, it makes no difference).
I then added the probes, which appear as voltmeters.
Then I placed a "transient simulation" of type linear, starting at 0 and ending at 1 ms, 2 steps to have the values ​​in the circuit in two button states: open and closed.
In the settings of the button component, I set the "time" parameter to 1ms, which is the time it takes to change state.
Finally, I placed a table and selected values ​​to display. Then I started the simulation.

conclusion
The result corresponds to what I expected: in the PA7 input, the pull-up resistor causes a voltage of 5V when the switch is open. When closed, it goes to 0V.
For the LED, this simulation confirms that the selection of a resistance of 100 ohms will cause a voltage 2V across it.

with CircuitLab

CircuitLab is an online software for electrical simulation.
It is used in a web browser, and is a bit simpler than Qucs, albeit more limited too.
circuitlab.png
I just had time to redo the schema before being asked to register ;)

Fabrication

Milling the board

I milled the circuit with the modela and fabmodules.
As with fabISP I used a spear tip.
Against by this point is worn, it is now wider than 0.4mm, so the card was ill-defined traces: below, the missed and the guilty ...
Hello.first.fail.jpg Hello.first.fail.guilty.jpg
Unfortunately I have not yet received strawberries spare, so to circumvent the problem, so I set the size of the tool to 0.45mm.
This dimension is more coherent with the true size of the tip.
Fortunately it is not worn more as 0.5mm, because I saw that in fabmodules separations between tracks disappear with a tool larger than that ...
Finally, I arrived at a fairly satisfactory result:
Hello.first.fail.jpg Hello.first.fail.guilty.jpg

soldering components

I'm progressing slowly in soldering SMD components.
It's not so difficult: we need only a good music ...
Hello.first.fail.guilty.jpg
until we recieve 100 Ohm resistors, I put a 499 after the led: it will turn on a little less strongly.