2010 July

July 2010


It’s been long overdue but as you can see the site is getting a makeover. 

I’m also doing some long overdue housekeeping with the pages, categories and tags.  There may be some 404 page errors, I am monitoring and fixing these as I come across them, however if you’re having any problems please contact me.

I’ve also added some mobile themes for those visitors on the go. 

Over the last couple of nights I’ve been verifying the respective individual circuits of Rallylog before I get down to developing the application.

Test Results so far:

3.3 V PASS
5V Enable PASS
RFID FAIL (Fixed)
LCD PASS
LCD Back Light PASS
RTC TODO
SD Card FAIL (Fixed)
SD Card Detect PASS
Buttons PASS
LEDS PASS
Buzzer PASS
Battery Voltage Monitor PASS
Programmer I/F PASS
Reset Button PASS
USB Reset PASS
USB – FTDI PASS
USB – AVR (Serial) FAIL

 

RFID Module

I’ve had a couple of problems so far, first the RFID module has very short pins that only just go through the PCB to allow for soldering, I had what looked to be a dry joint on one of the pins, after re-soldering with a bit more heat and solder all joints now are solid and is working no problems.  The Range of the card read seems to be far less than specified, so I’m wondering if the GND fills on both sides of the PCB near the RFID module could be causing this, I will remove them in the next PCB iteration. However it is working and the range is sufficient to work as required.

SD Card

I now have writing to the SD card working, had an initial problem where the pull-up resistors were causing the problem, removed and now ok.  I’m using the filelogger library (http://code.google.com/p/arduino-filelogger/) and have it writing the test message to the card.  A gotcha was an existing 1-Byte sized file needs to already exist on the SD card for the library to work.  I’m also having some problems when the card is removed and re-inserted no writing takes place.  This appears to be a library problem so will investigate further later.

USB

Another problem is the USB side of things.  I’m using an FTDI FT232RL USB-Serial conversion chip, fairly common, however the output on my Tx is garbled, I’m also assuming that my Rx is the same as I have yet to delve deeper into the problem.  It may be an unidentified solder bridge somewhere that I can’t see, the pitch on this component is pretty fine.  

I’ve checked correct bit rates but still failing.  I initially found I had problems when I went to program the bootloader and could not get any of them to work, so have filed this as a FAIL and moved on to complete the rest of the testing as I’m using the programmer interface to load my test sketches.   I’ll revist in detail later. 

UPDATE: I have downloaded the FTDI chip programmer utility and this sees the FTDI chip and alls it’s registers ok, so the USB-FTDI circuit appears to be working, but the FTDI – AVR is not.

Last Friday I received my second revision of PCBs.  As mentioned in one of my previous posts I majorly stuffed up on my LCD footprint along with some additional board changes including the larger 3V regulator and the 5V regulator PCB.  

I’m very happy with my switch to Kicad also with it’s resulting PCB below.

(Click through to flickr images for more details. Some are commented and have notes)

rallylog pcb

After verifying the PCB again (this time successfully), I set aside some time over the weekend to assemble the first unit for testing.

 

Rally log with all SMD components assembled

rallylog smd assembled

 

Rallylog with all components assembled and removed from the tooling strips

rallylog assembled

 

Test fit in Sparkfun project Case, have yet to fit the top cover, i.e. drill holes for LEDs, Buttons and LCD, will be leaving this until after testing, but happy with the results so far :)

rallylog assembled

My latest toy acquisition arrived in the post today, it’s a small usb microscope from Deal Extreme – http://www.dealextreme.com/details.dx/sku.35636.  I purchased this so I could do my PCB inspections alot easier. 

 DinoLite_Digital_Microscope

Some of it’s specs:

  • max  resolution of 1600*1200 (these ones below were taken at VGA resolution – 640×480)
  • Manual zoom levels x25 – x200
  • 8 LED white light that you can control the brightness via a pot on the cable.
  • Measurements and markups via the software.
  • can use handheld and comes with a stand for hands free use.
  • snapshop button so you can quickly take still images.
  • Software filters to apply to the video stream.

The screen shot below shows me calibrating against a steel ruler with 0.5mm increments.  This is the outermost Zoom level of x25.

image

The calibration process is very simple once you work out how, the manual is written in “Chinglish” and not that helpful.  However I soon worked things out that to calibrate you pause the video source and then use the measurement tool to take a number of readings, from these you average the readings and enter the units and pixels measured into the calibration data, after the calibration has been performed then at the current zoom level you can make measurements, angle measurements, area calculations all through the software.

The down side is the calibration is only good for the zoom level you’re currently at so if you re-zoom you need to re-calibrate, so keep the steel rule on hand.

Here is a quick test on the rallylog board at the lowest zoom at VGA resolution.  The tracks are 10mil so not too far off with the measurements if you do the conversion.

 draw_Camera

 

Here is another couple, this is of the problem zone pour that I picked up in my previous blog post.

draw_rallylog-snap1

Zooming in on the above area with the microscope zoom function

