Maths problem anyone ?...


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Re: Maths problem anyone ?...

    5 cent coin = 1 pulse
    10 cent coin = 2 pulses
    25 cent coin = 5 pulses
    50 cent coin = 10 pulses
    1 dollar = 20 pulses

    Then it is just to count all pulses.. when you get to 20 pulses you have a dollar.. no matter if the person have used small coins quickly after each other or just one and one. Count the pulses and eventually the pulses will stop and then they will make a purshase.

    To get this to work with a coin machine that can only give out 1-50 pulses per coin you can not have a too big difference in value between the smallest coin and the biggest one.

    And for every pulse you pic detect you increase the LCD with 0.05 USD. When the pulses stop you have the total value. Of course you still dont know what coins that was inserted but you do know how much in value they have inserted which would be enough to know before releasing the item.

    Last time I went to the small store on the corner where I live, they did not count coins.. they counted the value of the coins until I had enough for the icecream and cookies.

    Or?

    Join the dark side - we have cookies!!
    Last edited by Jumper; - 12th September 2011 at 14:51.

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: Maths problem anyone ?...

    Can you change the width of the pulses for each coin? This might help you ID the coins.

    Also do you have access to the inner parts of the coin acceptor?
    There must be a coin detect device that triggers the coin recognition and pulse generating sequence.

    Depending on the mechanics can you add a “Coin insert enable” system driven by your PIC?
    This will let the user insert a new coin only after the pulses from the device are received so you will create your own gap between coins.

    Can you elaborate a little more on this part of your machine (coin acceptor) on both aspects mechanical and electronics?
    Does the machine separate and store the coins by type?
    Do you have access to any other information from the coin acceptor that can be used in conjunction with the pulses?

    Nick

  3. #3
    Join Date
    Dec 2004
    Location
    Scarborough UK
    Posts
    77


    Did you find this post helpful? Yes | No

    Default Re: Maths problem anyone ?...

    Nicmus
    No I cant change the pulse widths and the lockout option is unavalable as well, so..
    I think Im going to abandon the idea of counting pulses and try the totalizing method (as Jumper said), i think this just gives me another math problem (floating point) but I remember a post I read a while ago that said you just multiply the sum by 10 (eg %0.3 x 10 = 3) and then divide by 10 again when output is needed, or something like that anyway.
    So, I think the counting pulse idea is dead and I will give the percentage totalizer method a go (prepair for a new message when I fail lol)
    Reading the datasheet & understanding it are two different things.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts