Arduino Serial Communication to Analog Way Tetra Vio (TVC401)
I am trying to communicate with a TVC401 device via its built in serial protocol. The commands are simple, like "0RA", "1RA", etc. Commands are sent upon receiving IR signals, from a universal remote. I've tested the remote and basic serial functionality (RS232, 9600 baud, 8N1, straight DTE/DCE interface) of the microcontroller with a USB serial adapter. I've also tested the functionality of the TVC401 with the same USB serial adapter. I asked this question in general help before, but I only had an ATTiny85 to test with. I've tested with the following configurations.
1. ATTiny85 "TinySoftwareSerial", the default Serial implementation in ATTinyCore.
- Nothing.
2. Arduino Uno Rev3 board, Hardware Serial to the TVC401 and Software Serial for Debugging.
- The debug channel showed what I expected, no response at all from TVC401.
3. Arduino Uno Rev3 board, Software Serial to the TVC401 and Hardware Serial for Debugging.
- The debug channel showed what I expected, no response at all from TVC401.
So, the software serial implementation seems to be pretty reliable at least at 9600 baud. I would be surprised if the ATTiny85 actually did have poor timings, simply because it can be programmed via USB and doesn't actually have any issue.
Maybe it's a software issue, but I'd expect some garbled nonsense back from the TVC401 as I was able to successfully test "snooping" the connection via PC as well. So it really seems like a hardware issue. I've vaguely heard that the capacitor on serial board could affect things?
I'm able to establish communications, just not with the device I need to. I do have a basic DMM and a very old tube scope, if they could be useful at all for diagnostics. But maybe someone has some insight into this kind of thing?
Device seems to be rather archaic, firmware doesn't seem available anywhere at all online anymore, though does support 1920x1080 HDMI (via DVI port).
39 Replies
on the R3, SoftwareSerial to the MAX232 adapter > RS232 cable > TVC - no response. have you swapped Tx / Rx on the MAX?
also, do you have a null modem adapter you can place in series with the RS232 cable?
i wasn't sure on the ATTiny, but SoftwareSerial on an Uno is stable, no hardware modifications are necessary
Yeah, I took your word on that. And yes I've tried swapping the Tx / Rx. I think that rules out any pin swaps from null modem cables, right?
Don't have a null modem cable to check with now, curious how that is different from swapping Tx / Rx pins.
no, as the MAX outputs might be "backwards"
The issue is if the TVC is wired for a straight or a null modem connection
i.e. is pin 2 on the DB9 Tx or Rx?
The TVC is wired for a straight connection, at least that is what manual claims and that is what seems to be the case testing with PC. I have both straight and null modem USB adapters.
But yeah, my diagnostic equipment is limited (DMM, old scope)
ok, if you know it's straight
I use serial communication often in my day job, folks argue with me that the "cable is correct" - add a null modem adapter and it starts to work π
Right. Or maybe the cable is null modem and it was sold as straight...
even an old scope might help you spot gross defects, however if it works from a PC I assume the TVC isn't that awful
right
i do it to myself "I KNOW THIS IS NULL!" - oops...
the USB to serial adapters I know of are straight
I've gotten the opposite for sure. Have a handful of those since I've connected new PCs to ancient 6502 based machines. Which of course, involved MAX chips too...
oldies but goodies
if you come out of the R3 to a terminal on the PC, the commands come through correctly?
Yes.
Btw, I'm using those Dupont connectors... easier to prototype.
May want to find a solution that's less likely to fall apart, if you have any ideas in terms of that. After I get it working.
(Haven't had much luck soldering in some random wires, the wires end up breaking and I have a bunch of mess to clean up.)
once it works it can always be ruggedized
it's not a matter of non-printing chars like a linefeed or carriage return is it?
Manual explicitly says no linefeed or carriage returns required though it does return results with CR/LF
Which is not described in manual
a little odd, most systems use line termination both ways
try adding a CR or LF or both, what happens?
does your PC terminal "help" you by adding them?
This thing is... a bit more documented than I would have expected to be honest, especially just finding a manual on the open Internet rather than having no manual or anything to go by since it was second hand.
it just echoes when I hit enter. What's the default for microcom?
Well, have tried it in minicom and microcom
idk
Just regarding the null modem again though... is swapping the pins exactly the same as swapping the cable?
Neither permutation worked (returned nothing through the debug channel)
null cables swap pins 2 & 3 (and maybe DTR / other control lines)
straight cables pin 2 to 2, 3, to 3
the only lines listed in the manual as connected are GND, 2, and 3. no DTR / control lines.
many things only use pins 2, 3 and 5 (ground) on a DB9
right, and yes it's db9
I assume voltage from the serial line from USB on PC is +/- 5V, correct? which should line up with the 5v connected to "VCC" on the MAX3232 adapter board.
Is 3232 significantly different from 232, btw?
USB data is just 0-5v "TTL" levels, the MAX232 converts it to +/-V RS232 levels. "3232", you mean a MAX3232?
MAX3232, vs MAX232
iirc it just has more ports
functionally identical
board itself has just one, but yeah, often not all connected on these breakout type boards
heck, the Uno seems to actually have another whole MCU on it (soldered on SMD), unless I'm mistaken.
the 16u2 act as a USB to serial bridge
ah so I did read it right
on clone boards they use cheaper chips to do the job, often a CH340
Anyway, I appreciate the help, will see if I can poke at things some more. Anything in particular I could check for?
I'm stumped, try scoping the MAX inputs and outputs, see if it looks "ugly".
Just out of curiosity, and this would probably be insane, would it be possible to actually drive a USB serial adapter from the Uno?
no, because there is no usable USB out (the 16u2 is dedicated to serial / upload)
A quick update on this... I also found an FT232 USB (TTL) dongle laying around that does seem functional... however, using this and the MAX3232 board (HW-044, is what the board is marked) I also get no response from the TVC401. Though again, seems to be able to receive from a PC RS232 adapter.
I have solved my issue!
I used this adapter
https://www.amazon.com/dp/B07BJJ1T5G?ref=ppx_yo2ov_dt_b_fed_asin_title
instead of this adapter
https://www.amazon.com/dp/B00LPK0Z9A?ref=ppx_yo2ov_dt_b_fed_asin_title
I'm wondering if it's a chip issue (knockoff clone chips) or just a configuration issue.
NOYITO TTL to RS232 Module TTL RS232 Male Female Mutual Conversion ...
UsesοΌ
The TTL serial port communicates with the RS232 level device.
Serial expansion of the device.
RS232 port communication with computer PC.
Can be used for GPS, electronic compass, car detection, hard disk maintenance etc .(Need the user staff with a certain degree of professional knowledg...
HiLetgo 5pcs RS232 to TTL Converter Module COM Serial Port Board MA...
This product is widely used in radio modification, mobile phone brush machine, XBOX360 brush machine, GPS, car testing, DVD brush machine, hard disk repair, set-top box upgrades. Microcontroller programmed.
Control chip: domestic new MAX3232 Working voltage: 3.3V-5V DC Working current: 6M...
Control chip: domestic new MAX3232 Working voltage: 3.3V-5V DC Working current: 6M...
Like went from totally no sign of life from the TVC401 to my whole program just works.
Well aside from crossing tx/rx pins, as allegedly that other one is "backwards"
was it really the adapter? or crossing TX / Rx?
i would have thought any TTL to RS232 would do, they are just commodity items
No, I tried it both ways with previous adapter, both with the Arduino and the PC FTDI adapter.
But I still don't quite understand it myself.
RS232 spec is +/-5v to +/-12v, maybe the TVC wants a higher voltage and one of those adapters is just a bit higher π€·ββοΈ