Author Topic: Lots of beginner questions... (Position sensor ICs, QFN, PIC prog., projects...)  (Read 2459 times)

0 Members and 1 Guest are viewing this topic.

Offline netheranthemTopic starter

  • Newbie
  • Posts: 3
Hello all!

Short introduction so you know a bit about my background and can skip a few obvious things...
I am someone who studied mathematics (and thus have also a good knowledge of physics alongside) and turned around to get into software engineering.
As I started doing some assembly, I realized I could take this much further and do my own designs. So, programming isn't an issue for me, but I am hitting a few issues with my latest design, which is a bit ambitious, but I think I can make it work without a doubt. The only variable is how many screwed up boards I will end up with, and that's where your help will be much appreciated!

Also, I haven't soldered a lot but someone with a good soldering station agreed to show me proper techniques and I will be able to use the tools to get my prototypes done. I watched Dave's great videos on the topic, so while I haven't got much experience (And it was with a crappy iron, duh.) I think that I will get there eventually.

So, now about my project... I am designing a positioning Arduino shield (Could also be a non-arduino thing, but hey, if I'm going to make a nice piece of hardware, formatting it so that it can be plugged in an arduino directly isn't too much pain to take!) It would include a gyroscope, accelerometer, magnetometer, and possibly a GPS chip.

I am asking myself quite a bit of questions since I started thinking, and any help would be much welcome if any of you can elude any question :)

Those chips come in very few digital flavours at Mouser (Especially with the added export restrictions, since I don't live in the US). It is the most convenient retailer for me because of the free shipping and no added customs fees.

- 1 Could I go very wrong with just the cheapest available? (Maybe a bit vague... I read the manuals and the specs seem alright, I just have no experience and could be missing anything).
- 2 Are there better retailers for such specific ICs?

Those chips also come in QFN packages... So I'll have to design my PCB accordingly. Neither eagle or KiCAD seem to have the libraries for the components I'm going to get. (Parts would be mostly STMicroelectronics, in that one case.)

- 3 Is there another design software (Even if I'd have to pay for it) with more libraries in your experience, that would be handy in the future ?

How do I design for QFN? I saw a couple of videos about soldering those... but can't seem to find a consistent answer for someone who only has a soldering iron (A hot air station would probably be too expensive to get, but solder paste would be cheap so I can get that). I have seen some people just doing 9 square vias under the central pad to have a good thermal heat exchange, and then heat the central pad from behind to get the solder to melt to the QFN chip before doing the surrounding pins (Which land on pads twice their length or so, to have a bit of extra). I'm using OSHPark, so they have their limitations concerning designs... but that should do most things. If you have a solution that limits fab options, that could be good to hear as well, would just be good to know why and adapt myself :)

- 4 Is there a way that would only use pads on one side of the PCB without hot air nor reflow oven? (Toaster ovens don't really exist in Europe! Snap).
- 5 If not, is the 9-via option decent for a prototype? Or is it bound to fail :)
- 6 Any other more complex option I'm not aware of? Or maybe should I really really buy a hot air station? (Wouldn't be bad for salvaging old motherboards, I admit).