draw_rallylog-snap2

 

Another using the emboss filter, you can see quality of the ATMega328 pads on the with HASL surface finish from Gold Phoenix (no so great on the one circled)

draw_rallylog-snap3

and with no filters applied and zoomed in.

draw_rallylog-snap4draw_rallylog-snap5

The best thing is the price, at USD42 it’s a great addition to my toolbox.

As mentioned in my last post, Rallylog is a new open Hardware project it also uses Kicad as the EDA.  Well late last week my prototype boards arrived from Gold Phoenix and very happy with the results, well sort of…..

Testing

When I receive a new design, one of the first things I do before any components or power is applied to my boards is to check all the physical connections with my trusty multi-meter on continuity settings then with schematics in hand I proceed to check every connection and check it off on my schematic.

From the schematics below you can see how I was progressing.  the green highlights are errors I’ve picked up, only a couple of minor ones that are easy fixed, until I got to my LCD board.  This PCB design is across two boards to account for a LCD, buttons and LEDS for the UI so that I can fit it all in the sparkfun project case.  I had created a new component for the LCD module I’m using, a low cost SPI based backlit LCD module, and I had placed the top row of pins on the module the wrong way around.  Still can’t work out why I hadn’t picked it up, but these are the problems when you’re a 1 man development team and there is no one else around for a design review…sigh, anyway changes have been incorporated into REV B.

20100713164141445_0001-cropped 20100713164141445_0002

Voltage Regulator sizing

Other significant change is to the 3.3V Regulator circuit, when I initially did my power budget I calculated that my 3.3V rail power requirements would be around:

Atmega328  – 5mA
LCD – 250uA
LCD Backlight – 80mA (20% Duty cycle)
SD Card – 80mA (200mA Spec)
RTC – 300uA

In total ~ 165mA .  The 3.3V regulator I had chosen had a max load of 200mA so plenty of headroom right? Wrong!!!

After revisiting my original design I realised I had made a mistake, I had not taken into account the input voltage and the de-rating effect of the volt drop across it.  In my case a 9v battery is being regulated by an LDO regulator down to 3.3V so in the process heat is generated, the larger the difference between Vin and Vout the warmer it will get, and the warmer it gets means my Max current output of the regulator drops, so how do I find if my regulator will still cut the mustard in this design? 

After a bit of research I found that I need to calculate the maximum power that can be  dissipated by the regulator and use this along with the max power of my circuit.  In this case my LDO is a SOT23-5 device.

so for my circuit:

Power(dissipated) = (Vin – Vout) * Imax

VIn = 9V (from battery)

Vout = 3.3V

Imax = 165mA

Power(dissipated) = (9 – 3.3) * 0.165 = 0.94W

This is close enough to 1W of power to dissipate in my SOT23-5 device.  Next thing is to see if the device can dissipate this amount of power.

From my technical datasheet the device has a max operating temperature of 125DegC and the thermal Resistance from Junction to Air is 220 DegC/W.  I also need to allow for Maximum ambient temperature, in this case 40DegC.  The thermal Resistance determines how efficient heat is transferred away from the junction i.e. the lower the number the better, meaning it’s more efficient at transferring away the heat from where it’s generated.  If the temperature reaches it’s operating max then the device will thermal limit, i.e. shutdown the output, which is not good.

Power(dissipatedMAX) = (TempMax – AmbientMax) / 220 DegC/W (for SOT23 Device)

= (125 – 40) / 220 = 0.386W

So my device has a max power dissipation @ ambient (40DegC) of 0.386mW , however the power being dissipated by my circuit is ~1W which is > 0.386W, so is not good :(    I need to go to a larger device, or lower the input voltage, in this case it will be a larger device as I’m not changing the battery type.

Calculating again for a SOT89 LDO Regulator with some better thermal parameters.

Max Junction Temperature = 125DegC

Thermal Resistance (Junction To Case) = 35DegC/W

= (125-40)/35 =  2.42W

So compared with my original regulator this one can handle the power dissipation as 1W < 2.42W with plenty of overhead.

Now the 5V Regulator

Doing the same for my 5V rail @ 85mA using the same SOT23-5 regulator (but 5V fixed output) gives  me:

Power(dissipated) = (9 – 5) * 0.085 = 0.34W

This is less than the Max power able to be dissipated by the regulator, i.e. 0.34w<0.386w so will be ok….just….although will run a little warm.

So if I add a PCB heat sink of 25mm square around (and underneath) the regulator using vias to transfer the heat how will that go?

So re-calculating with the PCB heat sink of 25mm square copper trace that has a thermal resistance of ~ 35DegC/W

Thermal resistance from Junction to Case = 81DegC/W

(125-40)/(81 +35) = 0.732W

So by adding a heat sink integrated into the PCB has increased the efficiency of the regulator to get rid of the heat by 89%.    

What I’ve done is to add a couple of vias directly beneath the regulator and opened up the solder mask so that bare copper is directly beneath the regulator.

image

Switch to our mobile site