Jump to content
Due to a large amount of spamers, accounts will now have to be approved by the Admins so please be patient. ×
IGNORED

Circuit Design Help Needed


Recommended Posts

I designed this circuit for the weapons switches on my Last Starfighter cab, everything worked fine when not connected to the J-Pac but when connected it looks like the pull-up voltage on the J-Pac has caused the 4069 to fry (only a guess but it no longer works even when disconnected from the J-Pac). I've used a second ATX PSU to supply power to the circuit and tied the J-Pac ground to it.

I'll pick up some more 4069 chips tomorrow but need to work out what's going on and how to fix it.

 

Here's the circuit below and the the three outputs need to switch the J-Pac inputs to ground.

 

https://i.imgur.com/ditiHjZ.png

ditiHjZ.png

 

 

So I'm thinking of using an opto coupler or possibly switching the J-Pac to ground via transistors.

 

Any thoughts on what's going on and ways to rectify it?

Link to comment
Share on other sites

I designed this circuit for the weapons switches on my Last Starfighter cab, everything worked fine when not connected to the J-Pac but when connected it looks like the pull-up voltage on the J-Pac has caused the 4069 to fry (only a guess but it no longer works even when disconnected from the J-Pac). I've used a second ATX PSU to supply power to the circuit and tied the J-Pac ground to it.

I'll pick up some more 4069 chips tomorrow but need to work out what's going on and how to fix it.

 

Here's the circuit below and the the three outputs need to switch the J-Pac inputs to ground.

 

So I'm thinking of using an opto coupler or possibly switching the J-Pac to ground via transistors.

 

Any thoughts on what's going on and ways to rectify it?

 

One thing I always do is run transistor/LED/switches parts (The simple parts) in a circuit simulator to see how much and where current flows.

I found http://everycircuit.com/ available on your android device (Tablet is better) to be adequate for this task.

 

You simulate the pullups on the j-pac side as well to see how everything integrates.

Link to comment
Share on other sites

Yeah probably a good idea to decouple the circuits via an opto coupler, then you 100% safe.

 

Cheers mate, would this do the job?

 

https://www.jaycar.com.au/moc3020-moc3021-opto-coupler-ic/p/ZD1920

 

JEP4AII.jpg

 

Based on the datasheet, it needs 1.5v and draws 10mA.

Do I just calculate a dropping resistor as I would for an LED?

1k resistor...

Link to comment
Share on other sites

Cheers mate, would this do the job?

 

https://www.jaycar.com.au/moc3020-moc3021-opto-coupler-ic/p/ZD1920

 

https://i.imgur.com/JEP4AII.jpg

 

Based on the datasheet, it needs 1.5v and draws 10mA.

Do I just calculate a dropping resistor as I would for an LED?

1k resistor...

 

Yep, exactly as you were powering just an LED. As for your 4096, make sure no input ever "floats". Either tie it low or high, low being lower than half the chip's supply voltage or high being higher than half the chip's supply voltage being a CMOS chip.

 

Tied to ground or supply voltage is desired though and this is achieved by linking the input pin via a greater than 100k resistor to the ground or in the case of a high, 100k resistor to the supply voltage. This value of 100k can be as high as 1M if you want virtually no power draw as the input draw on a CMOS chip is so low, the input will still see the voltage.

Link to comment
Share on other sites

In the schematic above I've used 10k resistors to tie each pin high.

I'll grab some opto couplers from Jaycar this afternoon and see how it goes.

 

10k may be a little to low. That resistor, in your case, the 10k, has to stop a potential dead short when you try and drive the input low. Your control wire to the input goes to the input end of the resistor so when it goes low, that resistor is all that stops a short between your switching low and the input being tied high. There will be some power trying to go through the resistor as well as driving the input or at least some of the "tied High" supply bleeding through and nullifying the low signal.

What can happen is this nullifying can keep the input level to high to register as a low.

 

A higher value resistor should prevent this.

Link to comment
Share on other sites

No problems mate, will swap them to 100k.

 

Put your meter on the input pin to check what the high and low level voltages are when the circuit is powered on and it will show you exactly what is going on. Heatshrink a needle to your multimeter probe and now you have a tip that won't slip off the chip's pin when checking.;)

 

The checking with your meter is the best way when you have a collection of resistors or capacitors in the hold up or hold down circuit but it is good practice and is essential if you proceed into electronics using "tri state input devices" where you now have 3 levels, not just high and low levels.

Link to comment
Share on other sites

I've connected one opto coupler into the Laser circuit but it looks like the pull up on the 4069 is causing a small voltage differential that is enough to latch the opto, when the switch is pressed, the opto stays closed.

My simple solution is to add another three opto's and have both circuits acting independently.

I.e. one opto sends the 4069 low and the other sends the J-Pac input low.

 

Something like this...

 

g8KkFgR.png

Link to comment
Share on other sites

What exactly is it you are trying to get the circuit to do. As with all electronic circuits, there is always more than one way to achieve the same result.

 

My go to CMOS chips are the 4093 and the 4066. These two chips can be manipulated to do most tasks. Sure there are others but there isn't much you can't make using these two.

Link to comment
Share on other sites

What exactly is it you are trying to get the circuit to do. As with all electronic circuits, there is always more than one way to achieve the same result.

 

