Search This Blog

Tuesday, August 14, 2018

Portable F103 - PCB rel 1




The PCB arrived today.  May be because of the hot and humid weather or I am just rusty, I didn't have much luck soldering the fine pitched parts today.  Thankfully, this time I have some spares.

C20 and U4 are interfering with J3
The locator holes are correct as I lined them up to the 2400dpi scan.  The pads were offset towards one end just like the footprint from the original PCB I copied from.  The measurements of the stereo socket turns out to be offset a bit so two of the components were a bit too close. C20 and U4 have been pushed back a bit.

I have tested the LiPo charger and the two 3.3V LDO.  Here is the back side soldered up.

Top side of the PCB
Cheap Chinese PCB fab sometime only have silkscreen for the Top side to save money, so this is why I have used this as the Top side.  (This prototype PCB is made in US) It is more critical being able to line up the buttons.

Back side of the PCB is populated.

I soldered down all the parts except the LiPo. The 12MHz crystal I got from China is quite a bit smaller than the more common ones available on digikey.


I had to trim the white plastic carrier a bit to accommodate C12.  

USB connector and the Green "Charging" status LED
I had to file the USB connector on this side as this has a different shape than the usual USB mini.  Those new green LED are too efficient.  I have to drop the current down to 0.5mA

The other side
This is the side with the On/Off switch, MicroSD slot and Stereo connector.

Things that didn't go so well so far:
  • Solderability with Chineseum - on the 10-pin USB Mini and Chinese F103 chip.  Ended up scraping off the coating by running a blade over the pins on the F103 pins and retinning it.
  • I soldered in the the F103 in the wrong orientation.  Once corrected, the same chip works.
  • I soldered 3 wrong caps, 1 wrong value resistor
  • I used a different pin out for the SWD cable than my usual one.
  • My debugger got bricked because I left it on the PC after a few Windows update / reset cycle this morning.

Hardware testing

☑ SWD working


This means that the bare minimal system is working, LDO for F103, reset, power, SWD routing are correct.  SWD is now available on debug cable.

There is 128kB in my chip.


☑ USB


This is from GDB debugwire code I was working on.  This shows the HSE clock tree, USB circuits are working.

☑ Disable JTAG, enable SWD to free up GPIO pins
☑ LED backlight - turned On/Off or controlled from PWM
☑ Buttons - reading
☑ RTC - enable, cold boot reset.
☑ RTC from backup power is working (needed extra load resistor)
☑ RTC IRQ - backlight power off
☑ LCD working.  My LCD code have been upgraded to handle 5x8 and 8x16 fonts.


☑ ADC is reading battery voltage from a voltage divider.  Calibration here.
☑ LiPo charger is working.  Charge LED is working.

Things that needed to be fixed in future layout:

  • Stereo connector footprint is larger than expected, C20, U4 need to be relocated.
  • Power switch is wired backwards
  • RTC backup need extra resistor to provide extra load through the diodes.