Shop OBEX P1 Docs P2 Docs Learn Events
Placing sigma delta components on proto board (#32810) — Parallax Forums

Placing sigma delta components on proto board (#32810)

Alex.StanfieldAlex.Stanfield Posts: 198
edited 2014-06-26 10:50 in Propeller 1
I was wondering where on this board is the best place to put the passives needed for a sigma delta ADC?

Has anyone done that on this board (32810)? I only need one ADC.

Thanks Alex
«1

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-21 20:29
    The answer is pretty simple: "As close to the pins as you can possibly get them." My personal choice would be to choose a pair of corner pins, and to solder an SMD feedback resistor directly between them. Pick the two that have the shortest path to the breadboard pads for the remaining passives.

    -Phil
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-22 20:04
    The answer is pretty simple: "As close to the pins as you can possibly get them." My personal choice would be to choose a pair of corner pins, and to solder an SMD feedback resistor directly between them. Pick the two that have the shortest path to the breadboard pads for the remaining passives.

    -Phil

    Thanks Phil, I read the app note and thought that might be the answer, but I didn't find a clear candidate for that given the long traces for almost every pin.

    Since I'm short of experimenting time I thought of asking here in the forum if someone had success with a sigma delta with this particular board and save some frustration.

    If anyone around here had any success i'll be glad to know which pins and location on the board were used.

    Thanks
    Alex
  • msrobotsmsrobots Posts: 3,709
    edited 2014-06-22 20:36
    @Alex,

    I guess it depends on accuracy you need and noise you can accept.

    I used thru hole parts to read the parallax joystick. (2 pots 10K). No SMD just the holes next to the pins. Decided on witch pins because of placement of joystick.

    Result is amazing good. Since Sigma Delta is not linear but parabolic you need to adjust for that anyways.

    @Phil

    - Love it. SMD resistor across corner pins. As close to the pins as possible. Yes.

    Enjoy!

    Mike
  • Cluso99Cluso99 Posts: 18,069
    edited 2014-06-22 20:36
    I did it on a board where the tracks would be similar lengths to what you will be able to achieve. It worked fine.
    IIRC I posted the code to read a 4wire resistive touch panel (this uses 5 pins).
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-23 06:24
    The answer is pretty simple: "As close to the pins as you can possibly get them." My personal choice would be to choose a pair of corner pins, and to solder an SMD feedback resistor directly between them. Pick the two that have the shortest path to the breadboard pads for the remaining passives.

    -Phil

    I have heard this guideline many times and pretty much figured that since you need 3.3v and ground, placing one each at the 4 corners is likely a good starting point. Having a group together might develop cross-talk problems. But the truth is I have never actually tried it.
  • pjvpjv Posts: 1,903
    edited 2014-06-23 10:05
    msrobots wrote: »
    ..... Since Sigma Delta is not linear but parabolic you need to adjust for that anyways......
    Mike

    ?????

    Cheers,

    Peter (pjv)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-06-23 11:54
    I tripped on the "parabolic" issue too. Sigma-delta is intrinsically linear.

    Here is a placement I've used:
    PDsigDelProto.jpg

    The input feedback is on p7, with two 1nF 0603 capacitors. p7 is right next to Vdd point where it heads for the large Vdd pad on the bottom of the board under the chip. The Vss side capacitor is soldered to the ground plane that runs between the pads. The four 0603 resistors on p6..p3 provide the feedback output and calibration offset levels. The black sensor is an IR photodiode.
    320 x 227 - 30K
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-23 12:44
    The problem is I have the newer proto board, this one.

    32810_0.png

    Maybe I'm being too cautious with the placement, but since the app note says so I just wanted to make sure before a long series of trials and errors.

    Alex
    1000 x 1000 - 1M
  • msrobotsmsrobots Posts: 3,709
    edited 2014-06-24 00:36
    hm.

    About the parabolic thing. This might have been a issue with the raw value of the joystick pots and my goal to produce a vector as output, not raw x/y. I ended up with some calibration table and interpolation with different factors. I played around with it until it had the right 'feeling' using the stick. And my result tables for calibration and calculation had some parabolic looking values in them.

    so - ignore the parabolic part. As stated above it is linear. My bad.

    Enjoy!

    Mike
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-24 00:59
    The problem is I have the newer proto board, this one.

    32810_0.png

    Maybe I'm being too cautious with the placement, but since the app note says so I just wanted to make sure before a long series of trials and errors.

    Alex

    That is a Propeller Project Board, not a Propeller Proto Board. It certainly is different and more difficult to get close to the actual Propeller i/o pins.

    It may not be appropriate for this project.
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-24 03:11
    That is a Propeller Project Board, not a Propeller Proto Board. It certainly is different and more difficult to get close to the actual Propeller i/o pins.

    It may not be appropriate for this project.

    Ups! You are right, sorry for the misnaming. :blush:
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-24 06:59
    If you are reluctant to do Sigma Delta on that board, use an MCP3208 ADC chip... Parallax sells them and they will operate at 3.3v or 5.0 logic levels.

    In many ways, the Project Board is more convenient to build on. You seem to have found just about its only drawback other than no provision for PS/2 mouse or keyboard. It does have several added features, including and SDcard interface and the ability to easily build with SMDs.
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-24 10:02
    So, what's the official (Parallax) stance for the Project Board (#32810) ? Does it support sigma-delta ADC or not?

    Alex
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-24 12:05
    I doubt if there is an official stance.
    I am looking at the board documentation at it certainly seems awkward to get any i/o pin next to both a 3.3v and Gnd. I have looked at pictures with label of the front and back. (pages 2 and 3).

    The board simply violates the concept of providing components as close as possible to the actual Propeller for this purpose, unless you work with very tiny SMDs and the fine pitched leads coming off of the Propeller itself. It is micro-surgery and too much for myself to consider.

    It you have your heart set on Sigma-Delta ADC, maybe Parallax would accept an exchange of boards. Not sure who pays the shipping though.

    http://www.parallax.com/sites/default/files/downloads/32810-Propeller-Project-Board-USB-Guide-v2.0.pdf

    Pin 11 or Pin 12 near to the actual Propeller chip is also next to a capacitor that is connected to Vdd and Vss. That might be the optimal site to build just one Sigma-Delta ADC. It would be my first choice.
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-24 19:57
    I doubt if there is an official stance.
    ...
    Pin 11 or Pin 12 near to the actual Propeller chip is also next to a capacitor that is connected to Vdd and Vss. That might be the optimal site to build just one Sigma-Delta ADC. It would be my first choice.

    Thanks Loopy for you interest & suggestion, I might try it if I find the time.

    I just sent a direct mail to Parallax's support on the subject. Will post the answer.

    Alex
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-25 00:58
    Frankly, I have always thought that really using Sigma-Delta ADC on any micro-controller would require building a custom board to get it right. The concept was heavily explored before the Propeller with the SX micro-controller chip and custom boards of all sorts.

    But with surface mount devices, people made it work on the original Proto Board.

    Parallax has an array of boards with different abilities and features. I can't see how they might feel that every board has to do everything. Several include ADC chips, none include specific pads for Sigma-Delta ADC.
  • PublisonPublison Posts: 12,366
    edited 2014-06-25 02:14
    Parallax has an array of boards with different abilities and features. I can't see how they might feel that every board has to do everything. Several include ADC chips, none include specific pads for Sigma-Delta ADC.

    Loopy,

    You must have missed the description of the Quickstart board:

    Details
    • Open hardware reference design through our Altium and DipTrace PCB layout files (more export options may be possible)
    • Bus-powered USB coupled with 3.3V regulator for 500 mA
    • 64KB EEPROM (32K for P8X32A program, 32K for general-purpose use)
    • External brownout reset may be installed by removing SMT jumper
    • Pads for sigma-delta A/D circuitry (two resistors and two capacitors, both 0603) for using the Sigma-Delta A/D AppNote
    • Power Requirements: 3.3 or 4 to 9 VDC, up to 500 mA
    • Communication: USB, 3.3 V serial, I2C
    • Dimensions: 2.0 x 3.0 x 0.36 in (5.0 x 7.6 x 0.84 cm) mounting hole centers separated by 3.5 x 1.0 in (88.9 x 25.4 mm)
    • Operating temp range: -40 to +185 °F (-40 to +85 °C)
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-25 03:04
    I certainly did... I can't spend my whole life shopping Parallax. Happy to see this. And Radio Shack has been having sales all over the place on QuickStart boards. I just have so much to study and learn.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-06-25 08:23
    This is the layout of the Sigma Delta parts on the QuickStart, p8 as the summing junction, p9 as feedback...
    quickstart_sigma_delta.png
    874 x 693 - 136K
  • PublisonPublison Posts: 12,366
    edited 2014-06-25 08:28
    Thanks Tracy,

    I knew i had that exact picture "somewhere" on my computer.

    Jim
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-25 10:13
    Publison wrote: »
    Thanks Tracy,

    I knew i had that exact picture "somewhere" on my computer.

    Jim

    Maybe 'the cloud' ate it.

    It is a lovely picture and likely to be the best Sigma-Delta build with a Propeller board.
  • PublisonPublison Posts: 12,366
    edited 2014-06-25 10:21
    No, I just have to remember "which" of my 6 computers I saved it to. :)
  • GenetixGenetix Posts: 1,754
    edited 2014-06-25 12:06
    This might seem like a stupid question but why build a Sigma-Delta circuit when you can just add an ADC chip like the 3208.
    My guess would be that its economical (board space and cost) if the same thing was always being measured.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2014-06-25 12:24
    Why?
    A. To learn actually how an ADC really works by coding the software
    B. To save costs. ADC chips are an added expense.
    C. To save space. ADC chips might take up more board space.
  • PublisonPublison Posts: 12,366
    edited 2014-06-25 12:38
    Genetix wrote: »
    This might seem like a stupid question but why build a Sigma-Delta circuit when you can just add an ADC chip like the 3208.
    My guess would be that its economical (board space and cost) if the same thing was always being measured.

    I guess because it could be done with 4- 0605 components. Cost.

    EDIT: And space as Loppy pointed out.
  • ChrisGaddChrisGadd Posts: 310
    edited 2014-06-25 12:42
    The close component placement is really only necessary if you're using the built in counters to perform the sampling, which might be toggling the feedback pin every 12.5ns. If you can accept a slower sample rate, even components plugged into a breadboard can give steady readings.
    Here's a Spin-based sigma-delta routine that takes an 8-bit sample in about 7ms.
    PUB ADC : count                                                                 
      repeat 256 + 21
        count += !outa[Feedback_pin] := !ina[Input_pin]
      count -= 21                                                                        ' correction factor, adjust to get 0 at min input
      count #>= 0
      outa[Feedback_pin]~
    

    And a PASM-based version that's steady at 512us per 8-bit sample
    VAR
      word  ADC_value
      byte  pins[2]
    
    PUB Main
      pins[0] := Input_pin
      pins[1] := Feedback_pin
      cognew(@Sigma_Delta_Init, @ADC_value)
    
    DAT                     org
    Sigma_Delta_Init
                            mov       t1,par
                            mov       ADC_address,t1
                            add       t1,#2
                            rdbyte    t2,t1
                            mov       Input_mask,#1
                            shl       Input_mask,t2
                            add       t1,#1
                            rdbyte    t2,t1
                            mov       Feedback_mask,#1
                            shl       Feedback_mask,t2
                            or        dira,Feedback_mask
    Sigma_Delta_Reset
                            andn      outa,Feedback_mask
                            mov       ADC_count,#0
                            mov       Sample_count,#256
                            mov       cnt,Delay
                            add       cnt,cnt
    :Loop
                            waitcnt   cnt,Delay
                            test      Input_mask,ina              wc
                            muxnc     outa,Feedback_mask
              if_c          add       ADC_count,#1
                            djnz      Sample_count,#:loop
                            wrword    ADC_count,ADC_address
                            jmp       #Sigma_Delta_Reset
    
    '----------------------------------------------------------------------------------------------------------------------
    Delay                   long      _xinfreq * 16 / 500_000                       ' Starts getting erratic above 500KHz
                                                                                    ' ~512us for an 8-bit sample at 500KHz
    Input_mask              res       1
    Feedback_mask           res       1
    ADC_count               res       1
    Sample_count            res       1
    ADC_address             res       1
    t1                      res       1
    t2                      res       1
    
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-06-25 13:12
    Genetix wrote:
    ... why build a Sigma-Delta circuit when you can just add an ADC chip like the 3208. ...
    Aside from the space and cost savings, a sigma-delta circuit gives you ultimate flexibility over things like input range, and also precision, which is totally under software control and can be changed dynamically. Moreover, there are ways, using additional counters, to do things like quadrature RF detection and demodulation, which would be beyond the capabilities of a run-of-the-mill ADC. Properly connected and programmed, the counters are a marvelous analog resource!

    -Phil
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-25 13:54
    Why?
    A. To learn actually how an ADC really works by coding the software
    B. To save costs. ADC chips are an added expense.
    C. To save space. ADC chips might take up more board space.
    D. Flexibility (As Phil points out in post #28 (Input range, resolution, etc))
    E. Component delivery time. For some places in the world not needing to hunt a reasonable ADC chip in the shops to get it delivered is an advantage.

    F. All of the above :-)

    Alex
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2014-06-25 14:00
    ChrisGadd wrote: »
    The close component placement is really only necessary if you're using the built in counters to perform the sampling, which might be toggling the feedback pin every 12.5ns. If you can accept a slower sample rate, even components plugged into a breadboard can give steady readings.
    Here's a Spin-based sigma-delta routine that takes an 8-bit sample in about 7ms.
    ...

    And a PASM-based version that's steady at 512us per 8-bit sample
    ...

    Good, I'm starting to see the light. If the "natural" sigma delta fails maybe I'll try this one.

    I'm only needing to calculate the temperature of a thermistor that will slowly change (max 6°/sec) so that could be a winning solution, thanks!

    Alex
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-06-25 14:34
    The input is a summing junction held at a constant potential, so it sums input currents. There is a lot of flexibility in that, to measure devices such as photodiodes that produce a current or a piezo element that produces a charge or a thermistor that produces a resistance. Measuring voltage is just one narrow application that seems to get most of the attention. A resistor convert the voltage to a current. The converter is fast enough to convert audio or time slices of rapidly changing signals. It can integrate pulses to find the area under the curve, rather than having to take a bunch of discrete samples and sum. Or it can take long averages synchronized to the power line frequency to minimize the effect of that noise source in sensitive measurements. Multiple signals and offsets and calibration values can be summed at the summing junction. Yes, lots of flexibility to the Prop 1 counter implementation, a DIY ADC kit. It does have limitations though, drift being one of them when it comes to DC measurements such as a thermistor.
Sign In or Register to comment.