Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Counter circuit used to switch an encoder chip

Status
Not open for further replies.

0RESET0

New Member
Alright, I have been trying to build a circuit that will switch the eight position encoder chip of a single channel transmitter. Since that is about the extent of my technical knowledge of what I need to accomplish, I will tell you what the end result needs to be.

I am an amature pyrotechnician. I have built two basic firing systems in the last three years. The most recent one was a remote system with twelve cues on the receiver. Since my shows keep getting bigger so must my system. So on that premise, I have devised an expandable system.
The remote and receivers that I have purchased only have one channel each and they are all on the same frequency. In order for me to be ale to fire them individually or in groups, I need to be able to set the receivers to specific codes on the decoder chips and have the ability to increment thru the codes on the transmitter's encoder. I have purchased the switches for the receivers so that I have eight positions and 256 possible combinations. I also purchased eight 5v relays to be the switches for the transmitter. I would like these relays to be triggered by a counter of some sort. I also need to be able to know what code the Tx is currently on so a seven segment three digit display is needed. It would also be nice to have eight LEDs so that I have a binary representation of the code. I have already bought a few components and can type up the list if needed. I would be willing to drop all that I have for a better idea. End product should have an up button, a down button, a reset button and a power switch in addition to the display(s). I hope all of this makes sense. Please help me out here, I want to have this done before next July.

Thanks
Sean
 
I'm not sure if I fully understand what you want. Some questions:-

How many states must the counter have? For example, do you want 8 states, ie. the counter counts from 0 to 7?

I gather you want an up/down counter.

Why do you need the relays?
 
hi sean,

The remote and receivers that I have purchased only have one channel each and they are all on the same frequency.

In order for me to be ale to fire them individually or in groups, I need to be able to set the receivers to specific codes on the decoder chips and have the ability to increment thru the codes on the transmitter's encoder.
I have purchased the switches for the receivers so that I have eight positions and 256 possible combinations.

I assume that you set these RX code switches manually, before starting the display?

I also purchased eight 5v relays to be the switches for the transmitter. I would like these relays to be triggered by a counter of some sort.
This part is a 3 to 8 decoder ic with a counter ic.
I suppose the transmitters are powered up and they require an enable to transmit signal.


I also need to be able to know what code the Tx is currently on so a seven segment three digit display is needed.
I assume this displays the decimal value code 0 thru 255 TX.
Is this the display of code value before each Transmission or during each TX, or is it a display of the codes by incrementing thru the
0 to 255 combinations, as pre-check before transmission is started?
In any case, I believe that you will require to have 'stored' at the transmission end, the codes that you have entered at the receiving end,
so that you can compare and display.


It would also be nice to have eight LEDs so that I have a binary representation of the code.
Again, when would you want to display this information and how would you relate it to what you would expect?

End product should have an up button, a down button, a reset button and a power switch in addition to the display(s).
You will require a power supply to suit the various modules. TX and RX end.
 
OK, here it goes again.

Desired Tx function... I need a counter circuit that works on up/down/reset. The output of the counter needs to go into the display, the 3 digit seven segment. Lets just forget the eight LEDs. It also needs to feed the relays that will act as switches on the encoder chip of the Tx. So that when I hit the up button from zero/reset, the three digit display shows 1 and the relay attached to position one of the encoder closes. I will then hit a separate "fire" button that will cause the TX to transmit to all receivers that are set to 1 on their decoder chips. Thus I will increment thru all 256 combinations firing the related receivers in turn.

Rx function is as designed with an eight position dip switch soldered to the decoder chip. I will set these before the show.

Does that make a little more sense?
 
Yes, I see what you want to do.

However, your desire to drive 7 seg displays is a complication (the 8 LEDs are not a problem).

To do this, you need 3 decade counters connected in tandem which will count from 0 to 999 in BCD (binary coded decimal).

But you need to count in binary if you want to use all 256 combinations.

The simplest solution would be to use a microcontroller such as a PIC.

But if you want to do it in hardware, then there are options:-

1. Do you really need a maximum of 256 combinations? Would 100 be sufficient? If so, then all you need is 2 decade counters connected in tandem.

2. If you really need 256, then you would need both a binary counter and a decade counter that count in unison.

This can be done, but it may be a bit complex for your level of knowledge.

