Shop OBEX P1 Docs P2 Docs Learn Events
coin detection with hall sensors or others?! — Parallax Forums

coin detection with hall sensors or others?!

steve_bsteve_b Posts: 1,563
edited 2005-01-25 16:48 in General Discussion
Hey guys,

I'm trying to work on a project that would need to be able to detect a coin.· I don't have a magnet available to try, but I'm certain that most coins are not magnetic.·
What I was looking at doing was using a hall sensor and magnet, set at a given distance apart (some sensors already come in this form).· I would then put a coin in the center of this sensor and measure the change in the 'field' given by the hall sensor.·
Would a coin deflect this field much?· Further question, would different coins of different diameters deflect it given their diameters?
Wouldn't the different materials cause more/less deflection than others.
ie: copper pennies over dimes.· there's nickel and other things ALONG with copper in pennies....but there's some silver and other materials in dimes....

I was hoping to do this with a relatively small sensor (hall...) that I could get off the shelf.· A metal detector is somewhat large and bulky (and would require a little bit of hacking to find my tap point) and I'm not sure if I would need to change from ferrous to non-ferrous for different coins.

I'm looking at Canadian coins too smilewinkgrin.gif·so I'm sure our materials are slightly different than the US's.

I've thought about visual checks too, but that's a bit more $$ (CMUcam? or the colour cam?)

Thanks

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·

Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage

