A simple counter circuit needed

Discussion in 'The Projects Forum' started by Jacob J, Nov 8, 2011.

  1. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    Hello all

    On my boat I have a bilge pump that automaticly turns on, when there is too much water in the boat. I would like to make or buy (cheap) a device that counts how many times the pump has started. What kind of circuit would you suggest for this?

    /Jacob
     
  2. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    There are a number of ways to do this, it all depends on how much effort you want to put into it.

    Before delving too far into this, a boat, while not technically an automobile, is a large vehicle of sorts and hence this topic may fall under the automotive topic restrictions section of this site found in the TOS: http://www.allaboutcircuits.com/l_tos.html.

    I'll wait for one of the moderators to approve or disapprove this post before proceeding.
     
  3. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    I have found this 12 stage binary counter DIP 16 chip.

    74HCT4040 http://www.nxp.com/documents/data_sheet/74HC_HCT4040.pdf

    If I connect this chips CP (input) to the positive on my bilge pump (with a resistor) so I get down to 4-5volts and then the put a 4,5 volt batterys positive to pin 16 wich is Vcc and ground of the battery to pin 8 wouldnt it work just as simple as that? And then put a push-release button from 4,5 volts onto the MR pin, then I could clear the chip. Then I could put LED's to the first 4 Q's (outputs) and it would then be able to show 15 counts in total?

    I don't know if it is okay to tap onto the positive from the bilge pump like I say. Any comments on that?

    /Jacob

    PS: I am sorry if I posted it in the wrong sections.
     
  4. Georacer

    Moderator

    Nov 25, 2009
    5,142
    1,266
    Boat topics have been discussed before in AAC, in the latest revision of ToS. The thread is open for now.
     
  5. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You might consider adapting an inexpensive pedometer for your project.

    I picked up a few pedometers at a dollar store for $1/each (of course). They are coin battery powered, come with a 5-digit LCD display, and count up by one when a weight pivots and contacts a wire. It's a reasonably simple matter to remove the pivoting weight and extend the connection external to the pedometer.

    Then you would need some sort of current sensing circuit that would close when the pump started, and open when it turned off. You might use something like a reed switch with a good number of turns of magnet wire wrapped around it.

    The nice things about this approach is that it would be cheap, quick, self-powered and already have most of the functionality that you need.
     
  6. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    I think that will work but personally I'd use the 4017 counter, just simply because I wouldn't need to decode the data. It can only count to 10, but surely that's enough? But do you really care how MANY times it comes on, or HOW LONG it runs? You could just wire a clock in parallel so it will only accumulate time while the pump is running.
    Sort of, except that you can't rely on a single resistor. A resistor only drops voltage when passing current, and you can't always predict the current. A resistor divider would be better; two resistors in series, one end at the high voltage and the other end at ground. That way the voltage in the middle is much more limited. Then use the signal from the middle of the two resistors.

    For data signals, you can use 5-50K resistors or even larger. For powering the chip, you'll probably need to stay below 5K to get enough current into the chip.

    But, maybe choose a chip that can tolerate voltages up to 16V or so. Then you don't need to worry about limiting the voltage.

    Oh, and you may need to figure out how the pump is controlled, high side or low side. In other words it might be at 12v when off, and the control closes a path to ground. Or it might be at ground normally and the controller sends it power. You might also need to debounce the switching, as the count may advance with transients that don't really turn the pump on or off.
     
  7. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Thank you Georacer for letting us know the thread is approved and SgtWookie who beat me to suggesting a pedometer (though I only thought of it after seeing you suggest for another project earlier this year).

    If the counter needs to be reset, then a discrete logic solution as the OP provided could work. I'd suggest a CMOS equivalent such as CD4040 which would allow you to operate directly off of 12V instead of dropping down the voltage. As Wayneh stated, if you drop the voltage, you need two resistors to make a voltage divider.

    I agree with Wayneh too that a CD4017 would be easier to read and interpret.

    Per SgtWookie, using a reed switch with magnet wire sounds like the least expensive option for interfacing between the pump and the counter circuit. I know of a current transformer relay, but that runs $30 or more.
     
  8. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    The pedometer approch sounds very simple. I think thats the way I wanna go. I just need to find a cheap one somewhere.

    Can you tell me a little more about a reed switch. I have read about it and its a switch that closed by a magnetic field. One thing I didnt understand was about the wire around the switch. Would that be the wire of the bilge pump? Is that enough for the switch to close?
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    It would take many turns of wire to produce enough of a field to close the reed switch.

    How much current does your bilge pump use? That will determine what gauge wire will need to be used.

    It would be difficult to wind wire on a reed switch itself. It will be much easier to take something like a Bic pen, chuck it in an electric drill, and just crank on the wire; then trim the pen barrel to suit. If you wanted to get fancy, you could use brass tubing. A drill shank a bit larger than the reed switch body could also be used; you'd have to be careful when removing the coil though.
     
  10. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    The pump uses 1.6Amps when running. The wire around the reed switch is the wire that is connected to the bilge pump right? Wouldnt it be easier to tap into the wire-to-wire connectors, that runs from the bilge pump and up to the battery?
     
  11. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    OK, that's what I needed to know.

    Yes, in series with it.

    If you want to go that way, you could use something like this:
    http://www.radioshack.com/product/index.jsp?productId=2062479
    It's a reed relay switch with a 12v coil.

    The idea is to use the least amount of power from your battery as possible. There will be a minimal amount of loss in the winding around the reed switch, but it won't be terribly significant. However, it might just be more expeditious to use the reed relay with a cap in series to stop the current flow; and use a diode to allow the cap to discharge without energizing the relay again.
     
  12. Jacob J

    Thread Starter Active Member

    Jun 18, 2009
    159
    0
    Okay, I think I will look into the reed relay a bit more and see if that would do the trick. Thank you all very much for the answers!
     
  13. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    Just FYI, you may already own some reed switches. They're used to sense bicycle wheel rotations, for the speedometer, and they're also used to sense door and window openings for home security systems.
     
Loading...