You could start with a binary counter initially and then add the decade counter later once you have a prototype working, ie. crawl before you try to walk.

And I don't believe that you need the relays. It ought to be possible to drive the Tx directly from the counter. In order to be sure, I need more info on the Tx.

The up/down also adds complexity, so I suggest you start with an up counter first.

BTW. Some paragraphing would make your posts easier to read.
 
Last edited:
Hi Sean... G'day Len.

I did a rough PC program yesterday, using Visual Basic and the parallel printer port, to check out some of your requirements.

I would suggest that you consider this option.

Construct a small module that houses all the TXR hardware and switching via a laptops parallel port.
It plugs into the 25 way printer connector.

The laptop would be able to display all the 256 code options, the firing order etc..
The laptop keyboard will enable manual control of the module or a pre programmed firing sequence,,
the added advantage would be that the firing order could be saved and simulated.

There are enough output lines on the parallel port to control all the functions.
 
Laptop!!

Eric,
The laptop thing is what I was going to try next. Do you think it would be easier to just go that route first? I do not have a copy of Basic and have limited programming experience in that language, I have programmed measurement machines that borrowed from basic for their language.

If I could connect the Tx to a laptop and do all of the switching of the encoder that way, that would be ideal. Can you give me a little more info on what would be involved in making the connection and possibly help me out with writing the program?

I have a copy of a program that runs in excel that is supposed to interface with a firing system thru the printer port. I think it may use basic macros but I am not sure. If I could use this and have you help me with connecting to the printer port I think I will be in business.

!!This way I would be able to use both the Hi and Lo on the encoder and have millions of combinations!!

Len,
I have an 8 bit binary up down counter and a BCD counter that I was going to try to use in tandem, actually two different circuits feeding off of the same inputs. I was going to have the BCD counter feed the display and then have the binary counter do the switching.

I only have 100 receivers right now but plan on getting another 100 before next July that would necessitate me being able to have all 256 combinations since I will only be grouping a few and will end up needing over 100 cues.

I really like the idea of running things from a computer like suggested by Eric. If he is game I think I will pursue that idea a little further since that is what I planned on doing next.

Thanks for all the help guys.
Sean
 
hi Sean

Attached some information regarding the PC's parallel port, unzip it, let me know if you need any points explaining.

Regarding Visual Basic, IIRC microsoft offer VB5 as a freebie?
 
Last edited:
Good morning Sean & Eric,
The laptop solution sounds good.

What do you mean by :- "This way I would be able to use both the Hi and Lo on the encoder and have millions of combinations"

If it is an 8 bit input, then you only have 256. ??

You wrote:-
"I have an 8 bit binary up down counter and a BCD counter that I was going to try to use in tandem, actually two different circuits feeding off of the same inputs. I was going to have the BCD counter feed the display and then have the binary counter do the switching"

This is essentially what I had in mind. I scribbled out a rough circuit while on the train to Ballarat yesterday.

What counter ICs do you have?

I'm happy to post the circuit for you if you wish, I'll use the ICs that you have in stock if they are suitable.

Then you can consider both options.

How's things in the UK Eric, I heard that you had some rain over there, please send some this way.
 
Len,
The transmitter's encoder chip has 8 bit but the 8 bits can be pulled high or low. In other words I can set position 1 to hi and position 2 to low. I don't know what the actual number is but since you can set each position to either off, high or low, you would get the two sets of 256 from using just high or low but then you get a few thousand more when you start mixing them up.

The Tx and Rx that I am using are sold by MADEINCHINA on EBay. I have bought several things from them in the past. I don't know the part numbers off the top of my head. As for the parts that I have, I will have to compile a list and post it later.

For now I am going to start reading the file that Eric posted.

EDIT: I have read the file that Eric uploaded as well as an article that I got from a Google search. From what I gathered I will not be able to get the thousands of combinations that originally thought but will definitely get the 256. One question I have though is about the 5v that is mentioned. Am I to understand that the 8 output bits will apply a voltage to the pins of the printer port? will I then use the relays that I have? I don't think I want to apply a voltage to the positions of the encoder chip. I definitely like the idea of computer control but I am a total NOOB at it. Can you guys recommend some websites that cover the use of the printer port to control an external device?
 
Last edited:
Sean,
Yes, 8 bits means 2^8 = 256 combinations.

My garage door opener has 12 bits so it has 2^12 = 4096 combinations.

