Simple help needed, digital counter circuit

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
Thanks for clicking, I recently started as an EE apprentice in the UK and I hope to become an active member of AAC.

I'm hoping to get information that will help me complete my first project, the problem is a relatively simple circuit design with some added ambition.

There's currently a mechanical counter on the production line at my workplace, every time a product moves over a switch, it pushes the counter up by 1. It's very simple, so that the shift leaders can keep track of how many units are passing that point over the shift.
This counter is old and faulty, so my project is to make a digital counter.
Diagram attached:
digital-counter-diagram.jpg
The 'counter' is obviously the 5 pin unit in the middle of my diagram, which will be mounted in a steel box with buttons.
After reading the diagram supplied with the digital counter, I drew up my own circuit. It seems simple to me but I don't have the knowledge yet to progress.

Problem 1: Resistance.
To get a blue backlight, the counter requires a 9v supply. The counter itself uses 1.3-1.5v supply which is why I decided that resistors are needed.
I decided that a 9v supply could be used, as seen in the diagram. The value of the resistors after my first attempt at the maths came to be 1m and 5m, however I don't know if this is correct, all I know is that the resistance needs to happen before the power reaches pin 2.
Partsim.com helped very little, by confirming that this would give me 1.5v where I need it.
Testing the circuit with these (4 pin) resistors basically shorted my battery in a flat second.
If you can give me a schoolboy lesson on getting this bit right, you will be helping me a great amount.

