Troubleshooting; finding cause of 35MHz signal - Page 1
Forum section: electronics / beginners

author: permal
author_rank: Regular Contributor
timestamp: December 27, 2018, 02:09:31 pm
content: Hi,TL;DR; how do you find the source of a 35 MHz interference/feedback signal, when it only appears when connecting two devices together? The devices works fine by themselves.The longer story: I'm working onv3 of my I/O card(entire schematic attached). I've got everything working; SD Card (both via SPI and MMC ifc) and digital & analog I/O via I2C. My last hurdle is the Wiegand interface for connecting standard entry/exit keypads. The specific part of the circuitry is as in the Wiegand.png image (page 3 in the attached pdf) - D0 & D1 run through aTXB0102DCUto convert 5V to 3.3V for the MCU (ESP32 Wrover-B module). I've verified that the voltage translation works as expected; every negative edge on the 5V side on either D0 or D1 results in an interrupt in the MCU. I did simply by pulling D0/D1 high/low with a resistor.The keypad I have is ansTouch Reader R-W. From what I can tell, it gives a fair output, as seen in the image "DS1Z_QuickPrint1.png"The problem is that as soon as I connect the keypad to the 5V side of the TXB0102DCU on my I/O card, I get the signal seen in image "DS1Z_QuickPrint2.png" and "DS1Z_QuickPrint3.png" on D0 and D1 (though only one line is connected in those images). How do I figure out where this interference/feedback signal comes from? Secondly, what I can do about it?The measurement tools I have available are an unlocked Rigol DS1054 and Dave's 121GW multimeter.PS: I'm already aware of that the NPN transistors are meant to be on the low side so no need to point that out. If you have constructive feedback on other changes I should do for v4, please let me know.

author: David Hess
author_rank: Super Contributor
timestamp: December 27, 2018, 06:17:48 pm
content: It looks to me like the TXB0102 bidirectional level translator is oscillating after it receives its first pulse. That suggests a lack of termination where the cable length is long.How long is the keyboard cable?I would try a series or AC shunt termination at the output of the TXB0102 to quash any reflections which could be causing it to oscillate.

author: permal
author_rank: Regular Contributor
timestamp: December 27, 2018, 06:32:42 pm
content: Quote from: David Hess on December 27, 2018, 06:17:48 pmThe wire from the keyboard to PCB is about 25cm, but it's supposed to allow extensions to a few meters.Can you elaborate on what an AC shut termination is, I've never heard that term before?

author: David Hess
author_rank: Super Contributor
timestamp: December 27, 2018, 07:26:30 pm
content: Quote from: permal on December 27, 2018, 06:32:42 pmAn AC shunt termination is just a resistor and capacitor connected in series between the signal and ground. The capacitor blocks the DC voltage so that the DC operating point is not disturbed.

author: permal
author_rank: Regular Contributor
timestamp: December 27, 2018, 09:40:11 pm
content: I see. I'll try to add something to the circuit and see what happens.

author: permal
author_rank: Regular Contributor
timestamp: December 28, 2018, 01:05:55 pm
content: I tried with a 10k and 100uF in series to ground on the output of the TXB0102, didn't help. Also tried doubling the capacity, didn't make any difference. There's likely some way to calculate the correct values, but is it reasonable to expect any result shooting from the hip like this? Also, how do calculate the correct values, closes I get are formulas for low and high-pass filters, which isn't quite the same as an AC termination shunt, is it?What alternatives do I have? I'm thinking that adding an optocoupler would help; it'd be good as isolation between the keypad and the PCB as well as making the circuitry on PCB work "internally only", i.e. no interference from outside. As written above, the interface works as expected when using other methods than this particular keypad to drive the inputs on the TXB0102.

author: David Hess
author_rank: Super Contributor
timestamp: December 28, 2018, 08:25:04 pm
content: 220 ohms and 100 picofarads would be more typical; the resistance needs to be somewhere in the range of the transmission line impedance but it does not need to be exactly matched to significantly improve the situation. Check out page 12 here where it is referred to as AC termination:http://www.ti.com/lit/pdf/scaa034AC termination is where I would start because it does not require cutting any wires.

author: permal
author_rank: Regular Contributor
timestamp: December 29, 2018, 09:50:45 am
content: Quote from: David Hess on December 28, 2018, 08:25:04 pm120pF and 220Ohms did a real difference, see images; First is input, the second is on the output of the level shifter. I'm not certain how to interpret the image though. The two pulses are clearly seen, but there is still a lot of distortion when it's not pulled low. Can that still be line echoes?

author: David Hess
author_rank: Super Contributor
timestamp: December 29, 2018, 04:27:10 pm
content: Quote from: permal on December 29, 2018, 09:50:45 amI am not sure how to interpret that either. I would further test with an even lower value of resistance like 100 ohms and a little more capacitance.Are you sure the level shifter is decoupled properly?

author: permal
author_rank: Regular Contributor
timestamp: December 29, 2018, 04:48:22 pm
content: Quote from: David Hess on December 29, 2018, 04:27:10 pmI tried with 240pF, no difference. Will try with less resistance too.Properly decoupled - what do you mean?

