Ball park coin resistance - Page 1
Forum section: electronics / beginners

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 08:43:34 am
content: Soo.. I thought I'd build a circuit that could tell the difference between different coins by measuring the resistance across the diameter. The problem is I have no idea how low the resistance of a coin is and I have no tools that can measure that low. I need at least some ballpark value to work from... any tips?My idea for the circuit is something like this:http://electronics-diy.com/electronic_schematic.php?id=951hooked up to an arduino for processing. The input reads between 0 and 5 volts and gives out a value of 0 to 1023.. so ideally I'd get around 5/1024 = 0.005 V per unit of resolution. Which by the circuit should translate to 0.005 ohms. And it should work in the range from 0.005 ohms up to around 2 ohms.Is the range even close to how low a coin's resistance would be? Would the resolution be enough to tell a difference between two coins .. at least with a large difference in size? Would such a circuit even work? ^^; Obviously I have very little idea what I'm doing so any advice would be appreciated.

author: Rerouter
author_rank: Super Contributor
timestamp: March 17, 2013, 08:47:51 am
content: the big problem your going to face is oxidisation which is common on almost ever coin in circulation, i believe some other people measured it with variable reluctance, pumping a voltage into an inductor using the coin as a core and measuring the time to saturation of something like that, as a metal core will alter the inductors value,

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 08:49:38 am
content: yes it will never work for resistance, the difference will be so small between coins that you will need very very clever circuitry and the coins will vary considerably with oxidization so it just won't work, You much devise a method that uses physical measurement of the diameter.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 08:53:55 am
content: Aww.. yeah I figured it wouldn't be that easy. So how would you go about measuring the size in that case? I couldn't think of a simple solution. Maybe hooking up a webcam of some sort... I don't think arduino has enough memory to process that tho.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 08:56:37 am
content: I'm not sure what level of design your looking to do but I know a programmer guy that made a karaoke machine that had two money slots so that people could vote for and against the singer with money (value) he bought the money slots as premade working units and interfaced them to a PC (later swapped for a PI)

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:01:32 am
content: Yeah I'm a programmer guy as well. I was looking for a way to get into electronics and I have a "coin problem" at home. They just keep piling up and I never spend them. The idea was to sort and count their value.So while buying a pre-made sorter would work I wanted to build something... preferably simple. Can't really think of a good way to do it tho :/

author: Rerouter
author_rank: Super Contributor
timestamp: March 17, 2013, 09:01:50 am
content: http://www.electro-tech-online.com/general-electronics-chat/122622-coin-recognition-project.html

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 09:04:28 am
content: sounds like you want to do a lot of work for a simple task. Recognising value is one thing, actually sorting them out is another and that is easily done mechanically although I'm sure a simple mechanism could be devised to shift the coins into a different container based on value but really it's a complex solution to a simple problem.

author: ecat
author_rank: Frequent Contributor
timestamp: March 17, 2013, 09:05:05 am
content: Check youtube for 'coin sorter', they are mostly mechanical but may give you some ideas.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:14:05 am
content: @Rerouter, @ecat - thanks, I'll check those out!@Simon - I suppose I could sort them mechanically and count their value after that, but that requires quite precise mechanisms. I never really gave mechanical sorting much thought because of that.. I'll have a look. The solution might look complex but it's more fun this way