What voltage does the Tx need? ie. is it powered by say a 9 Volt battery?

Do you have a multimeter?

If so, measure the voltage on one of the Tx input pins to the gnd line. Then switch the MM to current, leave the negative probe on the gnd line and measure the current.

These measurements will allow me to determine how to interface it to then computer.
 
hi Sean,
If you download the Visual Basic runtime files from the web [free] and install them,
also copy the two *.dll's in the zip to the Windows/System directory, you will be able to run the parport2.exe program included in my zip.

The program is designed as a port pin test, run it.

In the zip is the VB5 source code, this will give you an insight into controlling the parport.

As you can see there are 12 pins that could be used as outputs and 4 pins as inputs.
There are 4096 combinations from 12 bits.

Hi Len,
Worst summer in this area I can recall, so far this months sunny.
 
Les,
yes I have a multimeter. I am not sure what leads you are telling me to measure the voltage and current on. The TX uses one of the small 12v batteries. Probably like the one in your garage door opener.

Eric,
I downloaded and installed the run time files that you said. I also copied the dll files to the system folder. I also ran the parport2.exe and the program ran. I do not see the source code that you mentioned unless it is in the vbw and vbp files. They will not open.

Like I said, I can put together a circuit if given a schematic but I am at a loss when dealing with the computer side of this. I don't want to come out and ask you to do everything for me, I just need a little more information. It seams like you guys are assuming I know something here. I have read the threads at the bottom of the page that are supposed to be similar and am willing to read anything you guys would suggest. If it means teaching my self to program in VB so be it.

P.S. I think I saw the number of combinations on the encoder/decoder represented as 3^8.
 
Last edited:
0RESET0 said:
Len,
yes I have a multimeter. I am not sure what leads you are telling me to measure the voltage and current on. The TX uses one of the small 12v batteries. Probably like the one in your garage door opener.

P.S. I think I saw the number of combinations on the encoder/decoder represented as 3^8.
Sean,
As I understand it, you have 8 leads that are the code input leads. In my garage door opener, I have 12 leads that go to the DIP switches on which I set the code.

I don't know if you have switches or not, but it does not matter. If you do, then switch one switch to the open position and measure the voltage across it (you won't see any voltage if the switch is closed). Then switch the MM to current and measure the current.

If you don't have switches, then connect the MM across one input as you would connect a switch.

I'll draw a diagram and post it later. A picture is worth a 1000 words.

If the number of combinations was quoted as 3^8, this would imply that it is a 3 state system which seems VERY unlikely. Perhaps it was a misprint.

EDIT. Here are 2 possible arrangements. There are other possibilities, but consider these first and let us know if your system fits one or the other or neither.
 

Attachments

  • Tx 1.png
    Tx 1.png
    128.1 KB · Views: 373
  • Tx 2.png
    Tx 2.png
    109.7 KB · Views: 315
Last edited:
Sean
You will need the Visual Basic program from microsoft if you want to 'run' the source code.. Download it and install it.
You can look thru it using a standard text editor.

When Len's worked out the hardware/logic I'll start you off with a VB program.
 
my own 1000 words

**broken link removed**

Here is a picture of the Tx board. This side of the board has the jumpers for the encoder chip. If you look close you can see that there are three rows of pins. The jumpers are not used in the picture, they are just sitting on one of the right pins. The right row is the High row, the center row is the common row and the left row is the Low row. Measuring the voltage with 1H jumper-ed (A) gives me 8.5v at the start and then it drops to 7.6v the amps at the jumper are 3.5mA. Doing the same with 1L jumper-ed gives me 0.04v and 0.05mA

Just for clarification, leaving 1L jumper ed and all of the positions on the receiver open results in the Rx not responding. Therefore I have three possible combinations for each of the eight positions or 3^8 combinations.
 
Parts

Even though I am now going to a computer controlled system, It would still be interesting if I could get me original idea to work. For any one interested, here are the parts that I originally gathered in order to accomplish the task. Mfg in parenthesis.

Here is what I got from Mouser Electronics
MC14511BDG 3-18V BCD/7-segment Buffer (ON semiconductor)
MC14553BCPG 3-18V 3 digit BCD counter (ON Semiconductor)
74F579PC 8-Bit Bidirectional Binary Counter (Fairchild)
(8)FX2 D3209 5V relay (Axicom)
BA56-12SRWA LED display