My go to CMOS chips are the 4093 and the 4066. These two chips can be manipulated to do most tasks. Sure there are others but there isn't much you can't make using these two.

 

I have three DPDT illuminated (incandescent) momentary switches.

The lamp it lit by putting 12v across the two common pins.

I need the lamp on switch A to come on when it is pressed, then go out when either switch B or C is pressed and whichever switch (B or C) is pressed then it's light needs to come on and stay lit until either of the other two switches are pressed.

In addition to that function I need the three switches to control three button inputs on a J-Pac at the same time.

 

The three switches are for the weapons select in the Starfighter game and the lamps should indicate which weapon is currently selected/active.

 

Edited by Kaizen
Link to comment
Share on other sites

Your circuit looks a little convoluted, but the obvious issue I can see is the 10K pullups to +12V for the switches will be feeding into the J-Pac. Putting a diode in series with the 3 lines going to the J-Pac (anode towards the J-Pac) will stop that.

 

The other issue is you don't seem to have the required 100n (0.1uF) decoupling capacitor across the power for each IC. Leaving these out can lead to wildly unstable operation and possible damage.

Link to comment
Share on other sites

Your circuit looks a little convoluted, but the obvious issue I can see is the 10K pullups to +12V for the switches will be feeding into the J-Pac. Putting a diode in series with the 3 lines going to the J-Pac (anode towards the J-Pac) will stop that.

 

The other issue is you don't seem to have the required 100n (0.1uF) decoupling capacitor across the power for each IC. Leaving these out can lead to wildly unstable operation and possible damage.

 

Cheers @David_AVD, I'm going to build another PCB and will add them in across all IC's.

When I designed the schematic there was nothing online that I could find to do the job and and I had no experience in circuit design so I followed a few suggestions, added this and tweaked that to get it working without the J-Pac connected.

I have a handful of 12v mini relays on hand and was thinking I could use a pair on each switch to isolate the J-Pac and PCB inputs.

Link to comment
Share on other sites

Only issue was the ground for the output relays needed to come from the ground on the J-Pac.

 

https://drive.google.com/open?id=1rwYG43_iAv6Y4ZqtKzk-4h3gwuxYpFK8

 

I redrew the schematic and laid it out on Vero Board.

It still needs to be double checked for errors.

 

r3bvMVq.jpg

 

Then I got to thinking it would be a waste of time building a new PCB if it didn't work correctly so I just made up a relay board and wired it into the PCB & J-Pac.

The relay pins in the DIY Layout Creator library don't match up with the relays I was using in case anyone is wondering why some of the pins aren't connected.

 

d1b8JD7.jpg

 

Tested and everything works fine, I may make up the new PCB or just be lazy and keep the relay board separate.

 

Qa5uFvt.jpg

 

I had a quick game and scored 151,000.

I don't think Centauri will be knocking on my door any time soon.

 

9slGHqZ.jpg

 

 

Thanks to all who commented for your input.

Link to comment
Share on other sites

Cool, glad you got it working. I think it is possible to use no relays and have the outputs of the flip flops driving the inputs of something like a ULN2003 as seen here...

 

https://www.google.com.au/search?q=uln2003+ic&tbm=isch&source=hp&sa=X&ved=2ahUKEwiQ7o3PwvDhAhVYU30KHd9FCewQsAR6BAgIEAE&biw=1140&bih=718

 

The advantage using these ULN series of chips is you have no relay coil spikes to quench using diodes, you have no driver transistor circuitry needed to drive the coils but each of the chip's outputs can drive lamps, LEDs etc direct.

 

These parts are designed to work directly off other IC outputs so very low current draw.

 

Basically, it cuts the parts required to a minimum as well as speeding the circuit up as relays are regarded as slow in operation not that that is a major consideration in your circuit.

Link to comment
Share on other sites

Thanks for that, I can see it would be a simpler option for the lamps.

The active flip flop output is on constantly but the J-Pac input should be momentary, I guess you could use the output from the first three hex inverters that set the flip flops for the J-Pac but it still needs to be isolated from the J-Pac (use optos??).

Link to comment
Share on other sites

The active flip flop output is on constantly but the J-Pac input should be momentary,

 

To make a momentary signal from a flip flop output you could add a "one shot"

 

One of the 4 gates in the 4093b chip can do this for you. Just make sure you tie the unused inputs on the chip either high or low even though you don't use them.;)

 

If you look at this page here you will see a negative edge and a positive edge triggered one shot circuit....

 

https://www.electroschematics.com/wp-content/uploads/2011/04/CD4093BM-BC-datasheet.pdf#page=4&zoom=auto,-31,715

 

The middle circuit will both provide a single high output pulse or the bottom circuit, a low output pulse even though the input signal is held on the Vin input. That will give you the required "momentary" signal. The capacitor sets how long the output pulse is.

You could use this output signal to drive one of the circuits in the ULN chip and that signal provide a momentary signal to the J-Pac or use the output of the "one shot' to drive an opto direct.

 

I guess you could use the output from the first three hex inverters that set the flip flops for the J-Pac but it still needs to be isolated from the J-Pac (use optos??).

 

An opto will provide a clean, isolated switch closure for the J-Pac.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...