1
\$\begingroup\$

I have a small device that has a TTL-level UART interface, the signal is fed into a Schmitt trigger, which is then used in a small IR-LED. An IR Sensor is also attached to a Schmitt Trigger, via a FET and that signal is then put on the TxD pin.

Now, the entire device consists of a 74HC14 (Hex Schmitt Trigger of which only two are used), the LED and the IR Sensor, two MOSFETs, four resistors, and three caps.

The device I'm controlling this from has only RxD, TxD, and Ground exposed. I can't easily use a 3.3V or 5V rail from the controller. I'd have to use an external PSU, like a USB charger just to drive this one little device, that isn't gonna draw much more than 10mA maximum.

Now, I'm wondering, if I can make a parasitic power supply from the RxD and/or TxD pins of the UART interface. Voltage levels aren't significant, as the device has a very wide Vdd input range: 2V - 6V.

My idea is to use perhaps a Schottky diode from RxD through a resistor to a capacitor, perhaps 100nF or maybe a little larger. The idea is to run the Schmitt trigger and the LED as well as the sensor from just the power the controller is able to provide. The specifics, such as the correct capacitance, resistance, etc. is to be determined, but I'm just generally asking if that idea is sensible, and if my approach is not wrong.

Data rate is rather low, max. 9600 baud. Data is just around one to five bytes every second. At all other times, there's no data transmission in either direction.

As suggested by some comments, I shall clarify that the controller talking to that device, is a Raspberry CM4 module. So the CM4 is the UART controller that I'd take to talk to that 74HC14 IC. I don't know how much current I can draw from those outputs, but the CM4 normally is normally pretty robust like that, in my experience.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ May be possible, but we don't know how much current your TXD (or RXD) pin can provide. So the question is, TXD and RXD pins of what exactly you are connecting to? \$\endgroup\$
    – Justme
    Jan 14 at 20:47
  • \$\begingroup\$ @Justme I couldn't figure out just how much current a CM4 can provide, but perhaps there is some sort of standard that we can go by? \$\endgroup\$
    – polemon
    Jan 15 at 15:07
  • \$\begingroup\$ @Justme Apparently "TTL-level". But whether that's actually TTL proper, or 3.3V LVCMOS, or anything else, is a good question. \$\endgroup\$ Jan 15 at 15:08
  • \$\begingroup\$ Ah, it's a rPi CM4. That appears to have these ratings: datasheets.raspberrypi.com/cm4/cm4-datasheet.pdf page 17, in other words, weak LVCMOS (current capacity varies with configuration, I assume) \$\endgroup\$ Jan 15 at 15:13
  • \$\begingroup\$ I've yet to measure the actual current draw of that device that I want to attach to the UART of the RPi, but my concern is whether the approach is at least correct in theory, so I can do a bunch of measurements and experiment a bit. I.e. diode into capacitor, through a resistor, etc. \$\endgroup\$
    – polemon
    Jan 15 at 16:47

1 Answer 1

1
\$\begingroup\$

This is certainly possible, I’ve done it in the past, although using RS232 rather than TTL UART. The limiting factor will be the current that the tx line can supply. You may find that using a higher data rate will help, so tx is low for less time.

\$\endgroup\$
6
  • \$\begingroup\$ Yep, a common issue with serial consoles powering raspberry Pis, as well. \$\endgroup\$ Jan 14 at 23:08
  • \$\begingroup\$ The data rate unfortunately isn't under my control. I'll have to use whatever is given. I know that UART is at TTL-HIGH level when idling, and in my case that'll be the case for the most part of a second. As I said before, the actual data submitted back and forth will be around one to probably four bytes every second. \$\endgroup\$
    – polemon
    Jan 15 at 2:40
  • \$\begingroup\$ So worst case you could have 9 low bit’s in sequence so your power supply will need to hold up for that long (about 1ms). I’d say that 10mA from a logic output is possibly a tall order but from a line driver it should be fine. \$\endgroup\$
    – Frog
    Jan 15 at 8:28
  • \$\begingroup\$ "This is certainly possible, I’ve done it in the past, although using RS232 rather than TTL UART" So using something completely different, then :-) All RS232C mice used spare RS232C output pins as supplies, set to always drive a high voltage, so that's very common but nothing like loading UART logic lines. The OP's question currently doesn't specify what the drive circuit is for the pins they want to take a supply from. Until that's clarified, it's impossible to reliably say whether it can be done or not. Downvoting for that reason, I'm afraid. \$\endgroup\$
    – TonyM
    Jan 15 at 10:25
  • \$\begingroup\$ @TonyM right, I've added the information about that. My bad for not stating what whill actually be the UART controller talking to the device I described. (clarification in the edit) \$\endgroup\$
    – polemon
    Jan 15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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