Shop OBEX P1 Docs P2 Docs Learn Events
Sigma-delta ADC and non-optimal layout — Parallax Forums

Sigma-delta ADC and non-optimal layout

smbakersmbaker Posts: 164
edited 2011-09-02 20:12 in Propeller 1
I have an application where I want to control a motorpot and have it seek to a certain position (going to use an h-bridge to run the motor, then read back position with one of the windings).

However, my PCB was designed for another project, and I don't have any ADC capability on the board. So, I'm thinking of sticking the sigma-delta on a separate perfboard and running some hookup wire over to it. The parallax app-note says to keep the components as close to the prop pins as possible, so I'm wondering what kind of effect moving them off board would have. I'm looking for at least 8-bit resolution.

An alternative would be to measure using RC decay. I'm a little concerned on what resolution I can get with RC decay, and what affect the value of the pot might have on rate of measurement (the idea is to stick this inside of some kind of PID controller, to be able to seek the motorpot to a specific position).

As some might guess from the above, I'm mainly a digital guy, and don't do a lot of work with analog...

Scott

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-11 16:42
    Scott,

    You will probably not be successful with your scheme. The sigma-delta passive components really do need to be soldered proximal to the Propeller chip and, certainly, not on another board. An inexpensive solution for you might be to use the Propeller QuickStart board, which has pads for a sigma-delta channel where they need to be. Any additional circuitry you need could then be built onto a board that plugs into the QuickStart. Another option is the Propeller Backpack, which has two sigma-delta channels already populated.

    -Phil
  • smbakersmbaker Posts: 164
    edited 2011-08-11 17:40
    How much of the sigma-delta circuit is critical and needs to be close to the prop? Looking at AN-008, It would be relatively easy for me to sneak a 100k chip resistor between a couple of pins. The 150k resistor I'm pretty sure could be located off-board. Gadget Gangster's tutorial implies it may be possible to leave off the two caps entirely (this surprises me, I'd think we'd at least need a cap to ground).
  • TubularTubular Posts: 4,717
    edited 2011-08-11 18:18
    Tell us more about the pot (eg resistance of your winding), and how fast the motor turns the pot (dynamics). How long does it take to rotate full scale using its motor?

    The main effect of not having the sigma delta components close, is that they pick up noise. If your control loop is slow it may be possible to average out and obtain the kind of accuracy you seek
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-11 18:27
    Locating the 150K resistor and the caps off-board is just asking for noise pickup. There's no substitute for bringing a low-impedance signal to a complete sigma-delta structure close to the Propeller. Sorry, but there just aren't any shortcuts for doing this right.

    -Phil
  • smbakersmbaker Posts: 164
    edited 2011-08-11 18:50
    The pot is this one: http://www.alps.com/WebObjects/catalog.woa/E/PDF/Potentiometer/MetalShaft/RMP_RK16/RMP_RK16.PDF, the 10k variant. I'm not sure what the rotational speed is going to be as I haven't wired up the h-bridge and tested it yet. It certainly doesn't need to be too fast -- let's say 1 or 2 seconds to seek to a particular position. I'm using it as a volume control for an amplifier.

    I do think I have a solution -- I found a stash of 25 LTC1298 ADCs in the junk box. Not only should they do the trick for the ADC, but checking the distributors, these things seem to be worth a lot more money today than whatever I must have paid for them a decade ago.
  • TubularTubular Posts: 4,717
    edited 2011-08-11 19:11
    IMO, there's no substitute for a good SAR ADC!

    But it depends on the performance required, and the performance depends on the source motorpot. If DC potential is being applied to the wiper ends it may be possible to put a rail to rail op amp at the motorpot, getting a nice low source impedance would help.

    Btw, has anyone attempted to properly classify (ENOB at various frequencies) the common prop sigma delta circuit in its various layout arrangements (backpack, quickstart board etc)? And does anyone know the reasoning behind choosing 150k vs lower impedances that might offer more robustness?

    edit: Our posts crossed over. What kind of cable distance will there be between pot and prop? Also the datasheet seems to state 12 seconds to go 300 degrees at 4.5v. Thats plenty slow. The 10kohm will result in a nonlinear curve out of the LTC1298 unless you use a buffer (r2r op amp) in between. Finally you could consider a VCO (eg 555 timer) at the pot and read the frequency using the prop. That would solve the distance issue
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-11 19:15
    Tubular wrote:
    ...does anyone know the reasoning behind choosing 150k vs lower impedances that might offer more robustness?
    In general, you always want the input impedance of an ADC to be as high as possible, so that it does not load the analog voltage source, which can lead to conversion errors.

    -Phil
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2011-08-11 19:35
    I'm surprised that it was even mentioned that this circuit could operate without external caps! The input resistor and the capacitor forms an integrator which should ideally be fed into a comparator which switches cleanly and precisely at a preset threshold. The feedback resistor is also part of the integrator and it needs to be balanced proportionally with the input resistor and input voltage bearing in mind that the feedback resistor has a 3.3V swing on it from the Prop whereas the input resistor may only be seeing a 1V swing. The component that is most sensitive to placement is the integration capacitor and seeing that it's not even feeding into a comparator but the Prop's input (which is not designed for clean and precise switching) means that this needs to be as close as possible to the chip. Close to the chip does not mean close to the package which in the case of a 40-pin DIP is excruciatingly distant even for the center pins. Supply noise will affect the input threshold so these need to be super clean for one thing if there is any hope of getting reliable readings.

    But I haven't really looked into the Prop's sigma-delta configuration other than knowing some basics of RC integration sigma-delta converters so I leave it to those in the know.
  • smbakersmbaker Posts: 164
    edited 2011-08-11 19:38
    Tubular wrote: »
    edit: Our posts crossed over. What kind of cable distance will there be between pot and prop? Also the datasheet seems to state 12 seconds to go 300 degrees at 4.5v. Thats plenty slow.

    I'm looking at around 6" of cable between prop and pot. 12 seconds is quite slow. It'll be interesting to see what happens if I give it a bit more voltage (datasheet lists the max as 6v).
  • TubularTubular Posts: 4,717
    edited 2011-08-11 20:06
    Ok. 6" is not far. You could probably just start with simple RC time constant measurement and see whether it gives you suitable accuracy.

    You can always shield the cable if need be, but will probably be fine without it.
  • smbakersmbaker Posts: 164
    edited 2011-08-11 22:53
    Just finished throwing it together and the LTC1298 worked out perfectly. It was even almost-pin-compatible with an unpopulated dallas RTC socket on the board. Haven't wired up the H-bridge or designed the PID controller yet; gotta save some fun for the weekend.
  • smbakersmbaker Posts: 164
    edited 2011-08-31 21:15
    Finished up this project today, and those interested in the motor-pot can see it in action in this video:

    http://www.youtube.com/watch?v=kNb-hBBoIZY

    And a short write-up on the blog at:

    http://www.smbaker.com/scotts-ipad-digital-audio-optical-receiver-amplifier
  • JeremyJJeremyJ Posts: 30
    edited 2011-09-02 20:12
    Nice work and write-up! (Like the sandrail, too!)
Sign In or Register to comment.