Friday, April 24, 2015

PSU update

I completed a PSU board the other day. Nothing much to say about it, I haven't tried it out. It has six outputs per voltage and three voltages - 5V, -15V and +15V. The 5V and +/-15V have separate grounds that can be used as digital and analog ground.

The caps may be a bit close to the heat sinks though, not sure if it is a problem yet.

Sample and hold completed

I soldered the Sample and hold circuit today. Except for the side connectors it is complete. I have to say again, liquid flux is magic! I've had it in my toolbox for ages but never used it, but it makes things so much easier.

The two rows in front of the four chips are 10nF capacitors.

Tiny 0603 bypass capacitors, This is the first time I've soldered such small parts but it went rather well (I know, they are poking up from the board, but next time...). which is nice since I've bought more than 150.000 resistors of this size!

Practice makes perfekt. Or not. But close

As I decided to use PIC32MX chips for the voice cards, I had to learn how to solder tiny TQFP packs with 0.5mm leg spacing. I've been worried about this for some time, and to try to learn it without breaking anything important, I ordered up some QFP-to-through-hole adapters and the cheapest chips I could find. 

Yesterday I tried soldering them for the first time.The first chip was a complete disaster. I used way too much solder lead. I tried removing it with some solder wick but that was no success.

After watching a video on drag soldering, things started to go a bit better, and on the third chip, a 100 leg QFP, it got very good (except for a bent first leg).

My method ended up being this:

- Apply a tiny amount of solder on the lower left leg (on the PCB of course).

- Position the chip using SMD pliers. Once the chip is in the right spot, tack down the lower left leg with the soldering iron (in my left hand, even though I am right handed) while still holding the chip with my right hand.

- Adjust the chip if necessary (NB: Only do adjustments while the solder is still liquid, reheat if necessary.

- When all legs are in the right position, solder the upper right leg. The chip will now stay in place.

- Now apply a generous amount of liquid flux to all legs. This is very important for a good result.

- On each side, melt a tiny amout of solder onto the two first legs, in effect creating a solder bridge. Then drag the soldering iron across the legs several times. The solder will spread nicely. I use a huge chisel shaped tip, using the corner of it works very well. If you get a solder bridge, move the iron from the legs and outwards and it will disappear (if you haven't used too much solder).

I had to wear a pair of magnifying glasses to be able to do this properly. It is actually really hard to see if you get any solder between the legs and the PCB at all. To be sure, I had my wife bring them to her lab (she's a PhD student working on hormones and using fish cells for her work, so she has some really powerful microscopes in her lab) and take some close up photos of the result

Here are the photos. In my experience, 10 x magnification would be great for soldering while 20 x is perfect for studying the result in detail.

My second and third attempts. 

I managed to bend the first leg while tacking down the chip, so this will never work. The rest look good though

The mishap at maximum magnification

I am rather pleased with the result, especially since this is the first time I've tried to do it.

My wife's kick-ass stereo microscope. I want one but they sell for $4000+ used... There are cheaper models out there though.


The ketchup effect

My project tend to go by the ketchup effect. For a long time nothing happens, then suddenly  all parts and boards and whatnot arrive at the same time.

Within the same week I got at least 5 envelopes with parts from China, the prototype boards for the mpg-200 arrived, my orders from Farnell and RS componens were delivered and to top it off, the grease for the JP-8000 keyboard that I've been waiting for since christmas was suddenly ready for pickup.

Aaand - in around three weeks the biggest shipment of my life - my daughter - arrives. She is due on the 16th of May, so who knows when she decides to show up :)

Thursday, April 2, 2015

PIC32 100 pin SPI ports

Just to make it a bit easier - here is a list of SPI pins on the 100 pin PIC32 chips.

The PIC32MX795 has four SPI ports, named SPI1, SPI1A, SPI2A and SPI3A. They are all equal.

SPI1:
namepinport
SCK70RD10
SDI9RC4
SDO72RD0
not SS69 RD9


SPI1A:
namepinport
SCK48RD15
SDI52RF2
SDO53RF8
not SS47RD14


SPI2A:
namepinport
SCK10RG6
SDI11RG7
SDO12RG8
not SS14RG9


SPI3A:
namepinport
SCK39RF13
SDI49RF4
SDO50RF5
not SS40RF12


On the EasyPIC Fusion v7 from Mikroelektronika, the only SPI that has all the necessary pins on the same 10 pin connector is SPI3A


For reference, a 40 pin PIC18F has the following SPI
namepinport
SCK18RC3
SDI23RC4
SDO24RC5
not SS7RA5

PIC32 3.3V - 5V interfacing

According to the PIC32MX Family Reference Manual - chapter 12 I/O ports (http://ww1.microchip.com/downloads/en/DeviceDoc/61120D.pdf), PIC32s are 5V tolerant when the pins are in INPUT mode. I have read that this may only apply when pins are configured as digital, but unsure about this.

The Microchip Tips'n tricks guide has a chapter on 3.3-5V interfacing here: http://ww1.microchip.com/downloads/en/DeviceDoc/chapter%208.pdf

Sparkfun has an example of a bidirectional interfacing card here: https://learn.sparkfun.com/tutorials/using-the-logic-level-converter

This post indicates that it should be possible to drive a 5V PIC's SPI input using a 3.3V chip without interfacing. Let's see if that is true :-)