Counter to increment display once for every twenty switch inputs

Discussion in 'The Projects Forum' started by macke, Oct 12, 2014.

  1. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Hi I need help in designing a circuit which increment by 1 for each input received on a digital display and then to increment a second display by 1 for each count of 20. The inputs would be from a manual press to make switch.
    Thanks
    macke
     
  2. panic mode

    Senior Member

    Oct 10, 2011
    1,319
    304
    you need to be more clear... what do you mean be "digital display"? row od LEDs representing binary or BCD value? 7-segment display? how many digits?
    how about second display? how about input signal? what voltage? AC or DC? potential free?
     
  3. Bernard

    AAC Fanatic!

    Aug 7, 2008
    4,170
    395
    Something to start with: A 555 to de bounce switch, 3 ea 4017's 0r 4022's cascaded & some gaiting for a count of 20, or a 4024, 7 stagr binary counter & a 2 input AND to decode stages 4 & 16 to give a count of 20.
     
  4. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Hi the unit will need to be battery operated. The first display would be 7 segment, 4 digit. The second would only require 2 digits. We are using an archeological ground resistivity meter. A reading is taken, manually every metre on a 20 x 20 grid so there would be 20 readings per strip. The switch on the unit is easily accessible so we would merely connect our input to this.
    macke
     
  5. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Welcome to AAC.

    I assume the goal of this is to help the operator keep track of where they are as they take measurements? It is safe to assume you need the circuit to include memory so someone can turn the circuit off, step away to help someone/get lunch/stop for the day, then turn it on again with the last position shown?

    Based on your descriptions, I'd suggest a microcontroller. This allows you to make a much physically smaller circuit with plenty of options. It will require programming, but we can help you with that.

    Because you said this will be battery powered, I suggest staying away from 7-segment displays - they will eat your batteries. Instead, I'd suggest using an LCD instead. In this way, you can also have the display read something like "Row: 2, Column: 15".

    With regards to connecting to an existing switch, we'll need to know the voltage going to the switch and how it is wired to your reader. If the switch happens to have a second set of unused poles or if you can replace it with a DPDT switch, that would be best.
     
  6. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
     
  7. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Hi this sounds very good and hopefully not too expensive. Generally there are plenty of operators, so lunch breaks can be staggered and a grid would be completed without the need for any storage requirements, although it could be a useful feature.. The switch is easily accessible so we should be able to change it for a double pole douple throw one. To have a readout as you describe would be very good. Look forward to hearing further.

    macke
     
  8. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Assuming you're not needing to produce hundreds, I'd suggest doing this with a PICAXE and an I2C LCD. You could save a few bucks interfacing the LCD directly with the PICAXE, but unless you're making mass quantities, an LCD with an I2C module will be easiest.

    What kind of battery power are we talking? Four AA batteries, a 6V lantern battery, etc.? Or will you use a dedicated set of batteries for this circuit? If yes, then we should be able to get away with three AA batteries and avoid a voltage regulator.

    Is there a size limit? The most commonly available (and often least expensive) LCD is 16 characters and two lines, although a 8x2 is possible.

    For the user interface, I'm currently picturing an LCD, a power switch, and a reset button. When power is applied, the LCD will show the last value for row and column recorded. Pressing the reset button will reset the count to zero for both column and row. There will be an input for the switch from the recorder.

    Does this sound about right? Do you need anything else like the ability to change the grid to something other than 20 x 20? This can always be done by changing the program, but I don't know if you'd like the ability to make changes in the field.

    Any other features, functions, or needs?
     
    macke likes this.
  9. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    So you would be happy with a simple count-to-20 device? It sounds like the thing a golfer uses to count strokes on each hole. (I usually wouldn't need to go as high as 20!)

    Would a completely stand-alone device like the golfer's stroke counter work for you?
     
  10. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
     
  11. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Hi it will have its own set of batteries, and yes it does all sound absolutely perfect. It will only be a 1 off so the cheaper too produce the better. Obviously the size should be as small as possible. Don't want a tiny display though.
    macke
     
  12. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    No it needs to count once for each reading taken and the increment one on a second counter for every twenty of the first counter.
    macke
     
  13. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    No good?
    Stroke counter.jpg

    No batteries required.

    Oh, I didn't see your reply in time.
     
  14. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    No because there would always be the possibility to forget to increment the display. They have to press a non latching switch to take the reading, so I would rather use that one switch operation top also incremrnt the display.
    Ken
     
  15. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hmm, wayneh gave me an idea. You could use a couple of cheap pedometers with the PICAXE. One for row and one for column with the PICAXE handling the counting. Wouldn't look as nice as an LCD with text, but it would be cheap. I assume you'll still want to go with the LCD option, but wanted to mention this as an alternative.
     
    absf likes this.
  16. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Hi no I think the LCD option is the way to go.
    macke
     
  17. wayneh

    Expert

    Sep 9, 2010
    12,094
    3,033
    That's the piece I was missing.

    I was going to recommend essentially what Bernard started in #3, but if you want the LCD readout and more flexibility overall, the microprocessor route is the way to go. Tougher for a newbie, though.
     
  18. macke

    Thread Starter Member

    Oct 12, 2014
    65
    2
    Yes it is, I have to agree. Never got into PIC programming. Only ever made analog gadgets for music.
    macke
     
  19. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    I would suggest an Arduino based Microcontroller board, the learning curve on it is not as steep as some others, plus all the libraries for objects such as LCD displays have already been taken cared off so less coding to do to accomplish what you want, basically just buy an arduino uno, arduino nano, etc. or similar board and an arduino LCD shield and you should be on your way to getting this done quicker.
     
  20. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I'll write the program, then macke can modify it however desired.

    Macke, what country are you in?
     
Loading...