Shop OBEX P1 Docs P2 Docs Learn Events
Analog cross talk for 64 analog inputs — Parallax Forums

Analog cross talk for 64 analog inputs

WurlitzerWurlitzer Posts: 237
edited 2014-01-18 20:39 in Propeller 1
I have a series of coils [64] with movable cores which are scanned and presented to PIN 0 for ADC. I have a 64 bit shift register which grounds ONLY 1 COIL at at time while the others float. This grounded coil discharges a cap at a rate determined by the inductive reactance of each coil again one at a time.

For the most part this works very well except the count for the next coil sample is affected too much IMO from by the status of the previous scanned coil

I clear CTRA at the Shift register clock high transition then let the counter count until the input pin has dropped to 1/2 vcc and then capture the value in phsa.

This works perfectly.

HOWEVER, If for example coil #1 has its movable core inserted further thus increasing its inductive reactance, the phsa for coil #1 increases exactly as predicted. But, the count for coil #2 is also increased by about 10 counts.
Some actual numbers:
Coil #1 minimum count = 165 and at the same time Coil #2 minimum count = 77

Now, increasing the inductance of coil #1 and its count is 216 which is great for this application but coil #2's count is 82.

Not a deal breaker but I am looking to create 2 unique set points for each coil and a delta of 5 for an adjacent coil (always the next coil not the previous) is a bit much IMO



This DOES NOT appear to be any problem with code as that is functioning exactly as expected

Referring to the attached schematic, I have a transistor which charges the sample cap during Clock off times and I have tried decreasing its base resistor to 470 with some improvement. I also tried putting a .1mfd in parallel with this resistor again with some improvement. I am reluctant to lower the resistance further and risk damaging the output pin on the prop.

I am tempted to try a MOSFET but before I get my fat meat hooks on a soldering iron and mess up the proto board I would entertain other suggestions. EDIT: Note during Clock off time while charging the Output enable of the shift registers is turned off.
640 x 400 - 82K

Comments

  • skylightskylight Posts: 1,915
    edited 2014-01-18 12:52
    Have you adequate shielding of the cables and seperation of the coils from each other? Perhaps the coils need shielding from each other better?

    Not sure how fast the cores move within the coils but you could be producing AC which is causing magnetic coupling between the coils?
    Also switching the coils "on and off" quickly may be producing spikes?
  • Heater.Heater. Posts: 21,230
    edited 2014-01-18 13:06
    Sounds like your coils are talking to each other.

    You will need more separation between coils.

    Or mu-metal shielding.

    Try orienting the coils at 90 degrees to their immediate neighbours to minimize coupling.
  • WurlitzerWurlitzer Posts: 237
    edited 2014-01-18 15:20
    Thanks guys for responding.

    I put a scope on the analog input pin and I believe I can see the problem. The cap never gets fully recharged to 3.3 vdc and the recharge slumps a little depending on the position of the previous coil's core.

    This reinforces my thought that I need a faster charging rate and I did see an improvement with a lower base resistor and a cap in parallel with that base resistor.

    The coils are about [2.5"] away from each other [they are small with 200 turns on plastic sewing machine bobbin ~~ 1" dia] and moving a screw driver near them does not seem to have any great effect so I don't think this is a magnetic coupling problem.

    The coils are scanned fairly rapidly [.0045 ms] and each coil has a diode in parallel with it to eliminate any spikes or ringing and the scope verified this.

    I'll just bite the bullet and try a MOSFET instead of the transistor hoping that the lower on resistance will give me a quicker charge between coil scans.
  • skylightskylight Posts: 1,915
    edited 2014-01-18 18:42
    Sounds like you are on the right track, and hope my thoughts didn't side track you.

    Your project sounds fascinating and ingenious, I wonder what the resolution of movement by the cores is, registered by the propeller?
    Would be great to see the completed project's use if you disclose it here

    Good luck!
  • jmgjmg Posts: 15,173
    edited 2014-01-18 18:42
    Wurlitzer wrote: »
    This reinforces my thought that I need a faster charging rate and I did see an improvement with a lower base resistor and a cap in parallel with that base resistor.

    The coils are about [2.5"] away from each other [they are small with 200 turns on plastic sewing machine bobbin ~~ 1" dia] and moving a screw driver near them does not seem to have any great effect so I don't think this is a magnetic coupling problem.

    The coils are scanned fairly rapidly [.0045 ms] and each coil has a diode in parallel with it to eliminate any spikes or ringing and the scope verified this.

    I'll just bite the bullet and try a MOSFET instead of the transistor hoping that the lower on resistance will give me a quicker charge between coil scans.

    You could flip to a P-Channel Logic Level -FET (invert the flyback gate drive) and change the Cap to be D-S on the fet, so the charge time current is in a tight loop.

    Increase of the Flyback drive time, will give the cap more time to settle, and also try different types of cap - some dielectrics are worse than others at memory effect.

    To ensure you avoid lateral current effects, make the flyback diodes, Schottky, or connect them to a low voltage regulator bias point (+300-400mV)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2014-01-18 20:39
    The p-channel logic mosfet would be good, or you could alternatively flip over to a PNP transistor, emitter to +3.3, and collector to the top of the capacitor, and base via the 470Ω resistor to the prop output. It is also a good idea to include a 1k resistor from base to emitter. Then bringing the prop pin low charges the capactor. As it is, the circuit is an emitter follower and it will not charge the capacitor all the way up to +3.3V, rather, it will take forever to do so once the capacitor charges up to 0.6V below the base.

    I'm reading between the lines on your schematic in post #1. The coil is not shown, and I surmise that it is in series between the diode D1 and the common point. Is that wrong? Also that each common point goes to a shift register pin that activates one coil at a time. What is your reason for including the diode D1? Where is the coil protection diode you mentioned?

    About the memory effect jmg mentioned. It is best to use a plastic (mylar, poly-xxx) dielectric capacitor. Or an NPO ceramic. High K ceramics tend to have a relatively large memory effect, also called soakage, and they make poor sampling capacitors. I doubt that is a factor in your system, but it is something to be aware of.
Sign In or Register to comment.