If I can get both ideas to work I will just buy another Tx and have two ways of firing the show, manual or automatic.
 
I'll study the photo tomorrow.

I'll also post a circuit for you.

From memory, the 3 digit BCD counter is not an up/down. It only counts up.

The 74F579PC 8-Bit Bidirectional Binary Counter is very fast and is likely to cause you problems. A slower one would be better given your level of experience.
 
It is difficult to see the fine detail in the photo, but it gives me a general idea. So I've drawn the attachment to clarify.

Is there a number on the IC?

I don't understand what you mean by :-

"Measuring the voltage with 1H jumper-ed (A) gives me 8.5v at the start and then it drops to 7.6v the amps at the jumper are 3.5mA"

Do you mean that you measured the voltage with a jumper inserted between 1H & 1C?
What caused the voltage to drop to 7.6V?

You measured a current of 3.5 mA. Was this between 1H and the - battery with the jumper in or out?

You also said :- "Doing the same with 1L jumper-ed gives me 0.04v and 0.05mA"

So I assume you mean you measured the voltage and current at 1L with the jumper inserted between 1L and 1C.

How is the code set in the Rx?

I suggest that you remove the jumper from row 1 and measure the voltage on 1L, 1C & 1H.

Does your Multimeter have a continuity setting?

If so, remove the battery, connect the Negative probe to the - battery spring and see if there is a connection to 1H, 1C and

1L. If it does not have the connectivity function, then use the lowest resistance setting and measure the resistances between these points.

Can you see the tracks on the other side of the PCB? If so, take a photo of it.

Which pins are connected to the IC? ie. the L row, the C row or the H row. I suspect it will be the C row.
 

Attachments

  • Scan1.png
    Scan1.png
    92.5 KB · Views: 251
Last edited:
ljcox said:
It is difficult to see the fine detail in the photo, but it gives me a general idea. So I've drawn the attachment to clarify.

Is there a number on the IC?

There are three numbers on the chip
PT2262 - 1SD38Z - KBCS6
The MFG is PTC


I don't understand what you mean by :-

"Measuring the voltage with 1H jumper-ed (A) gives me 8.5v at the start and then it drops to 7.6v the amps at the jumper are 3.5mA"

Do you mean that you measured the voltage with a jumper inserted between 1H & 1C?
What caused the voltage to drop to 7.6V?

Correct, I had a jumper connecting the two. It started dropping as soon as I measured the voltage. However, I just realized that I wasn't doing it right. I was measuring the voltage with the - probe on the spring and the + probe on the pins. I also didn't get a reading unless I hit the transmit button. So, Here are the readings done the correct way, no jumpers; bat + to L1 = 10.45v, 162mA; bat + to C1 = 8.85v, 2.6mA; to H1 = 9.25v, 0.9mA

I measured the resistance between the - spring and the pins with the battery out. L1 = 0.2 and the other two were open


You measured a current of 3.5 mA. Was this between 1H and the - battery with the jumper in or out?

In, See above.

You also said :- "Doing the same with 1L jumper-ed gives me 0.04v and 0.05mA"

So I assume you mean you measured the voltage and current at 1L with the jumper inserted between 1L and 1C.

How is the code set in the Rx?

It is set by soldering a connection between the pins of the IC and a puddle next to it, there are rows of puddles like the rows of pins on the Tx. I plan to add an eight position DIP switch to allow easy selection.

I suggest that you remove the jumper from row 1 and measure the voltage on 1L, 1C & 1H.

Does your Multimeter have a continuity setting?

If so, remove the battery, connect the Negative probe to the - battery spring and see if there is a connection to 1H, 1C and

1L. If it does not have the connectivity function, then use the lowest resistance setting and measure the resistances between these points.

Can you see the tracks on the other side of the PCB? If so, take a photo of it.

Which pins are connected to the IC? ie. the L row, the C row or the H row. I suspect it will be the C row.

I can't get a picture that is decipherable. It looks like the H row goes to pin 5 on the left side of the IC as seen in your drawing. All of the low pins are obviously connected but I think the connection to the circuit is on the other side of the board, covered by the pins. This PCB has traces on both sides.

I hope that answeres most of the questions. Sorry about the screw up the first time.

P.S. My 12v battery is measuring 10.67v
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top