author: David Hess
author_rank: Super Contributor
timestamp: December 29, 2018, 04:51:02 pm
content: Quote from: permal on December 29, 2018, 04:48:22 pmI mean the power and ground to the level shifter need to be low impedance and properly decoupled. This is especially important when driving a low impedance load like a cable.

author: permal
author_rank: Regular Contributor
timestamp: December 29, 2018, 05:42:40 pm
content: Please excuse me if I'm not understanding you correctly, but level shifter is actually not driving the cable, the cable is on the outside, i.e. the keypad is what is driving the voltage in the cable.Ground is connected to the ground plane, can't get lower impedance than that I think? I've learned that a star-configuration would have been better than what I used for my rails, they both are a few mm wide so it's not powered b y a regular 0.25mm trace. There is a 100nF cap just by the shifter for both 5 and 3.3V.Does this answer your question?

author: David Hess
author_rank: Super Contributor
timestamp: December 30, 2018, 03:55:57 am
content: Quote from: permal on December 29, 2018, 05:42:40 pmThe TXB0102 is a bidirectional level translator so the keypad has to overcome a 4k load to drive it. When it switches states, internal one-shots drive *both* sides hard. It was not intended to be interfaced with a high capacitance line like a cable.The TXB0102 also has a minimum input slew rate of 30ns/V so I wonder if the keypad is too slow to drive it without problems.

author: boB
author_rank: Frequent Contributor
timestamp: December 30, 2018, 05:36:38 am
content: David is asking about C305 and C306 connected up to the bidirectional level shifter power lines to GND.Those are the decoupling capacitors. How are they physically connected in the circuit ? Maybe a picture of the actualcircuit breadboard would be helpful.

author: permal
author_rank: Regular Contributor
timestamp: December 30, 2018, 06:50:18 am
content: Here's how the caps are placed in relation to the converter.Thanks for all the help so far; I'm going a way for a week so I might not be able to reply until I'm back.

author: permal
author_rank: Regular Contributor
timestamp: January 06, 2019, 03:13:44 pm
content: Back home again if either David or boB has any feedback on the placement of the caps. If an actual image of the PCB is desired, please let me know.

author: dmills
author_rank: Super Contributor
timestamp: January 06, 2019, 04:24:30 pm
content: I don't think this is the actual problem, but how big is the loop formed by the cap ground to get back to the chip ground pin?A via or two to strap the cap ground pour down to the ground plane would really not hurt.Regards, Dan.

author: dmills
author_rank: Super Contributor
timestamp: January 06, 2019, 04:36:18 pm
content: Also, why the bidirectional part?Those things tend to be slightly iffy at the best of times (see the note about not using pull up resistors in the TXB0102 datasheet), they have their place but I would want to be VERY sure about exactly what was on the other end of the link before using one.If I was doing that I would probably use either a part that could be explicitly direction switched from the micro (Some sort of level shifting tri state buffer, bound to exist), or a single direction part.Regards, Dan.

author: permal
author_rank: Regular Contributor
timestamp: January 06, 2019, 05:30:05 pm
content: I was recommended the part for this by someone, didn't think much about it being biderectional or that it would cause issues, esp. since only one side (the keypad) is driving the lines. (fwiw, the same part is functional in v2 of this circuit, although against another keypad and different PCB). I'll check the length of the ground-loop and get back to you.

author: permal
author_rank: Regular Contributor
timestamp: January 07, 2019, 07:54:08 pm
content: The ground loop is about 10 mm. Can possibly be shortened using an extra via or two.I added a opto-coupler between the keypad and the driver, but unfortunately it seems to slow for the 44us pulses generated by the keypad so I didn't get any wiser from that.I'm going to take the advice from previous posts and redesign this with a one-way level converter - any suggestions for choice of component? Two channels, 5V to 3.3V and 44us pulses.

author: boB
author_rank: Frequent Contributor
timestamp: January 07, 2019, 08:09:13 pm
content: Try tacking a small capacitor (0.1 uF ?) RIGHT across the Vcc to GND of those ICs and see if it helps.You could also add a ferrite clamp around the cable exiting the board which I think is where you said the interference starts.That ferrite would want to be RIGHT CLOSE to the board with the ICs on it to keep the wires exiting from emitting.

author: permal
author_rank: Regular Contributor
timestamp: January 08, 2019, 08:00:21 pm
content: Quote from: boB on January 07, 2019, 08:09:13 pmI'll give the cap an attempt. A ferrite clamp I'd have to buy first; any suggestions?As to *where* the interference starts, I don't really know. It appears on the first high-low edge when the keypad sends the signals and only when the keypad is connected - manually pulling the same line high/low works without problems.Assuming the worst - that the cap/ferrite doesn't work - I've been looking at unidirectional level translators and theSN74LV4T125seems to meet my requirements, thoughts?

author: permal
author_rank: Regular Contributor
timestamp: February 05, 2019, 06:01:28 pm
content: A follow up on this:I changed the two-way level translator to a one-way (SN74LV4T125) and things are now working