I had a circuit idea in mind that I’ve never been able to try out. I’m working on a SWP reader device right now (that’s a device that should directly talk to NFC enabled SIM cards).
So recently while browsing through semiconductor lists I across the TSH70 OpAmp. This is a great part and it’s much cheaper than the OpAmp I’m currently using and the specs are just about the minimum requirements that I have.
Also contrary to the OpAmp I’m currently using it’s a normal voltage feedback OpAmp This allows for a new transceiver design that I came up with.
Here you’ll see the idea in action: The SWP-TX signal (1.8V digital logic) goes directly into the non-invertig input. The OpAmp circuit itself is just a voltage follower with a transistor booster (Q1).
The voltage seen at the C6 input of the SIM card should be identical to the SWP-TX signal, and in fact it is.
If the SIM card wants to transmit data it does so by drawing current (Rule of thumb: 1mA current equals to a logic one). So the task is to measure current at high speeds.
If the SIM card draws current this current will be sourced by the Q1 emitter and not the OpAmp output. The majority of current that passes Q1 emitter is again sourced from the collector.
On the top of the circuit you’ll see Q2 and Q3. These form a current-mirror. E.g. whatever current is drawn from the Q2 collector will also be drawn from the Q3 collector.
Long story short: The current drawn from the SIM card will appear at the collector of Q3 (just mirrored). Adding a load-resistor R5 converts this voltage to a current and we can measure it.
And here is how it looks like in a spice simulation:
Blue is the control signal that controls the SIM current. If it’s high the current flowing into C6 is 1mA.
Red is the SWP-TX signal. I’ll show it along with the other curves so you can see that the actual voltage across the SIM does not affect the output much.
Green is the SWP-RX signal.
This green signal looks great eh? Nice, defined edges, just a little bit of ripple. Very low propagation delay. I could directly connect this signal to a micro-processor pin and start reading data.
Except it won’t work like this. I completely missed to add some parasitic capacitance across the emulated SIM card.
Here is the same circuit with C1 added in. I’s just a tiny 10pF capacitor that should emulate the capacitance of the SIM card itself along with sockets and so on.
And this is the signal response after the capacitor has been added:
Now the received signal rings a lot, and there is also the propagation delay went completely over the roof. It’s almost half as long as the impulse itself!
What happened? Once the capacitor has been charged, and the SWP-TX signal goes back to zero there is no quick way for the capacitor to discharge!. Q1 can only source current to C1, not sink any. The only way to lose charge and lower the voltage across C1 is to slowly leak through R4. And this completely messes up the negative feedback loop of the OpAmp (not his fault!).
I could lower R4 to allow for faster discharge, but then again more current will flow through the transistors and I mess up my nice green output signal.
I could probably replace Q1 with a proper push-pull stage. That’s something I’ll try one day. Right now I’m staying with my “tried and trusted” SWP analog front-end. It has a different topology where the parasitic capacitance actually speed things up! It requires the much more expensive current-feedback OpAmp I’ve mentioned, but but it doesn’t show this defect.
Lesson learned: small parasitics can mess up things much more than expected.