Analog cross talk for 64 analog inputs
Wurlitzer
Posts: 237
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.
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.
Comments
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?
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.
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.
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!
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)
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.