HI All,
I need some help on building an all-in-one coin timer/electric/gas meter.
The first thing I have to learn is how to use/read pulse outputs using a pic.
----------------------------------------------------------------------------------------------------
Background:
Currently I have 3 coin operated meters.
1. An old mechanical pound operated meter. Like this **broken link removed**
2. A new digital £1/20p timer that is hooked up to the central heating thermostat to charge for heating.
3. An old mechanical 10p timer that got jammed so I rigged some electronics to it making it digital (4060 14 bit binary counter) which is hooked to a solenoid to charge for hot water.
I also have plans to add to that a washing machine timer and perhaps a gas meter.
For the electric and gas I will use units that give out pulses (1000 pulse per kilowatt) but will deal with this at a later date as I believe it to be more complicated than the other parts I have to tackle. With the electric I have to record how much money has been deposited (say £2) then when 1000pulses has been received I have to deduct £0.15.
So that's a grand total of 3 timers (that may have to work simultaneously) and 2 meters (count pulses and add/deduct credit)
Is it possible to do all that with a single pic?
------------------------------------------------------------------------------------------------------------------
The coin verifier I have uses a pulse output when it recognises a coin. You can set the output from 1 to 50 pulses over 20ms, 50ms or 100ms. (Im guessing slower is better for accuracy?)
**broken link removed**
Coins used and pulses I have assigned to them
£1= pulses 1
5p = pulses 5
10p = pulses 10
20p = pulses 20
I don’t really know much about pics and programming (beginner) but I can hook one and up and flash it.
I want my system to be accurate - when a £1 goes it registers as that and nothing else, so how should I set my pulses to output?
How good are pics at reading pulses? - for example if I set my pulses to output 1p = 1 pulse, 2p = 2 pulses, 5p = 3 pluses 10p= 4 pulses etc. So there is only 1 pulse difference between each coin, could the system not make a mistake and only say read 3 pulses instead of 4 giving an incorrect reading?
Would it be sensible to space out pulses for example 10 pulses, 20 pulses etc and get the software to detect 9 to 11 pulses = £1.
What I need help with to start off is getting the 2 timers to work with my coin verifier working on a pic16F628A. The rest of the project is for much later.
Thanks.
edit im not sure about the pulse output if it means over 100ms or 100ms is the length of the pulse - will hook it up to scope later.
I need some help on building an all-in-one coin timer/electric/gas meter.
The first thing I have to learn is how to use/read pulse outputs using a pic.
----------------------------------------------------------------------------------------------------
Background:
Currently I have 3 coin operated meters.
1. An old mechanical pound operated meter. Like this **broken link removed**
2. A new digital £1/20p timer that is hooked up to the central heating thermostat to charge for heating.
3. An old mechanical 10p timer that got jammed so I rigged some electronics to it making it digital (4060 14 bit binary counter) which is hooked to a solenoid to charge for hot water.
I also have plans to add to that a washing machine timer and perhaps a gas meter.
For the electric and gas I will use units that give out pulses (1000 pulse per kilowatt) but will deal with this at a later date as I believe it to be more complicated than the other parts I have to tackle. With the electric I have to record how much money has been deposited (say £2) then when 1000pulses has been received I have to deduct £0.15.
So that's a grand total of 3 timers (that may have to work simultaneously) and 2 meters (count pulses and add/deduct credit)
Is it possible to do all that with a single pic?
------------------------------------------------------------------------------------------------------------------
The coin verifier I have uses a pulse output when it recognises a coin. You can set the output from 1 to 50 pulses over 20ms, 50ms or 100ms. (Im guessing slower is better for accuracy?)
**broken link removed**
Coins used and pulses I have assigned to them
£1= pulses 1
5p = pulses 5
10p = pulses 10
20p = pulses 20
I don’t really know much about pics and programming (beginner) but I can hook one and up and flash it.
I want my system to be accurate - when a £1 goes it registers as that and nothing else, so how should I set my pulses to output?
How good are pics at reading pulses? - for example if I set my pulses to output 1p = 1 pulse, 2p = 2 pulses, 5p = 3 pluses 10p= 4 pulses etc. So there is only 1 pulse difference between each coin, could the system not make a mistake and only say read 3 pulses instead of 4 giving an incorrect reading?
Would it be sensible to space out pulses for example 10 pulses, 20 pulses etc and get the software to detect 9 to 11 pulses = £1.
What I need help with to start off is getting the 2 timers to work with my coin verifier working on a pic16F628A. The rest of the project is for much later.
Thanks.
edit im not sure about the pulse output if it means over 100ms or 100ms is the length of the pulse - will hook it up to scope later.
Last edited: