You are here:

Careers: Physics/i really need help..its killing me...

Advertisement


Question
thanx for the reply i gain my breath again..anyway, the sorter will separate those coins into its specific tube. how sorter do it still on process of studying..if you can help me i will greatly apreciate it..then the counter will display the total amount of each denomination and display also the grandtital.
-------------------------------------------
The text above is a follow-up to ...

-----Question-----
i have this project coin sorter and counter. i'm trying to construct a flow chart but unfortunately i really can't. it slowly killing me...please do help me..and do you know any methodology how to construct a good coin sorter..please...
-----Answer-----
I'll try to help, but can you first remind me in simple terms, what is the basic task you want the "sorter" and "counter" to do? I need to know we work with the same problem.
Daniel

Answer
Okay, I understand you want to design a flow chart for a machine, which is a sorter and a multi-channel counter at the same time.

All right, suppose you have coins of N recognized denominations and everything unrecognized is supposed to be  ejected. Physical details of the recognition are not part of the problem. Here goes the linear part of the flow chart, best if you draw it as you read:

[START]
{(1) Is coin inserted?} No -> go to START, Yes -> proceed to (2.1)
{(2.1) Does coin match recognized type #1?} No -> go to (2.2), Yes -> proceed to (3.1)
[(3.1) Store coin in tube #1], proceed to (4.1)
[(4.1) Increment counter #1, n1=n1+1], proceed to (5.1)
[(5.1) Display new counter #1 status n1], proceed to (6)
[(6) Read states of all N counters (n1,n2,...,nN), read denomination values (w1,w2,...,wN) and calculate sum
T = n1*w1 + n2*w2 + ... + nN*wN], proceed to (7)
[(7) Display total T], go to START

You may have recognized that what I put in {} braces are "test points", where chart forks depending on the result of the test. Boxes in [] square brackets are just procedural steps on one line of events. Words "go to" and "proceed to" represent connecting lines of the flow chart.

If you have N recognized coin denominations, you will have N sets of steps (2)-(5). You can draw another branch as

{(2.2) Does coin match recognized type #2?} No -> go to (2.3), Yes -> proceed to (3.2)
[(3.2) Store coin in tube #2], proceed to (4.2)
[(4.2) Increment counter #2, n2=n2+1], proceed to (5.2)
[(5.2) Display new counter #2 status n2], proceed to (6)

Finished drawing? O.K., now in the same fashion you can draw all branches until #N, which will look

{(2.N) Does coin match recognized type #N?} No -> go to (8), Yes -> proceed to (3.N)
[(3.N) Store coin in tube #N], proceed to (4.N)
[(4.N) Increment counter #N, nN = nN+1 ], proceed to (5.N)
[(5.N) Display new counter #N status nN], proceed to (6)

You can see that all N branches end up in a common point (6), where the grandtotal is calculated. Two things remain to add: what happens if coin is not recognized, and what happens if an operator wants to empty a storage tube. The first is taken care of easily, because we have already prepared an unassigned point (8).

Coin rejection branch:
[(8) coin not recognized, EJECT coin], go to START

Operator emptying tube branches (N branches, each operating a separate tube, i = 1...N):
{(X.i) Tube #i emptied?} No - go to (X), Yes - proceed to (Y.i)
[(Y.i) Zero counter #i, ni=0], proceed to (5.i)

This is it, after the counter is zeroed, step (5) of the particular tube displays the zero and then (6) recalculates the grandtotal.

This chart works with the external event when coin is inserted, and with N events of the type "the i-th tube is emptied". N independent counters ni are involved, one for each tube, and another memory cell is needed to store the momentary grandtotal T. Finally, the denominations of every coin type are stored in N values w1 ... wN. These are set during manufacturing and never changed, unless the Government start making new coin denomination (like a 33.3 cent coin :-)))

I hope I helped, take care!
Daniel

Careers: Physics

All Answers


Answers by Expert:


Ask Experts

Volunteer


Daniel Mazur

Expertise

Questions anyone (teenager, undergrad, graduate, professional) may ask on physics, mathematics or inorganic chemistry. Questions may concern subjects themselves or a possible future career in them, if you need advice on a school or hobby project, or you just came across a question that is beyond your current curriculum. I answer bare textbook problems sometimes, but I reserve the the right to redirect you to Physics-Physics section. The kind of questions I like to answer: I just started having science classes at school and they seem difficult, but I enjoy them. Where do I find more information on this, which is not in textbooks but still comprehensible to me? Just leaving high school, and I feel science is really the thing for me. Can you recommend a school and an undergrad program suitable to my inclinations? I am in my second undergraduate year in Physics. We learned the basics of universe expanding this year, the Hubble constant and all that, but invited speakers that gave talks on astrophysics in our department seemed not to agree with this model at all. Is it of any use at all? I am building a [materials research] experimental device for my masters/doctorate thesis and I have the following problem:... I have tried ..., but it still doesn't work. Where might the problem be?

©2012 About.com, a part of The New York Times Company. All rights reserved.