5
\$\begingroup\$

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

\$\endgroup\$
8
  • \$\begingroup\$ It looks like the signal gets inverted twice - once with Q2 and then with Q1. Also, are the wires connecting both devices long? If you connect the data line and ground it should work. If you have a scope, when arduino sends the signal, does it appear after Q1 ans is it the same polarity as the signal from the controller? \$\endgroup\$
    – Pentium100
    Mar 14 '12 at 3:44
  • \$\begingroup\$ Yeah the UART does get negated twice - no idea why they didnt just have the normal signal run down the cable. the wire is pretty short, 1/2 meter or so. Tracing the circuit the other end is a last resort as pulling the thing apart would be a pain but it looks like what i'll have to do tonight. Wanted really to find out if the fact that having my UART source come from a 2nd power supply would be an issue... \$\endgroup\$
    – RetroHound
    Mar 14 '12 at 9:39
  • \$\begingroup\$ Separate power supplies shouldn't be a problem. The problem probably is with voltage (maybe it is a bit off) or maybe the rise/fall time is too long. It could be reduced by adding a Schmidt trigger. \$\endgroup\$
    – Pentium100
    Mar 14 '12 at 11:31
  • \$\begingroup\$ I hooked up the scope to Q1 on the input and get almost exactly the same signal trace, its beginning to bug me. Messing about with the baud rate got a few messages through, but not reliably (the baud rate is not published, i'm inferring it through the scope) \$\endgroup\$
    – RetroHound
    Mar 14 '12 at 21:36
  • \$\begingroup\$ ... I hooked up the scope to Q1 on the input and get almost exactly the same signal trace, its beginning to bug me. Messing about with the baud rate got a few messages through, but not reliably (the baud rate is not published, i'm inferring it through the scope). though the scope is v old and a bit dodgy, but i'm loathe to spend out on a DSO just for this one project! So I'll trying a 74HCT14 or 4084 inverting schmitt trigger instead of my inverting transistor, see how that goes, will take a few days to get in though, thanks \$\endgroup\$
    – RetroHound
    Mar 14 '12 at 21:45
2
\$\begingroup\$

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.

\$\endgroup\$

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.