Problem 2: Transistor.
On the supplied diagram there are transistors (as seen on my diagram) coming from pin 3 and 4 (4 isn't needed).
I'm not sure how to interpret this, so I'm here on AAC to learn how to overcome this lack of knowledge and hope there's somebody who can kick me down the river with this project.

I hope this information is enough!! Please ask me any questions, and all suggestions will be appreciated.
Thanks in advance, Liam.
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
Some additional info about the counter as copied from the information supplied with product:
Model; Trumeter HED 251
Consumption;
Counter - typical 3uA
Backlight - 40mA max


I also wanted to add an LED battery indicator to the circuit. It's important that the operators are aware when the battery will run out, so that they don't lose track of their production half way through a shift. I found one which suited me on ebay, and the typical consumption is 5mA however the LED and blue backlight are ultimately optional.
My main goals are function (which is why I want a backlight) and low cost, because it will be on batteries. I welcome a debate about alternate power supplies!
 

wayneh

Joined Sep 9, 2010
16,114
Sorry, I'm confused. The mechanism that senses the counting is still the same mechanical switch? If so, are we sure that the reliability problem is not with that switch? As for the counter and display - you want to continue using the existing device?

A simple resistor is not a good way to reduce voltage unless the load is absolutely constant and predictable. The resistor drops voltage in proportion to the current flowing through it. If that varies, so does the voltage seen by the load. There are many ways to supply the right voltage to your counter, but a resistor is not a good choice. The data sheet shows using a voltage regulator.

As far as I can tell from a quick read of the counter data sheet, counting (or resetting) is accomplished by a brief grounding the appropriate pin. The pins can be pulled to ground with a mechanical switch or optionally by using a transistor. You probably don't need the transistor, but that depends on your answer to my first question about how you are sensing.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
8,140
At 20 mA, or even 10 mA, a 9 V battery will not last long powering the backlight. Also, you will need an actual regulator rather than just a dropping resistor to power the device through pin 2. There are LDO linear regulators that can do this with very little power consumed by the regulator itself, and will be more efficient than the shunt regulator on the datasheet.

Are you sure you need the backlight? Many such devices use transflective LCD's and are visible with ambient light.

ak
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
Thanks to both for an excellent start.

Wayneh the sensor will be a normally open limit switch on the production line, I will be removing the mechanical system completely to replace with this. Great ideas on reducing the voltage, I'll add some pictures to the thread when I have time this week and hopefully it will close the scope on what I'm trying to achieve. All points taken.
I guess that my limit switch will be enough in the circuit to send a signal, no transistor needed then.

AK, I'm aware of the backlight consumption even though I haven't done the maths, so it will have a push-on switch. The backlight will be used for probably 30 seconds a day if that, it's mainly for cool-points. Also a great opportunity to learn how to manage small voltage power supplies on a small circuit which is surely good to learn asap.
The circuit will have a power on/off switch because it will be off when each shift ends, after the figure is recorded. Switching it off resets the count, which is useful for when the next shift begins (so no need for pin 4 - reset function?).

I'm going to research all points made, especially regulators, thanks.
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
Thanks Rich but I already have the counter, will keep that in mind for the future.

Do I need any other components when ordering my LDO regulator? Capacitors etc?
 

MikeML

Joined Oct 2, 2009
5,444
Consider using a surplus plug-in wall-wart regulated DC output cell phone charger as the power source. My local Thrift Shop has hundreds of them, and will sell them for ~$0.25... (one sixth of the price of coffee)...
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
Thanks MikeML, however coffee is free where I work. I'm in the UK but I will keep the charger in mind - however if my battery powered circuit works then it will be scaled up into a 12v supply from the factory, there may be no need for plug-ins.

At this point I just need opinions on the circuit design itself, and I'd also like to learn how to complete this stage of the project so that next time I'm able to troubleshoot better.
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
OK so my counter is functional, although I'm still not sure of battery life once in use, that will be for another update.

I researched LDO voltage regulators and decided to go for LMS158 1.5v out.

Here's the working diagram, thanks to WayneH and AK for support with that.
digicountfunctionalcircuitdiagram.jpg
Pictures of the unit in use will be posted in my next update, along with notes about how long my battery lasts!
I also forgot to draw the push switch, after the on/off switch for the backlight. The backlight remains off until needed.
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
So the counter is installed, the only problems so far are in the physical design.
The limit switch probably won't stand up for long to the 40kg+ load being pushed over it every 30~secs, although it's ideally placed.
The counter display unit is awkward to open as the Vout wire from the voltage regulator pulls on this pin when trying to access for battery changeout. I soldered it back on when installing the unit but in the future I may just change it out for longer wire.
Thanks again for support with this.
IMG_20151130_083239396.jpg IMG_20151130_083352544.jpg
 

hp1729

Joined Nov 23, 2015
2,304
Thanks for clicking, I recently started as an EE apprentice in the UK and I hope to become an active member of AAC.

I'm hoping to get information that will help me complete my first project, the problem is a relatively simple circuit design with some added ambition.

There's currently a mechanical counter on the production line at my workplace, every time a product moves over a switch, it pushes the counter up by 1. It's very simple, so that the shift leaders can keep track of how many units are passing that point over the shift.
This counter is old and faulty, so my project is to make a digital counter.
Diagram attached:
View attachment 93549
The 'counter' is obviously the 5 pin unit in the middle of my diagram, which will be mounted in a steel box with buttons.
After reading the diagram supplied with the digital counter, I drew up my own circuit. It seems simple to me but I don't have the knowledge yet to progress.

Problem 1: Resistance.
To get a blue backlight, the counter requires a 9v supply. The counter itself uses 1.3-1.5v supply which is why I decided that resistors are needed.
I decided that a 9v supply could be used, as seen in the diagram. The value of the resistors after my first attempt at the maths came to be 1m and 5m, however I don't know if this is correct, all I know is that the resistance needs to happen before the power reaches pin 2.
Partsim.com helped very little, by confirming that this would give me 1.5v where I need it.
Testing the circuit with these (4 pin) resistors basically shorted my battery in a flat second.
If you can give me a schoolboy lesson on getting this bit right, you will be helping me a great amount.

Problem 2: Transistor.
On the supplied diagram there are transistors (as seen on my diagram) coming from pin 3 and 4 (4 isn't needed).
I'm not sure how to interpret this, so I'm here on AAC to learn how to overcome this lack of knowledge and hope there's somebody who can kick me down the river with this project.

I hope this information is enough!! Please ask me any questions, and all suggestions will be appreciated.
Thanks in advance, Liam.
How cheap and simple do you want to get? Down at the "Dollar Store" I can get a pedometer that counts how many steps I take.
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
If I chose to use a pedometer then this thread would have the more complicated title; How do I make a pedometer into something that it wasn't intended for?
I understand the suggestion yet there are many boxes ticked on my design spec for using a more purposeful product such as HED 251. Thanks!

Now I have a completed unit, well under budget, which satisfies my project needs and is easily built into a steel box with armored cable as seen. Management have no concerns, so this project can be considered successful.
 

hp1729

Joined Nov 23, 2015
2,304
If I chose to use a pedometer then this thread would have the more complicated title; How do I make a pedometer into something that it wasn't intended for?
I understand the suggestion yet there are many boxes ticked on my design spec for using a more purposeful product such as HED 251. Thanks!

Now I have a completed unit, well under budget, which satisfies my project needs and is easily built into a steel box with armored cable as seen. Management have no concerns, so this project can be considered successful.
Super!
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
First update on the used counter; and so far the only issue is in the location/switch position. The battery has lasted very well, being the same one used to test and build it.

The mechanical counter is still in place for now to provide a second count, for something to compare against. Unfortunately my digital counter falls behind the mechanical counter by average of 9 units per shift. I've decided that it's because of the placement of the counter - which is a bit off topic but for anybody interested in my configuration; consider placing the limit switch in a straight section of rollers for greater accuracy. Mine sits just after a corner, where there is also a gap in the rollers for workers to walk through. The products can be pushed and shoved at this point so instead of trouble shooting this, I will move the limit switch 100cm further on, to a clear section of rollers where the movement over the switch will be more consistent.

Additionally, I'll form a simple component to replace the wheeled mechanism supplied with the limit switch, closely suited to the shape of the products. This way, the switch will contact the product more accurately and hopefully increase accuracy further.
Anybody got any cool suggestions at this point or tips from experience? This can't be the only production counter we've seen!
 

Thread Starter

Pete Repeat

Joined Oct 26, 2015
15
I agree and that may be a direction I take in the coming weeks, to improve the design from what it is. Thanks for the link.
 
Top