author: kripton2035
author_rank: Super Contributor
timestamp: March 17, 2013, 09:20:03 am
content: it's already done and not expensive.https://www.sparkfun.com/products/11719

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:51:51 am
content: Thanks, but I'm not really looking for pre-made stuff. The main objective is to learn something and hopefully make something useful in the process.Now this looks interesting:The mechanical parts wouldn't need much precision and it seems easy enough to build. Also unlike mechanical sorting it makes it possible to program in as many coin types as necessary. I think I'll try this out.Thanks a lot everyone~

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 02:27:08 pm
content: your missing the point, that does not sort them, it only identifies them, to sort then you will still need a mechanical mechanism to send them to different compartments, so you can achieve identification AND sorting in one mechanical operation anyhow.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 04:28:15 pm
content: Sorting them once identified is trivial. I can think of 5+ ways on the spot. Identifying them is the hard part.Mechanical sorting requires a lot of precision. I would probably need custom parts made of plastic / metal as it's hard to achieve it with wood, tho not impossible. The "debugging" would consist of a lot of stuck coins and re-making of the thing. It just requires so much effort. And (depending on the design) it has so many ways to fail. It's analog. It can only support coins with predefined sizes and parts made for them. But above all - there are no electronics involved :/ I just want to build something. Just got my hands on my first arduino.. Of course this would provide the fastest sorting time / efficiency possible but this is for fun and I don't really care.On the other hand if the coin can be identified by measuring it's properties (weight, size, resistance or w/e) this guarantees support for almost any coin and the modular design makes for easy debugging. The identification process doesn't care about the sorting and vice versa. The identification or sorting process can always be easily removed and replaced with a better one if needed.Not sure - maybe I'm too much of a software guy to understand, but this makes way more sense to me.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 04:32:02 pm
content: oh I see your getting an arduino and now want a cool project for itplease understand that programming an arduino is one thing electronics is another, and I KNOW, I've had enough stupid questions from people on ebay who have bought an arduino and are now trying to connect it to the real world and have no clue to conclude that the arduino is the biggest curse to electronics.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 04:56:10 pm
content: Gee, sorry for the stupid questions, but you do realize this is the beginners subforum, right? Not sure why you would call it a curse in the electronics world. Apart from generating a bunch of newbies that have no idea what they're doing it's just another micro.Now I've ran into another problem - the eddy-current "slowdown" requires quite strong magnets. And the local 1 and 2 cent equivalents here contain mainly iron soo.. they would get stuck.Still looking into simple ways to measure any of the coins' properties tho I might just have to give up and do it mechanically. Or exclude the 1/2 cent coins from the whole process.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 04:59:00 pm
content: There is no simple solution i fear, your asking a machine to identify something that was originally made for people to distinguish between.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 05:01:11 pm
content: I know - that's why it's fun.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 05:23:45 pm
content: Quote from: toster on March 17, 2013, 04:56:10 pmLike i said, it won't be simple, its the sort of problem that goes beyond electronics

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 06:12:28 pm
content: Well the solution with eddy currents is very simple and works with most coins. It's just two phototranzistors + something to keep time. Afaik no euro or american coins can be magnetized. So it's pretty much a local problem here.The resistance measurement idea was simple as well. The oxidation could be pierced. The current could be increased for more precise measurements. I'm not giving up on that yet! Also I still don't know any ballpark values so I have no idea just how low would I have to go.I'm still in the middle of exploring what Rerouter pointed out so no comments on that.And finally while the idea of mechanical sorting by coin size is very simple, the construction of such a device is not. It would require less effort to hook up a webcam to a pc with pattern recognition software and output the results via serial than building a mechanical sorter.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 06:22:36 pm
content: last time i looked at my coin sorter the very complex mechanism that determined which coin is which is a disk with holes in it to capture the correct coin and dump it in the right place

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 06:33:32 pm
content: good one.You're right, simple was not the correct word to describe what I wanted.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 06:42:42 pm
content: oh you finally twigged ?%-B

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 06:54:14 pm
content: Yeah, yeah."Let us discuss elegant and very complex solutions to a very simple problem so that it can be solved under as many circumstances as possible." There. I said it. Err.. wrote it.Guess I'll go and try out the two methods above and see if it works.

author: 4to20Milliamps
author_rank: Regular Contributor
timestamp: March 17, 2013, 07:24:35 pm
content: Why not measure their diameter with a camera.Sounds like a pretty good arduino project to me.and probably simpler than this:http://www.google.com/patents/US20060151284

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 07:53:51 pm
content: Yeah - I thought it was a great idea too. But it turns out to be more complicated than it sounds.First off arduino can't act as an USB host by itself - so a webcam doesn't work out of the box.Even if I rip the webcam apart and connect directly to the device, the arduino doesn't have enough mem to store the image.It's impossible to analyze the data as it flows by, the arduino is too slow to even read the data real-time.This means saving it to some other device, then loading and processing...So yeah. Need something more powerful than an arduino for that.

author: 4to20Milliamps
author_rank: Regular Contributor
timestamp: March 17, 2013, 08:12:18 pm
content: Quote from: toster on March 17, 2013, 07:53:51 pmI don't think the arduino is the problem:http://www.arducam.com/tag/arduino-camera-shield/http://nootropicdesign.com/projectlab/2011/03/20/arduino-computer-vision/

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 08:46:17 pm
content: Oh, they actually have a shield...The arduino still can't load that much info but they've taken care of the pain of saving that all to an SD card."Due to the speed limitation of AVR series MCU, and all the Read and Write access to LCD GRAM is emulated by IO operation, saving a 320×240 RGB555 BMP into SD/TF card will take up 10 seconds."So.. 10 seconds to save the image to SD. And after that I have to read it in w/ the arduino. And then process it without reading the whole thing. Just driving the file pointer around and reading it byte by byte.I suppose it could work but that's like 30 seconds per coin or sth :/Hum.. the other link looks promising. /me reads.

author: Chet T16
author_rank: Frequent Contributor
timestamp: March 17, 2013, 08:46:41 pm
content: I've a counting money box here all all it does is measure the diameter of any coin put in with a sliding arm mechanism.

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:03:20 pm
content: Hum.. could you explain it in more detail? How do you go about measuring the diameter?

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 09:10:32 pm
content: Like i said it will have a disk or arm with holes in it for each coin to slip into, it will then be carried to the correct sorting section

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:19:46 pm
content: Yeah I thought so too but he did say "measurethe diameter ofany coin". Hope. It's still not dead.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 09:24:54 pm
content: I think he meant any withing the context of his own currency,You could have something along the lnes of a slider pot that moves based on the diameter of a coin, motor "crushes" coild between two surfaces and when it stops the resistance is taken

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:33:53 pm
content: Yep. That would work. But I still don't know neither the range the resistance could be in nor the resolution I'd need. This discussion has gone a long way off the original question

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 09:39:09 pm
content: not really, you want to reinvent the wheel and we are trying to help, at the end of the day unless you use something like the sparkfun unit you have a lot of mechanics to come up with, never mind the electronics

author: toster
author_rank: Contributor
timestamp: March 17, 2013, 09:45:49 pm
content: As I said - I don't mind doing that and your help is highly appreciated.

author: JoeyP
author_rank: Frequent Contributor
timestamp: March 17, 2013, 10:22:54 pm
content: As a learning experience (only), I encourage this exercise. The oxidation issue could be somewhat mitigated by using kelvin clamps. Google "4-terminal resistance measurement" for more info. The problem though, is that the resistance will be very very low, so you will need a large constant current source and a very sensitive voltmeter. Because the voltage will be so small, thermocouple effects will come into play as well. As an example, copper vs copper oxide has a Seebeck coefficient of about 1mV/degree. It will be more about the analog circuit design than the processing.

author: Simon
author_rank: Unknown
timestamp: March 17, 2013, 10:33:34 pm
content: I've dabled down there with a current regulator and a very low shunt resistor to mitigate power dissipation, the voltages get so low that expert analogue desgin skills are required.

author: JoeyP
author_rank: Frequent Contributor
timestamp: March 18, 2013, 12:32:59 am
content: Agreed, which is why I encourage it. This is the sort of exercise that helps beginners grow into experts

author: JVR
author_rank: Regular Contributor
timestamp: March 20, 2013, 09:22:36 am
content: Quote from: sleemanj on March 18, 2013, 05:45:19 amBuilt one like this a few years ago, worked epically fine.Other option is a arm connected to a pot, and a weak spring, as the coin goes under the arm, measure the peak resistance of the pot, and you know the diameter.

author: toster
author_rank: Contributor
timestamp: March 20, 2013, 12:47:11 pm
content: Quote from: JVR on March 20, 2013, 09:22:36 amO_ONow that's what I call elegant! I must try this out. Like. Now!My hat's off to you sir!

author: c4757p
author_rank: Super Contributor
timestamp: March 20, 2013, 01:28:09 pm
content: Thanks, JVR, for pointing out the opto solution. I hoped someone would. The camera idea is silly when you can just align one edge of the coin with gravity and use a couple phototransistors to find the edge. I like the pot idea in theory, but it may be hard to find one that is loose enough that it won't just stay put and trap the coins.

author: JVR
author_rank: Regular Contributor
timestamp: March 20, 2013, 02:03:25 pm
content: Quote from: c4757p on March 20, 2013, 01:28:09 pmYeah, it would need a bit of work, bit it would be infinitely more configurable that the opto's. Large slope would help, or even a modded servo to "catch" the coin and push it past the arm.

author: Galaxyrise
author_rank: Frequent Contributor
timestamp: March 23, 2013, 04:50:02 pm
content: Quote from: JVR on March 20, 2013, 02:03:25 pmThere's other complexities too, like the arm will have momentum, and pushing the coin in faster will result in a higher reading.I gravitated towards the optical solution. I had to sleep on it, but I think I came up with how to implement the optical solution such that it can read a very large variety of heights with just a few beams:The idea is to point one of the opto beams vertically and then time when it's broken relative to the horizontal beams. By computing their ratio rather that dealing with absolute times, it shouldn't matter what speed the coins are inserted at. Backspin could still matter if the horizontal window is large enough. It'll be a bit tougher to build to get that vertical beam so it doesn't cause coins to get stuck; either it'll have to go a bit horizontally as well or you'd have to put something clear into the track for it to shine through.

author: Rerouter
author_rank: Super Contributor
timestamp: March 23, 2013, 09:47:04 pm
content: if you want to avoid coins being forced in, use a small vertical shaft, say 2-3 diameters at the coin slot, that way every coin will loose most of its horizontal momentum and run your timing arrangement from the same starting speed,

author: cwalex
author_rank: Frequent Contributor
timestamp: March 24, 2013, 01:42:04 am
content: maybe a way to stop the problem with people pushing the coins in with too much momentum you could arrange the slots inside so that if the coin is moving too fast it will just keep going past the point where it will drop into your measurement section and come out the place where change would normally come out. Then they can have another go at putting the coin in. I'm not good at drawing so I hope my description is easy enough to understand.