Shop OBEX P1 Docs P2 Docs Learn Events
Provide feedback on adc board for prop — Parallax Forums

Provide feedback on adc board for prop

Will__SWill__S Posts: 19
edited 2009-01-03 14:07 in Propeller 1
Hi all,

I'm in the process of creating my first pcb, and was hoping to get some feedback. The board is an analog/digital converter for some sharp ir sensors I'm using (3 pin interface [noparse][[/noparse]gnd, +5v, sig]). I know the prop can do this natively, but I had some issues with wild readings (probably due to the distance from the prop, and a sloppy proto board). I decided to use the adc0834bcn chip (data sheet http://www.parallax.com/Portals/0/Downloads/docs/prod/datast/dsadc0831.pdf ). The pcb I'm creating is an add-on to the spin studio main board, and will be connected via a 20pin idc ribbon cable to port D.

While scouring old posts for pcb tips, I came across a discussion that mentioned putting a .1uF cap on the power input of ics, and especially the prop. Is this necessary for all ics?

My hope is to make one board at home for fun, and if all goes well, have a shop make a few. As such, the design is single layer. Attached is my schematic, and layout.

All input on the schematic and layout is greatly appreciated.
Thanks,
Will
446 x 465 - 40K
890 x 660 - 126K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-01-02 14:54
    You should always put a 0.1uF ceramic capacitor across the power and ground pins of any IC as close to the IC as you can reasonably put it. If you have a high current IC, you also need a 10uF or so electrolytic approximately where the power comes into the board.

    Most logic ICs these days switch in the ns range and electricity can travel only a few inches in that timeframe. In particular, it can't flow from your power supply to the IC in that amount of time so you need a local reservoir, hence the 0.1uF capacitor.
  • Paul RowntreePaul Rowntree Posts: 49
    edited 2009-01-02 15:45
    Hi;
    This is more of a question than help for Will, although his ADC board design brought it to my mind ...

    On an analog pcb are there any negative consequences to having areas of the board 'filled in' but not connected to ground, for example? I guess I am thinking of stray capacitance issues and so forth.

    Cheers!
  • LeonLeon Posts: 7,620
    edited 2009-01-02 16:07
    They should be connected to ground, otherwise they can pick up and re-radiate noise.

    I'd use wire links instead of those long tracks.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 1/2/2009 4:14:38 PM GMT
  • mynet43mynet43 Posts: 644
    edited 2009-01-02 21:47
    Just a thought.

    You might consider using an MCP3208 instead of the chip you're using.

    It's very easy to interface to the Prop, has drivers available and will give you eight 12 bit adc's instead of the 8 bit you have.

    I've used it with IR sensors with good results.

    If you want schematics or code samples, let me know.

    Jim
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-02 22:56
    Even better than an MCP3208 - I suggest a TLV2543 from Texas Instruments. It's a 12-bit, 11 channel ADC with a FANTASTIC driver written by Tim Moore. The driver he wrote samples ALL channels about 4000 times a second, and stores the running average in hub memory. The chip gives excellent results and has a very stable output that barely bounces around at all. I use this to sample all sorts of sensors all at the same time. Secondly, this chip is in TI's sample program, so they will send you up to 5(plus other chips if you'd like) for free. I'm using these in my next product. They're great! If you need the driver, I can send it to you. I'm not sure if it's in the OBEX as this isn't a "common" chip, like others.

    (Sorry to one up you Jim!)
  • chad123chad123 Posts: 4
    edited 2009-01-03 00:00
    Hi just a quick comment on the pcb itself. Looks pretty good head the comments from above with the fill planes and caps. The only other thing I would recommend especially for a home brew board is to find bigger pads for the the though hole parts.
    When you etch it and the drill them there will not me much to solder to. It will also have a tendency to pull up with heat from the soldering iron. The square pads on the resistors are much better.

    .02c
    chad
  • mynet43mynet43 Posts: 644
    edited 2009-01-03 01:14
    @ Phil,

    You're right about the TLV chip. It converts faster and allow a much faster clock than the MCP3208.

    I rewrote Chip's driver for the MCP3208, so I can now get more than 10,000 individual samples/sec.

    I can also get more than 4,000 10-sample averages per second.

    I'm still happy with the MCP3208 and I never need anything this fast anyway, yet[noparse]:)[/noparse]


    Question for you about the TLV driver. You said it keeps running averages of the adc values.

    Does it also provide individual samples if needed? When I run the data thru a Kalman filter,
    I need individual samples to get the right answers. Averages don't work as well.

    I wrote a program to track the altitude and velocity of a rocket by reading the air pressure.
    In this case the Kalman filter needed individual samples to get the actual variance of the data.

    Thanks for the info. I may switch to the TLV when I get some free time to look at it.

    Jim
  • Will__SWill__S Posts: 19
    edited 2009-01-03 03:37
    Thanks for all the help!

    Jim and Phil,

    Thanks for the chip suggestions, I wish I would have asked for suggestions before purchasing a few of the adc0834s.

    I've reworked the pcb a little, but had a few questions.

    Leon, you mentioned using jumper wires instead of the long traces. Were you referring to just the ground traces?

    I've removed the solder pour, and used jumpers for the gnd connection.

    I was reading that having a ground plane helps remove odd glitches especially for the prop. Should a ground plane be used when ever possible? Should I still keep the solder pour and just use jumper wires to connect the larger areas, and remove the small unconnected areas? Is the prop especially sensitive, or is this mainly a consideration for the board the prop is directly mounted to?

    What is a good thickness for the pads and holes for a home brew board. Would making all of the pads square be ill-advised?

    Attached is my newer revision of the board and schematic.
    Thanks again for all the help,
    Will
    485 x 365 - 48K
    397 x 425 - 34K
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-01-03 03:58
    VREF needs to have some grunt on it as it has to drive the internal D/A ladder so either you buffer it or least place a small capacitor (1uF) from VREF to GND. Better still would be to regulate the power which includes the power for the reference or look at some other ADC as mentioned.

    If you are working with a single sided PCB and you need to have jumpers then do this to signal lines but avoid doing this to the ground as you have on your pcb. Allow for capacitors on the ADC inputs even if you don't end up using them, having extra tracks and pads doesn't cost anything. Also pour out that ground as much as possible around the outside of the board and up between all those sensitive reference and input lines.

    *Peter*
  • PhilldapillPhilldapill Posts: 1,283
    edited 2009-01-03 09:25
    @mynet,
    When I say "running average", I'm refering to the X = (X + (New X))/2 method. In Tim's driver, from what I understand from the assembly, it takes the previous sample, multiplies it by 7, adds the new sample to that, and divides the total by 8. This way the new sample contributes only 1/8th of the actual value. Looking at the code, it would be easy to store the ACTUAL value... in fact, doing so would increase the sample rate since each cycle won't have to compute this average. Like I said, you can go to the TI website and order some samples of the chip to try it out. It comes in DIP, SOIC, and AMAZING packages. Well, not the last one, but I just love this chip. I'd use it even if I only needed ONE channel.

    Oh, one other thing as far as references go. If you DO get some samples from TI, also check out their LM4040A series precision voltage references. They come in 5V, 2.5V, and other references and the "A" means it's 0.1% accuracy. Using these with the TLV2543, and good wiring gives extreme accuracy. I don't get all tingly about chips very often, but this combo gives me the shivers. Yes, I'm a nerd.
  • LeonLeon Posts: 7,620
    edited 2009-01-03 10:04
    Will__S said...
    Thanks for all the help!

    Jim and Phil,

    Thanks for the chip suggestions, I wish I would have asked for suggestions before purchasing a few of the adc0834s.

    I've reworked the pcb a little, but had a few questions.

    Leon, you mentioned using jumper wires instead of the long traces. Were you referring to just the ground traces?

    I've removed the solder pour, and used jumpers for the gnd connection.

    I was reading that having a ground plane helps remove odd glitches especially for the prop. Should a ground plane be used when ever possible? Should I still keep the solder pour and just use jumper wires to connect the larger areas, and remove the small unconnected areas? Is the prop especially sensitive, or is this mainly a consideration for the board the prop is directly mounted to?

    What is a good thickness for the pads and holes for a home brew board. Would making all of the pads square be ill-advised?

    Attached is my newer revision of the board and schematic.
    Thanks again for all the help,
    Will

    *Grounded* copper pour is a good idea, especially for an ADC. You should remove all unconnected "islands", the software I use doesn't create them in the first place.

    I meant that you should use jumpers for your signal tracks - they should be as short as possible.

    Round pads are best, some people use a square pad to indicate pin 1 on a part.

    12 mil tracks and 60 mil pads are what I'd use, if you've just started making your own boards.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • mynet43mynet43 Posts: 644
    edited 2009-01-03 14:07
    @ Phil,

    Thanks for the feedback on the TLV chip.

    I really like your idea about using an accurate voltage reference.

    I've always noticed that the reference voltage is a little 'off'.

    Would you be willing to share your circuit for connecting the LM4040A to the TLV reference line?

    I can probably figure it out, but why re-invent the wheel[noparse]:)[/noparse]

    Jim
Sign In or Register to comment.