0
\$\begingroup\$

(Split up from this question)

I'm trying to interface an Arduino with an eMMC chip to bit-bang it. eMMC uses bidirectional lines, and one of them (CMD) is first used in open-drain mode (for identifying devices on the bus) and then in push-pull mode.

The eMMC spec advises to use two pull-ups on the CMD line: a weak one for push-pull, just to prevent the bus floating, and a strong one for open-drain. The host should enable / disable the strong pull-up depending on the state machine. As I understand it I don't really need the strong one, it's just to speed up low-to-high transitions (and speed during that phase isn't that important). But if I wanted it, how would I drive it?

Here's a simplified version of my circuit (voltage regulators and lines other than CMD not shown), with a BJT where the Arduino should drive the pull-up:

Arduino to eMMC schematic

But even after reading quite a bit about transistors, I'm not sure if it could work and how. I know I'm supposed to drive the BJT to saturation mode (or cut-off to disable), and that requires biasing the poles correctly (and/or let enough current flow to base?), but I'm not in the usual common-emitter configuration because I can't short to ground. Also I need to make sure the emitter voltage is above Vih (should be fine if Vce is only 0.3V).

How would I do that? Just connect a pin of the Arduino to the base, through the LSF with a pull-up? (What resistance then?) Would a FET be more appropriate here?

\$\endgroup\$
  • \$\begingroup\$ Use a PNP. Also to make your schematic more readable you should draw the 1V8 rail on the upper half and flip q1 and r4 above the line they are pulling up. (same with r5). In general +ve voltages go upwards, and your reference/0V goes down. Also do not connect a uC pin directly to the base of a bipolar device. Always have a current limiting resistor in series. \$\endgroup\$ – IC_Eng Jun 4 '19 at 15:20
  • \$\begingroup\$ Yeah the real schematic is messier, there are 6 or 7 wires going through the level shifter, and I put these where I have some space left. I should clean that. Is the series resistor also required if the µc and base will only be connected when the line is pulled low? If I understand correctly, the LSF opens the circuit when input is high. \$\endgroup\$ – Pikrass Jun 4 '19 at 15:48
1
\$\begingroup\$

Enabling/disabling a strong pull-up with a microcontroller

The NPN BJT you proposed will not work. You cannot force the BJT into saturation in the configuration you have.

You could use a PNP BJT instead, but I'd suggest the best solution is to use a P-Chan FET as shown below.

schematic

simulate this circuit – Schematic created using CircuitLab

When the Ard_GPIO signal is Low the FET is ON and the termination applied to the EMMC pin. When the Ard_GPIO pin is High the FET is OFF and the termination is floating.
There are lots of suitable P-Chan FETs but the one proposed here, the BSS84 is readily available and adequate for the purpose. If you are concerned about the RDS(on) of 17 Ohm maximum, then you could use a larger current device such as the AO3401 with extremely low RDS(on).

To simulate the circuit you need to ground the EMMC_Pullup line otherwise the simulator won't be able to do much with the signal. If the EMMC_Pullup line is left floating, then any leakage current for the BSS84 will cause the line to look high. Here is the simulation showing Vout on the BSS84 Drain and the current through the terminator resistor:

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ When simulating your circuit, whether I connect ARD_GPIO to ground or to a 5V source, I read V(EMMC_Pullup) = 5V. Am I doing something wrong? \$\endgroup\$ – Pikrass Jun 4 '19 at 15:36
  • 1
    \$\begingroup\$ Depends on your simulation. Connect EMMC_Pull to ground so the FET turns on and off the current flow. \$\endgroup\$ – Jack Creasey Jun 4 '19 at 15:54
  • \$\begingroup\$ Thanks for the tip! Now, it works fine for 5V, but I need that line to be 1.8V. According to the simulation that won't do. But your answer already helps me a lot, I just need to pick the right component for that voltage now. \$\endgroup\$ – Pikrass Jun 5 '19 at 11:31
  • \$\begingroup\$ I see now requirement for the pullup to go to 1.8V in the spec. The CMD line is either push-pull with a 4k pullup or Open drain and I'd imagine no lower than a 1k pullup. The CMD line in open drain is only used at 400kHz, so I am mystified by your use of 100 Ohms as the strong pullup. I would imagine you could use a single GPIO with a 1k pullup and simply go from a '1' output to a Hi-Z or input mode for that pin to enable/disable the strong pullup. \$\endgroup\$ – Jack Creasey Jun 5 '19 at 15:22
  • 1
    \$\begingroup\$ @Pikrass If you tried to operate the 328P at 1.8V then you'd be limited to about 4MHz clock rate, so all the timing would be out. If you want to operate just the eMMC I/O at 1.8V then use a suitable FET such as the BSH203: assets.nexperia.com/documents/data-sheet/BSH203.pdf There are lots of P-FETs that will work at 1.8V you just need to select a VGS(th) of less than about 750mV. I've no idea what datasheet you are using if you don't provide a link like this: ww1.microchip.com/downloads/en/DeviceDoc/… \$\endgroup\$ – Jack Creasey Jun 6 '19 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.