Electronic – Dual power supply confusing TTL serial

microcontrollerpower supplyserialttl

Sorry for the vague title: I'm a bit of a noob at analogue electronics, more a logic &software guy. Basic problem is I'm sitting at the end of a cable with a USB powered Arduino trying to send inverted TTL serial to an object at the other end of the cable. I've checked the protocol by wire sniffing with the same setup as it was talking to another device but I can't make it take any notice of me sending commands

I was wondering if it could be because I am taking the arduino power from the USB and not the device?

Out of the arduino i use a 2n3904 transistor to negate the UART signal (taking power from the arduino 5v supply), looks the same on the scope as what the real controller is sending.

I've hacked up the schematic as shown here

enter image description here

and I'm trying to replace what is on the right.

The 7V is not very stable, fluctuates around 6.5-7.5 V is there a good regulator chip to get 5 V out from there?

Cheers

Best Answer

I would start with the 7 V to 5 V power regulator: there are zillions of regulators for that. You need an LDO (for Low Drop Out). If 500 mA is enough the LF50 is a good choice: drop out less than 0.5 V, ground current less than 0.5 mA. 2 % or 1 % accuracy.

As I understand you from the comments that infamous "cable" is a 50 cm wire, right? Then there should be no need for the two transistor inverters since the supply voltage for both microcontroller and TTL is 5 V. An AVR output can easily drive a TTL port half a meter further. You might replace the 74LS00 with a 74HC132 Schmitt-trigger input quad NAND if it's otherwise too noisy.