"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-13 05:58
    I have not personally worked with hall effect sensors, so I can't directly answer your question. But I have a potential alternative (though its untested). How about having two very light leaf springs that the coin passes through and measure the resistance as it passes? I don't know how much difference different coins resistance is, but it is easily determined with a multimeter. Or another option which I am fairly certain would work, but the circutry is more complex, is a single leaf spring which would charge the coin as it passes and gently press it against a metal plate that has a thin insulating surface on it. You would measure the capacitance of this brief capacitor, the larger the coin, the larger the capacitance. This could be the frequency setting capacitor of a 555 configured as an astable vibrator (oscillator) and you would measure the pulse width of the output to determine which coin it is.

    Paul
  • jhtoolman2000jhtoolman2000 Posts: 9
    edited 2005-01-13 06:16
    how about this--place an led on one side and a photocell or phototransistor on the other side.· You could have the stamp monitor a break in the beam (thus the coin).· I did something similiar to this in an electronics class in college with a stamp.· now you just have to figure out the placement of the sensor and led.

    jon
  • kelvin jameskelvin james Posts: 531
    edited 2005-01-13 07:27
    You should look into an inductive proximity sensor, they are used to detect metal. Pretty sure it will do ferrous and non-ferrous, should work for all coins, but not sure. Think they need a 12v power supply. Jameco sells them. kelvin
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-13 12:13
    Paul:· I've thought about having two contacts on either side of the coin, but since all coins are metal...they're all pretty much less than an ohm when measured.· Further to that, if a coin is dirty or oxidized, it measures differently.· Coin size didn't make a big enough difference between the two.

    jhtooman: I was wondering about having a setup like that.· But, I'm concerned that the transition times wouldn't be distinct enough that I could discern a penny from a dime (both pretty close in diameter).

    Kelvin: I've been looking in to metal detectors and hacking them.· I'm not sure if your 'sensor' is just the coil (I'd hate to have to add the superhet circuitry).



    I used to work in an arcade (dream job smilewinkgrin.gif ) and they used little coin mechanisms that would detect a specific coin of a specific material and size.· I'm pretty sure these were hall effects.

    I'd like the sensor setup to be somewhat small (not tiny/but not huge!)....which is why I'd hate to use a metal detector (8" sensor pad),

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-01-13 15:42
    Having re-worked dozens of arcade machines in the past, I can tell you that the bulk of coin-mechs have a magnet installed which is designed to stop slugs (fake coins) from going through the machine...Most also have a small metal tab which prevents a real coin on a string from being pulled back out.· I believe all the ones I have seen (From approx 15-20 years ago) worked based on the weight of the coin...If the coin got past the magnet, and past the weight sensor (Mechanical) it would drop through a slot tripping a switch.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-13 16:05
    We had those types as well....kind of bronze in colour.

    But the newer ones we had were all encased in a black molding with a spring cover on the front to access coin 'pile-ups'.

    I'm certain that this would just cast out 'false' coins.· We worked on a token basis, so maybe those coins reacted differently.·

    I wish I didn't spend so much time playing Tekken and Tank Wars! haha·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • kelvin jameskelvin james Posts: 531
    edited 2005-01-13 19:31
    Steve
    The prox sensors i am refering to are used in industrial application that detects when a metal part is in in place for a process. A standard size is around 3/8 diameter by 1 inch length.
    The sensing distance for something like copper would be very close, maybe around 1/8 in.
    They just have a 2 wire connector and act like a switch. 12v seems to be the standard, but there others available that use a lower supply if you look around. I added the link to the jameco page so you could have a look.

    kelvin

    [noparse][[/noparse]url]http://www.jameco.com/webapp/wcs/stores/servlet/CategoryDisplay?storeId=10001&catalogId=10001&langId=-1&categoryId=11591
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-13 20:29
    What do you think of using an optical mask?

    Basically, dropping the coins on to a plate that's illuminated on one side and has photo-ops (phototrans) on the other side.

    The problem then is light diffusion/scattering that would blead off on to other phototrans'.· Could use an A/D to compare light strengths maybe....

    Kelvin, I'll check out those coils.

    thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • kb2hapkb2hap Posts: 218
    edited 2005-01-14 02:55
    they are all great ideas but I think I'm going with the weight idea. Most coins have a different weights. and if your dealing with mostly american and some canadian coins I dont think it would be a problem to "sort" coins by weight then when they drop into certain slots it triggers a switch, which would denote the value. the prox is also a very good idea. I'm not sure how much precision you would need to be able to differentiate between the different coins.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    DTQ
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-14 03:46
    I'm think weight myself too.·

    I was looking at the flexiforce sensor from Parallax, but couldn't get an idea what it was rated for.·

    Is it sensitive enough to measure 20-50grams (honestly don't know the real weights).· But the densities of the different coins would be an issue as well, so maybe I won't be able to get away with one particular 'see-all' sensor.

    I think that my 'drive' circuit would have to be tuned nice enough to give me such a small weight.· 0lbs = 0volts....so, a few grams wouldn't give me much of a signal out, which means I'd have to build a 'noiseless' drive circuit and all.

    HAs anyone use differential measurements with the stamp?· I know it's a good way to effectively negate the measured noise...



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • kelvin jameskelvin james Posts: 531
    edited 2005-01-15 07:14
    Sorry about the link thing, i will figure it out eventually. Just for interests sake, here's a thought that might work, i could be wrong, and it definately wouldn't be the first time. If you are considering weight to tell the difference of a type of coin, a accelerometer might work. Since they can measure movement/vibration, in theory a certain coin with a fixed weight falling on a pad monitored by the accelerometer, should send out a measured value that is approximately the same all the time. If a different coin/weight was used, a different value would be measured. Once a range of different values is determined for each coin, then the stamp could do the rest . I guess speed and sensitivity are an issue here, but what from what i have read, it looks like it could work. Just a different angle to look at it, always fun to play around with ideas.
    kelvin
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-15 13:13
    Hmmm....hadn't thought about that.

    Me likes!· I was looking at grabbing the sensor package from parallax (temp/humid; flexisensor; memsic accel) so this will give access to two of the sensors needed.

    A further question then:

    If I send a coin down a chamber and it rattles down the sides, will it give a different 'bounce' value than if a coin fell straight down without rattling?!



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • kelvin jameskelvin james Posts: 531
    edited 2005-01-15 19:49
    I would think that a "controlled velocity" would be important, as speed is a factor of the force of impact. That is why i brought up the sensitivity issue, like how big a range of value would be measured from say a dime to a penny. If the value was quite large, then there would be room to play around with to create a buffer area that could handle some small variances of the speed on impact. So, if the value for a dime was 500, and the value for a penny was 200, then a plus/minus of 100 for each would still give the proper identification for each coin. It says the sensitivity is 1mil/g, so how that relates to real life i don't know, but it looks pretty good. I think you would want to isolate the impact area from the slot chamber, and use something like plastic instead of metal to minimize interferance and give the accelerometer a chance to settle/stabilize before the next measurement. Looks like the the frequency output rate can be set pretty high on these, so it should be able to work at a fair speed. Now how fast the stamp would be able to respond is another question, but if it is only reading and storing a value, and doing some other simple tasks, it should be okay. You probably saw it, Andy put together an in-depth tutorial on using an accelerometer, and would be able to give some more insight on this. By the way, in case you need one with a higher sensitivity, go to the mesmic site and you can get samples, but you won't like the shipping charge. Still, it is cheaper than buying one. And i'll let you know where to send my 5% commission fee. smilewinkgrin.gif

    kelvin
  • Harry StonerHarry Stoner Posts: 54
    edited 2005-01-21 22:02
    Why not just use a commercial coin-mech? Coin drops in, if valid goes one way, if invalid gets rejected and returned. Valid coins trip a micro switch or leaf switch. You just need to read the switch closure. Use coin-mechs for 25 cent denominations are pretty cheap. See ebay. I have a whole box full at home from old arcade machines.

    If your project is a real commercial application, I would think that you should stick with tried and true systems used for several decades. If you use a home cooked design and if there is any impetus for people to beat your system, then they will.

    However if you are doing it for fun, or the people inserting coins are considered trustworthy, then it doesn't matter too much what you do.

    Harry
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-22 03:00
    Steve,

    Just ran across this link www.digitalnemesis.com/products.htm and thought of your project. (scroll down to "Coin Dectector".) You might want to shoot them an email about how they did it.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-22 04:00
    Dunno if that would help him, it looks like it was just a IR beam interruptor, thiers was for a donation box so they probably weren't concerned with slugs.
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-24 01:06
    Thanks for the link Jim...got it ready for my viewing!

    Harry, i used to work in an arcade and know about those coin mechs.· But, I'm not after counting a specific coin and rejecting others.
    I'm not building a commercial project either.

    I have one of those stupid beer bottle coin banks that's full...and I really don't wanna count them!
    So, rather than spend the hour to count them, I'm going to spend a month building something that will do it for me! yeah.gif·· Why?....well....we don't really know! haha

    I've a big project on hold at the moment due to me not wanting to sit in -20degC weather testing it...so in the meantime this is my novelty project.

    Paul: An IR beam would certainly work too....but I need to sort the coins.· The big pain is sorting the coins.·

    I actually mentioned my project to my boss and he said to try using one of parallaxes servo's.· Rig up a little scissor cam that would pick up a coin from edge to edge (flat faced).· Based on the position of the servo you would determine the coin you had.· BUT, now I have to figure out how to track the coin in order for this claw to grab it....so with one idea comes other issues.·

    I've ordered a 'metal detector' kit from Jameco (hope to see it this week) that I'm HOPING I will be able to grab some sort of analog reading from.
    In canadian currency, only the knickle and penny aren't magnetic...but, this doesn't mean the metal detector won't work....but it might give me another way to sort too (use a magnet to leave the knickles and pennies and some simple size slots and triggers to count those).

    Throughout all this, there's also an issue of limiting the number of coins that make their way in to a 'chute' or in to a 'slot' or through a sensor.· I'm thinking of a vibrating table to bounce them along and get them all flat (not sitting on each other)....



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Harry StonerHarry Stoner Posts: 54
    edited 2005-01-25 16:06
    I see what you want now Steve. I would be interested in the general flavour of your solution.

    Not to flog a dead horse, but you could take 3 commercial coin mechs (one for 25c, 10c and 5c) and daisy chain them. Reject path from one feeds into the input of the next. Figure out how to insert a single coin at a time into the top slot. If it's a quarter, it would be accepted by the 25c mech. If 10c it would be rejected by the 25c mech but accepted by the 10c mech, etc. The switches on each mech could be used to count the denominations. Absence of any switch triggers would mean it's a penny or not detected properly.

    Clunky of course but at least it could reduce your problem down to getting a single coin in a slot at a time.

    Harry
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-25 16:48
    Hi Harry,

    I've thought about cascading the mechs....but certainly one coin at a time would have to be dropped....

    If I achieve one coin at a time, then I might just put in size slots with opto's underneath those.· So depending on the size of the coin it would drop through a given hole which would trip my opto and give me a count for that currency.

    Sounds easy...except for controlling the coin chute.· BUT, if I'm able to control the coin chute then I'm thinking of getting fancier with how I determine the coin.·

    I'm sure the hard part is controlling single coin drops.· For starters, I'm thinking of using a vibrating table that's on a slight angle.· The vibrating would unstack the coins (hopefully) and allow them to travel down the table to a chute or sensing suite.

    I thought about using a sized gate that the coins would funnel in to (and hopefully stay unstacked) but the size of 2 dimes is close to the size of our toonies ($2 coins) so might obstruct or both fall instead of one coin....

    I'm slowly amassing the parts! cool.gif

    Just got my metal detector kit from Jameco and wanna see if this might be a 'neat' way to determine coin size by flux density or something!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Sign In or Register to comment.