Propeller Inductive Proximity Sensor (from NV March/April) design questions
DogP
Posts: 168
Hey,
I've been wanting to play with inductive proximity sensors for a while, and when I saw this article in Nuts and Volts about using a Prop to do it, it got me excited. So, I'd like to build this, but rather than just building it blindly (just following the steps in the article), I'd like to understand the design, and maybe modify it for my needs. The part I'd really like some clarification/theory on is the size/number of turns of the coil, and the capacitor used (basically how the RLC circuit design affects the properties of the sensor). Of course I understand that they can't waste a bunch of space in a print article explaining everything, but 25 turns wrapped around a AA battery seems arbitrary to me (even though I'm sure it's not).
The main property I'd like to change is the stated 5-10mm range, if possible. I'd like a larger range, but precision isn't very important. Is that possible? I'd imagine scaling this design to a larger coil (and probably changing the capacitor value) would do this for me, but I guess I'd like some pointers from people who are familiar with this kind of thing. I'm imagining something with a coil size somewhere between the one shown in the article and the head of a metal detector (like used to find stuff on the beach). I'd like my range to be somewhere between those as well (a small coil with larger range would of course be preferred, but I assume size and range are closely related).
Sorry if there's an official thread on this article, but I tried searching and couldn't find one. I also couldn't find any good tutorials on this kind of thing. Anyway, I'd appreciate any input you can provide.
Thanks,
Pat
I've been wanting to play with inductive proximity sensors for a while, and when I saw this article in Nuts and Volts about using a Prop to do it, it got me excited. So, I'd like to build this, but rather than just building it blindly (just following the steps in the article), I'd like to understand the design, and maybe modify it for my needs. The part I'd really like some clarification/theory on is the size/number of turns of the coil, and the capacitor used (basically how the RLC circuit design affects the properties of the sensor). Of course I understand that they can't waste a bunch of space in a print article explaining everything, but 25 turns wrapped around a AA battery seems arbitrary to me (even though I'm sure it's not).
The main property I'd like to change is the stated 5-10mm range, if possible. I'd like a larger range, but precision isn't very important. Is that possible? I'd imagine scaling this design to a larger coil (and probably changing the capacitor value) would do this for me, but I guess I'd like some pointers from people who are familiar with this kind of thing. I'm imagining something with a coil size somewhere between the one shown in the article and the head of a metal detector (like used to find stuff on the beach). I'd like my range to be somewhere between those as well (a small coil with larger range would of course be preferred, but I assume size and range are closely related).
Sorry if there's an official thread on this article, but I tried searching and couldn't find one. I also couldn't find any good tutorials on this kind of thing. Anyway, I'd appreciate any input you can provide.
Thanks,
Pat
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
I don't know that this will work, but I think it'd be fun to at least give it a try.
BTW, if you haven't seen the articles, you can preview them here: http://nutsvolts.texterity.com/nutsvolts/200903/?folio=36 and http://nutsvolts.texterity.com/nutsvolts/200904/?folio=32 .
Thanks,
Pat
Use this link to search for inductive sensors on the propeller forum· http://search.parallax.com/
Regards
Gerry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Airspace V - international hangar flying!
www.airspace-v.com/ggadgets for tools & toys
·
Thanks for the interest in the article.
·
The LC combination you choose can vary widely.· What you need to consider is where the resonant frequency of your LC combination is and adjust the program accordingly so that it sweeps the frequency in the appropriate range.
·
Once you determine the Inductor value and the Capacitor value, you can use one of a number of web-sites to determine the calculated frequency... (Alternatively you could just measure it)
·
http://www.deephaven.co.uk/lc.html
·
You can use this Coil calculator that I have attached to find the approximate inductance of a coil based on its geometry. (See attached)... for the particular coil in the article, refer to the "Special Case Multi-Layer where l equals b" coil.
·
Note: The form is not locked, so the "green" fields are the only place you should alter the numbers or formulas unless you find there is an error.· The values given are usually within 5%
·
·
With the values given, the Coil in the article measures about 17uH
·
In this particular circuit, the diode (D1 and D2) in combination with C3 and the I/O pin, add an additional 8pF of loading so the frequency ends up being about 9MHz.· The Sweep frequency in the program goes from 8MHz to 10MHz so it's able to capture the resonant frequency pretty easily with 20 kHz sweep increments.
·
·
As for a large scale metal detector, these coils are really passive and just don't contain that much energy...· They would be good for a pulse induction type metal detector acting as the sensing element.· You would need an additional coil set in the 'NULL field' of the sense coil that you are driving at the sense coils resonant frequency to make them practical.
·
..For sensing metal pin balls they should work fine the way they are, maybe a little bit bigger.· ... A pancake coil or spiral coil would be best for this.· Something like that can be etched on a circuit board though instead of wound.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/7/2009 5:04:08 PM GMT
Thanks,
Pat
Just to confirm any calculations, an oscilloscope is an essential tool when dealing with coils. There are many factors that can contribute to the end design that can't easily be calculated. Sometimes empirical data sampling is the best approach.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Your PCB etched coils are interesting too... I usually etch stuff on flat flex cable since it's more convenient for me (I can just use masking tape to hold it to sheet of paper and send it through my laser printer, then dip in etchant), and on FFC I could probably put it on top of the playfield so I don't lose the range from the thickness of wood (although I'd need to put tape or something to insulate it). Or I guess I could just print contacts for switches that the pinball shorts as it rolls over... but that's not as fun . Is the range on the etched coils equivalent to the hand-wound ones like in the article?
Anyway, I appreciate the help and the great tips. Thanks,
Pat
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
The etched coils were just an example to show you an alternative "repeatable" method for constructing coils.· The coils are experimental for an idea I am toying with.· They were constructed using ExpressPCB and it's pure coincidence that at the end of my April Nuts and Volts article, it has an advertisement for ExpressPCB.
What you’re looking at are center tapped coil with various tap ratios.· The frequency of those coils are much higher (about 50MHz with a 22pf cap) since the largest coil tap only amounts to 5 turns.· That puts the center coils at about 0.5uH which agrees with the formula for a spiral wound inductor since the radius of them is about 0.1875 inches.· Keep in mind that the addition of any metal causes the resonant frequency to shift upwards, effectively lowering the inductance.· (<-- Which has always seemed backwards to me and I have to check and re-check it every time.)· Depending on the type of metal and the proximity of the metal to your coil, the inductance can change by 25% or more.
As the frequency gets higher and/or the inductance becomes smaller, it becomes harder for the electronics to directly determine a subtle inductive change without heterodyning of some kind to create a beat frequency, using a null balance, or simple amplitude detection.· In other words, the 0.5uH coils will be trickier to pick a signal off of then the 17uH coil described in the article.
You might also look at the PE Labs Fundamentals Book (.pdf)··On pages 169 to 171 take a look at the lab "Metal Detection with PLL and POS Detector Modes and an LC Circuit" ... This project was the result of brainstorming to see what I could come up with based on a kit with a set number of components already determined.· In other words I could only use what was already available·in the kit.· The result was a "metal detector" based on using a 3 inch piece of hookup wire as the sense coil and a handful of resistors and caps... everything we needed.· Thanks to Andy for massaging the circuit a little bit and putting the final touches in.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/9/2009 6:11:16 PM GMT
I'm in the DC area, so I definitely won't be bringing a pin w/ me... but I've already got plans to be at CAX again this year (I try to go to CAX or CGE every year). Some of those custom pins are awesome... the Whirlwind with the high power fan is my favorite. I'd like to do that mod to my Whirlwind one of these days. I'm actually thinking of slightly changing my goals on this project... rather than just tracking the pinball throughout the entire playfield, I think I'm going to just track it near the flippers, determine the position/velocity, and make it self-playing. With the relatively small range of the sensors, that seems more logical, plus it's cooler IMO (make it play itself in attract mode, or play against the "computer"). If I do that, and the CAX guys don't mind, I could bring the "kit" and slap it on one of their pins for the show.
Beau: Thanks for that info... that makes sense. I don't mind winding the coils by hand... I built up the design as shown in the article last night and it wasn't too difficult or time consuming. Unfortunately, I think I broke my prop. I need to look into it more, but I couldn't get stuff to work last night, and when I started throwing stuff and yelling at 3AM, I decided it was time to just go to bed and worry about it later.
Not to hijack my own thread, but I'm using the proto boards (the ones that used to be $20, but are now $30... ouch), and it seems that if I do CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 it doesn't work, but removing that makes it work (which runs RCFAST IIRC). The programs load fine, and I tested it with the standard blinking LED demo without that statement and it works, but with the statement it doesn't. I was playing with some other code several weeks ago, and the same sort of thing happened to my other prop board. It loads just fine, but just won't run. Being resourceful like I am, I made my own USB programmer cable with a FTDI board I already had laying around (MM232R)... now I'm suspicious that I'm frying my props with that (both stopped working on a re-program). Well, I guess I'll take advantage of the cheap Prop chips and replace them, and while I'm at it, stop being cheap and just buy a Prop Plug .
Pat
Anyway, after playing some more, I decided to try tweaking some of the code, and it seems like changing the value "cycles" from 3300 to something larger seems to help sensitivity. Does this make sense? Changing it from 3300 to 330000 seems to double the detection range. Is there any reason I shouldn't change that, and how could I figure out what the optimal number would be? It seems like there's a maximum number, because when I go too high I lose sensitivity.
Thanks,
Pat
The value for cycles basically indicates how many times the Sigma Delta ADC goes through it's loop before returning a value. A 12-Bit ADC would typically use a value of 4095 for this value with a returned value of 0 for 0V and 4095 for 3.3V, and then you have to scale the number to figure out what the actual voltage is... Why not save a step and change the value of cycles to 3300? That way a returned value of 0 would represent 0V while a returned value of 3300 would represent 3.3V .... that's all this number means.
The value of 3300 is a way to scale the sigma delta ADC into an approximate "more human readable" voltage level. 3300 would indicate a voltage from 0V to 3.3V with mV (just under full scale 12-Bit resolution) to represent the value. By using 330000 the output would indicate a voltage from 0V to 3.3V with nV (just under full scale 19-Bit resolution) to represent the value, but I would imagine there is enough noise, that your numbers are jumping all over the place. As far as a number that's too high, I think that it's technically 16-Bit, but I'm not positive. The Sigma Delta ADC needs some bit overhead to work properly, but I'm not sure what that is exactly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/29/2009 6:50:29 AM GMT
BTW, if I wanted to hook up two independent sensors, can I get them to run on seperate cogs, or do I just have to re-Synth() with a pause in a loop (like in the differential sensor code)?
Thanks,
Pat
Take a look at "Inductive Proximity Sensor Part2.Spin"... You don't need a separate cog, but because of the nature of coils, it is best to sample each coil one at a time to avoid any parasitic coupling effects.
http://obex.parallax.com/objects/416/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Pat