Digital counter from ebay - basic questions

Discussion in 'General Electronics Chat' started by knightfork, Jul 19, 2015.

  1. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    Update: earlier issue is resolved (single AA battery will power the LCD continuously for years, so no need to rig up a switch solution to power down).

    Next issue is whether I can connect a photo interrupter to this counter: post #12 has details.

    --------------------------------------------------------------------------------------
    Picked up a digital counter with microswitch from ebay (link here). It has PAUSE and RESET buttons, but no obvious way to power off the LCD. Instructions are in Chinese and posted below on the off chance that someone here can read it.

    Interestingly, I removed the AA battery and the counter still works. So I assume there must be a flat coin style battery on the front side of the board, though the product description only mentions the single AA battery. Anyone familiar with these inexpensive counters? What does the second set of input leads do? Just for a second micro switch?

    Anyway, my questions are:
    1. Is there any way to power the counter down to conserve the battery?
    2. If no built-in power off, is there an easy way to rig one up?

    [​IMG]
    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
    Last edited: Jul 19, 2015
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,503
    2,367
    One drawing shows that the two inputs are for NPN or PNP on each side if using a SS switch.
    Does the display go off after being inactive for some time and a trigger brings it back?
    Max.
     
    knightfork likes this.
  3. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Not uncommon for a super-low-cost module like this not to have an on/off switch. The odds of another battery are just about zero, but an electrolytic capacitor could hold up the counter contents during a battery change. As Max asked, how long does it run with no AA cell? For power control, notch the battery cover to let in 2 wires, and attach them to an external battery and switch.

    ak
     
    knightfork likes this.
  4. ericgibbs

    Senior Member

    Jan 29, 2010
    2,499
    380
    I agree with Max ref the NPN and NPN inputs.

    Have you tried switching Off the LCD by pressing Pause twice in succession say 0.5Sec gap between presses.??

    E
     
  5. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    I'm a newb to circuits. What does NPN and PNP mean? Do the two inputs use different kinds of switches?

    I'm not noticing any auto power down; it's been on for > 12 hours.

    Once the AA battery is removed, hitting the Pause button to put the counter into pause mode also causes the display to fade out. Hitting Pause again to resume counting also powers the display back on. With the AA battery in place, the Pause button just stops and restarts counting, with no effect on the display itself.

    If this type of digital counter can be expected to run continuously for a few months, then I'm ok with opening up the counter and replacing the battery every few months. Just not something I'd want to have to do every few weeks.
     
  6. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    Yes, I tried that with no luck.
     
  7. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,503
    2,367
    If correct the inputs PNP/NPN are types of open collector transistor circuits, in place of using a mechanical switch as you are doing, in your case you can use a mechanical switch on both sides.
    Max.
     
    knightfork likes this.
  8. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    Seems to run a long time without the AA battery, though the display does power down when the counter is put into Pause mode.

    Maybe something like this? http://www.ebay.com/itm/High-Qualit...697?pt=LH_DefaultDomain_2&hash=item1c51b41d09

    Seems to have built-in switch. Just connect the leads to the battery leads/springs inside the counter?
     
  9. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    If you jumper around one battery location, or find one with only one AA battery in it, you're done.

    ak
     
    knightfork likes this.
  10. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    The battery holders I'm finding for 1 x AA battery don't have a switch. Of course, yanking the battery out of the holder is a simple solution since the holder sits outside of the counter.

    Another option is to take a 2 x AA battery holder with a switch and modify it so the batteries are in parallel instead of series. That should yield a longer runtime as well.
     
  11. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    I have a similar counter module I bought from Radio Shack years ago. A single AA cell lasts for YEARS! No need to turn it off.
     
    knightfork likes this.
  12. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    Perfect, thanks!


    So my next question is . . . can I connect a photo interrupter like this (link) to the counter instead of the microswitch? I'm guessing photo interrupters are typically used to count when the beam is connected. I'd like the opposite - i.e., the default state will be intact beam and I'd want the counter to increment every time the beam is broken.

    [​IMG]
     
    Last edited: Jul 19, 2015
  13. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,503
    2,367
    Yes the photo det is two wire so connect the green to -v and white to +v input.
    They can come in two types, operate on light, operate on dark.
    If you want the opposite for yours, you could invert it with a small mosfet.
    Max.
     
    knightfork likes this.
  14. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    No, it won't. Batteries do not like to be connected directly in parallel. Whichever one has the lower terminal voltage will suck charge out of the other one.


    ak
     
    knightfork likes this.
  15. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    How many years do you want it to run before replacing the battery? It will almost run as long as the shelf life of the battery anyway.

    If you are wanting to power the LED of the optical interrupter from the same battery, that will change things. First off, you will probably need more than one cell to power the LED
     
    knightfork likes this.
  16. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    Yeah, someone mentioned the very long life earlier, so I'm not going to bother with trying to rig an off switch for the counter.

    How many batteries would I need to power the infrared LED?

    There's a spec sheet for it here (link), but it's beyond my understanding.

    I suppose I could use one of those battery holders with a switch (example) to power the LED, but that is going to make wiring up the photo interrupter to the counter more complicated.
     
  17. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,515
    1,246
    Datasheet page 2, Electrical Characteristics for the Input Diode, Vf is the forward voltage, the voltage that develops across the diode when it is conducting (and emitting) normally. It is 1.7 V when the diode current (something you control) is 20 mA. So, 3 V battery minus 1.7V Vf equals 1.3 V across the current limiting resistor. 1.3 V / 20 mA - 65 ohms, so a 68 ohm resistor should be fine.

    The photo transistor has a collector and emitter just like an NPN transistor, and should be connected as in your 4th photo.

    "I suppose I could use one of those battery holders with a switch (example) to power the LED, but that is going to make wiring up the photo interrupter to the counter more complicated."

    No it won't. The photo transistor does not need any external power or ground connections. Use the switch to control power to the LED and you're there in terms of the electronics. The next thing to determine is if your physical placement of the phototransistor keeps it dark enough so that when your LED is off the transistor turns off reliably.

    ak
     
    Last edited: Jul 21, 2015
    knightfork likes this.
  18. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    I had to skim a circuits book so I could understand this. So now that I have some semblance of a clue, let me dive in . . .
    I get it now. So use a 2xAA battery holder with switch (3V) to power the IR LED. Wire the IR LED in series with a 68 ohm resistor to yield ~20 mA through this circuit.

    So it would look like this:
    [​IMG]


    So use the NPN terminal of the counter to connect the photo transistor, with the collector lead to the positive terminal and the emitter lead to the negative terminal.

    OK, so the counter circuit, which is powered by the 1.5V AA battery inside the counter housing, is where the photo transistor goes (i.e., a separate circuit from the circuit the IR LED is in).

    My understanding of how the counter is wired (example using a micro switch, which is what I currently have connected to one of the terminals, as in the earlier pic):
    [​IMG]

    So when the micro switch is depressed and the circuit is closed, the counter increments (the display actually increments after the closed circuit is opened again, i.e., press and release of the micro switch). If I substitute the photo transistor for the micro switch, the circuit will be normally closed (as long as circuit with IR LED is powered), as opposed to the circuit using the micro switch, which is normally open. But the display won't actually increment until the photo transistor is turned off (IR LED is blocked by an object), which is fine for my purposes, since I wish to count the # of times the IR LED is blocked.

    If I'm reading the spec sheet correctly, the max DC current through the photo transistor is 50 mA, so I somewhat arbitrarily chose a resistor of 150 ohms to yield a current of 10 mA.
     
  19. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,503
    2,367
    From the DWG the input will be current limited internally and you can use either input (sink or source) for the PT as long as you use the right polarity.
    Connect the same as you would the LS.
    Max.
     
  20. knightfork

    Thread Starter New Member

    Sep 11, 2013
    23
    0
    LOL, I didn't understand any part of this! Can you break it down in terms a newb can understand?
     
Loading...