ONE momentary switch to switch states of latching relay

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
It seems so. Fortunately, it shouldn't be too difficult to replace.
Well, I replaced the 4013, twice actually. No luck. It will only toggle and stay LOW if I don't release the switch button. I can't find what else is wrong. There are no shorted or broken traces and no faulty components.

IMG_20221012_094756.jpg

IMG20221012092826.jpg
 
Have you checked the pulse going to pin 11? Could that be that C6 is leaky?
No, but I can replace it. Problem is, I don't have 0805 10nF MLCC ready at hand. I have plenty of 100nF ones though. I'll try it anyway, and report back.

EDIT: Replaced C6. No joy. Same behavior.

C6.jpg
 
Last edited:
CD4013 doesn't have a schmitt input, I think. Does it sometimes work if you kinda 'snap' the button really fast? I had a similar problem once where I had to swap to a HEF4013 which does have a schmitt input and can cope with slow trigger rise times.
 
The plot thickens! Have you checked with a scope the signal on pin 11?
Don't have a scope :cry:
CD4013 doesn't have a schmitt input, I think. Does it sometimes work if you kinda 'snap' the button really fast? I had a similar problem once where I had to swap to a HEF4013 which does have a schmitt input and can cope with slow trigger rise times.
The original part that I replaced is Toshiba TC4013. The other pedal in the same series that I have also use the same switching circuit board, albeit an early design with through hole components, Toshiba TC4013 and TC4503, and has a different pinout going to the FX board. I tried it with this FX board after I arranged the pinout, and it work flawlessly.

IMG20221012170019.jpg

IMG20221012170007.jpg
 
CD4013 doesn't have a schmitt input, I think. Does it sometimes work if you kinda 'snap' the button really fast? I had a similar problem once where I had to swap to a HEF4013 which does have a schmitt input and can cope with slow trigger rise times.
You were right. I did what you suggested, and it toggled. But it took several attempts. Not good.
Looks like I have to go with HEF4013BT, which cost 7x more than CD4013 because it's not a commonly sought-after part.

In the meantime, I added a simple mod, a 100nF X7R cap to bypass the 4013's supply pin. It was an attempt to see if the erratic behavior would go away.

IMG20221012183105.jpg

EDIT: Back to the way it was before. Snapping the switch quickly no longer toggle the output. Damn, I hate these logic ICs. They are so unreliable.
 
Last edited:
This can happen as a switch ages / wears.
Hit and miss whether it will work okay with a particular individual IC as it may be working in the "Undefined" area between the specified hi / low logic voltages.
 
This can happen as a switch ages / wears.
Hit and miss whether it will work okay with a particular individual IC as it may be working in the "Undefined" area between the specified hi / low logic voltages.
No difference either with a new momentary switch, hence the reason why I soldered back the old switch.
 
Let's say theoretically, the switching problem can be resolved by adding a Schmitt trigger input, is it possible to do something like this? Switch to Input A, and Output B to CD4013? VCC is +9V.
I'm not too keen on spending $7 to buy a HEF4013 knowing there's a chance of it's not going to work, for a 22-year-old guitar FX pedal that I can only sell for like $25 at most (even though everything else is still in 99% mint condition, including its original packaging)
2021012017130960-1551551641.jpg
 
Let's say theoretically, the switching problem can be resolved by adding a Schmitt trigger input, is it possible to do something like this? Switch to Input A, and Output B to CD4013?
Fig 9 in the TI CD4013B datasheet suggests using a SN74LVC1G17 to do that. However, not suitable to your case since max V is 5.5V and DIY unfriendly package.

OTOH HEF4013 is available from Vanxy, 10 pieces for about £3 incl. shipment. Now I understand y
 
Last edited:
I didn't finish my answer because my keyboard died on me. :mad:
I wanted to say that many are not prone to buying from Ali, but I never had any issues with Vanxy. I must say I never tried to buy real expensive IC's from them, like AD797 or VCA's.
 
With HEF4013.
Q2 output is always at LOW state when initialized.
Pressing the switch will toggle it to HIGH state, then remain stuck there until power off. I can't even force it to output LOW state by holding down the switch. With CD4013, I can do this.

A $7 IC went down the drain. Most likely a counterfeit, though I suppose I can try it outside the switching board. Just need to find a SOIC-14 to DIP-14 adapter PCB in my pile of junk.

IMG_20221015_221835.jpg
 
Last edited:
Damn, I hate these logic ICs. They are so unreliable.

In general logic IC's are very reliable because they are decades old technology. You do have to use them properly, and you do need to be aware that CMOS devices are very sensitive to static damage. The devices have ESD clamps on the inputs, but it is still good practice to use ESD safe bench covering, wear ESD strap connected to workbench, grounded soldering iron, etc.

Don't have a scope

Fortunately the '4013 is a static logic device, so if you have a way to clip or clamp the negative DMM lead to your reference, you can probe with the DMM lead, and push the switch with your other hand. The clock input is edge triggered on the low-to-high transition, so check all the pins with the switch released (the clock input should be low at that point), press and hold the switch and check all the pins again (the clock input should be held high at that point if the switch is still closed), and then release the switch and check all the pins again. The outputs should toggle when the switch is closed, but not when it is released.

What is the value of R119? Do you see the LED blink or flicker at all when the switch is pressed?
 
What is the value of R119? Do you see the LED blink or flicker at all when the switch is pressed?
The pedal is split into two boards. One main board with the circuitry to produce the distortion effect, and a daughter board for I/O and bypass switching. The LED is on the main board.

A transistor is used to turn on the LED, responding to an inverted flip flop state of the 4013 (pin 13).
LOW (0V) = LED ON
HIGH (9V) = LED OFF

I'm troubleshooting the daughter board without having it connected to the main board.

Anyway, like I said, the only partially promising progress was when I put in CD4013. It would at least toggle to LOW and stay at LOW as long as the switch is depressed (contacts remain closed)

With the HEF4013 that's supposed to have a Schmitt trigger input, I can only toggle once. It starts at LOW, one press with the switch, it goes to HIGH then stuck at HIGH and completely ignoring the switch until power off.
And the toggling once can only happen if C6 is back to the original part, 10nF.

At the moment, I'm working on a mod. I have a mini Digispark ATTiny85 board, that I already programmed in the switch debouncing and toggling last night. Ever since my decision to move to SMD years ago, I never realize what a pain in the ass when you have to make a quick mod like this, because I don't have through hole parts in my bin to use. Have to go online shopping to buy one freaking 2N2222 to level shift the 5V logic to 9V, because of that 4053! with the delivery fee costing more than the transistor itself.


EDIT: The toggling once when I soldered C6 back to 10nF but not when it was 100nF got me thinking that perhaps I needed to change the debouncing time constant that is more suitable for this HEF4013, so I removed the 10nF cap, and the 1M resistor. In their place I soldered a through hole 100nF ceramic cap, and a 10K resistor. And et voila! it works flawlessly. Now all I have to do is remove them and solder SMD version.

IMG20221017210518.jpg
 

Attachments

  • VID_20221017210813.mp4
    5.7 MB
Last edited:

Latest posts

Back
Top