Now a bit more on the programming side... I like the Arduino IDE and what it does but when it comes to real-time applications where I need (and want) to get the most juice out of the microcontroller, I thought I'd vary a bit and go for a 32-bit PIC (Will I get killed for doing an Arduino shield with a PIC? Okay... just kidding) this time which would have enough pins to take on all IO, and have a high enough clock to keep up with the real-time data before feeding it back to another microcontroller through some interface (Not decided yet, probably going to be serial/parallel if it can go fast enough, otherwise I'll have to study other protocols) and write everything in assembly to make sure I can execute all instructions before the sensors actualise themselves (I have seen that those sensors go up to around 1kHz, so that's quick enough!).

- 7 I have seen that the PicKit 3 isn't that awesome through Dave's and other reviews. Although, I LOVE debugging tools (Java software engineer, you guessed it), is the ICD 3 worth the markup for convenience / speed / debugging, or is it just much overkill for my application (Which could get a bit complex)?
- 8 With the previous question in mind, is the PIC IDE decent to use? Or do you find yourself using different tools?

And last design questions... I read the manuals for the sensor ICs, and they use different interfaces and layouts... It doesn't seem very complex but I just want to make sure if my approach is right:

- 9 Can I just follow the layout recommended in the spec sheets of the sensors and PIC? That would be done connecting serial lines to the microcontroller's serial pins and I2C lines would go to any digital IO pin. Only other thing to add would be a 3.3V supply. Am I missing anything?
- 10 I could add a programmer pinout to the board, too... but should I be careful about anything there? Or can I just map the programmer's pins to the microcontroller pins regardless of what else is on those pins during normal use?

If you read this far, thanks! And if you have the answer to any of the previous questions, I'd be very eager to know, thanks for your time!

Netheranthem
 

Offline microbug

  • Frequent Contributor
  • **
  • Posts: 563
  • Country: gb
  • Electronics Enthusiast
A quick comment on hot air stations: the Atten 858D is super cheap - about £40 or $63, and is about all you need!
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5029
  • Country: ro
  • .
Pay attention to functionality and pins, some microcontrollers have some features using the same pins and might not be possible to route what you want to other pins.
Pay attention to different voltages between ICs - if your microcontroller is 2.5-3.6v and another IC requires 5v, only some pins are 5v tolerant etc.
You can buy PIC chips directly from Microchip, for Europe might want to check rs-components.com For others... check findchips.com to see other distributors and what prices they may have

QFN is a standard layout, all datasheets have the pad sizes and distance between them and so on... you can design the footprint in the software you use, or just search the libraries for another QFN chip and copy the footprint.
Besides KiCad and Eagle, check Diptrace.

Dave's PicKit3 review is very OLD ... things have improved since he made that video and pickit3 works ok.
MPLAB X is ok, I like it. You can code in whatever you want, assembler, c, basic... there's also custom compilers and their IDEs like Mikroe's, check their site : http://www.mikroe.com

Usually, stuff like i2c, spi etc can only be connected to particular pins, so you can't just use any pins to connect other ICs to your microcontroller. Well, you can, but you'd do bitbanging, everything in software, instead of taking advantage of the hardware.
Yes, you should add the ICSP header on the board or at least have pcb pads for that. Alternatively, with such big microcontrollers like PIC32 if the budget allows it, it wouldn't hurt to add a usb to serial chip (if the pic32 or whatever you use has no usb support built-in) and write a mini-bootloader which would allow you to send new firmware through USB instead of using the pickit3 programmer.
 

Offline daedalus

  • Regular Contributor
  • *
  • Posts: 140
  • Country: gb
1: don't just get the cheapest, there is a big difference in accel / gyro parts between the cheapest and more capable options. Also its worth considering how you are interfacing the parts.

2: for IMUs check out invensense, they have single package parts with gyro, magneto and accelerometer, and sell in small quantities from their website, and the parts interface via SPI/I2C. Not sure if mouser carry their parts. If you are doing a design with a pic micro, then invensense tech support have some good sourcecode samples.

3: Altium is very expensive, but worlds above eagle/kicad in functionality. Might be worth checking out a few youtube vids if you have a company behind this to pay for your seat / the ability to buy a student licence. Either way you are going to have to learn to make your own footprints for parts, its just a fact of life. The benefit of altium is it has wizards for all the standard packages which makes things faster.


4,5,6: on qfn soldering, there are a few gotchas. If you need vias on the middle pad for heat transfer, you need to tent them otherwise the solder will wick out during reflow. Whilst it is possible to hand solder QFN parts, and with a few tweaks to the footprint you can get quite reliable at it, I would just do paste+reflow as its much easier. You don't need expensive kit for this, I have reflowed prototypes on an electric hot plate, with manual control (as in me twiddling the dial). Also here toaster ovens are sold at argos as mini-ovens.


7: Theres nothing wrong with the pickit3, and I wouldn't get an icd3 unless you are using the pic32 parts, and need the more advanced debug support.

As for ICSP connectors, a standard header is fine. If you are really size / cost sensitive then getting a cable from tag-connect saves you a socket per pcb and a bit of board space.


8: mplab X is the least-worst choice for development on pic, it is like hacking off a limb moving from visual studio to mplab, but it does mostly work.

10: make your life easier, don't reuse the icsp pins for other things until you get a bit more experienced, there are lots of subtle gotchas involved. Usually the cost difference to getting a part with a few more pins is trivial.
 

Offline netheranthemTopic starter

  • Newbie
  • Posts: 3
Thank you very much for all the great answers!

Last question since daedalus mentioned reflow...

Is it reliable to just "reflow" one or two IC with a hot air gun (Since it seems to be cheaper than I thought, I might very well get one) by changing temperature accordingly and protecting other ICs with soldering tape?
 

Offline daedalus

  • Regular Contributor
  • *
  • Posts: 140
  • Country: gb
yes you can reflow with a hot air gun, if you are going to do this take your time soaking the board, so everything is up to temperature, don't just heat the chip. Its probably best to put your qfn's on first, then manually solder the other bits after. The other parts shouldn't be damaged, its just you can blow off 0603s and 0402s if you are not careful. Kapton tape (ebay is a good source for this cheaply) can be used to mask off other areas if you like, I don't tend to bother myself. Ultimately if you were swapping a dead chip during rework this is what you would do.

The only other thing that makes reflowing with hot air easier is if you have a board pre-heater, it applies some lower temp heat to the whole pcb, then the hot air only has to rise the temp 50 deg to get the solder to melt. This isn't really vital, but is useful when doing lead free.

EDIT: that said if I was starting out, I would probably buy a cheap mini-oven as a first tool, and get a hot air gun later. The oven will be cheaper (£30 where im from), and you can literally throw the pcb in, and just watch till it reflows and pull it out. This is 'good enough' for hobby reflowing, and is pretty damn easy. When you get into pasting boards you will wonder why you ever bothered hand soldering batches of prototypes.
« Last Edit: June 20, 2013, 11:51:40 am by daedalus »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf