Quote: Originally Posted by pippolippi
Is the max232 really necessary when going from the HU to the PC?
I know that you probably are using it because you already have it, but IIRC you made previous tests with only the 10k resistor.
Yes, it worked with a simple 10K resistor only.
Honestly, I'm using it not only because I have it but also because I'm feeling more comfortable being in the spec than in the "undefined area that should work". I know that most PCs nowadays are probably similar to mine and present the same characteristics, but what if not ? It's not the 5K input impedance that I doubt of (it is defined in the spec), but more the threshold supposedly around 1.5V. What if people use exotic serial ports (USB>serial / PDA / ...) with other characteristics ? The [-3V ; 3V] zone is "undefined" according to the RS232 spec, so I prefer to remain out of it.
I wouldn't say that if it implied an expensive specific component, but a MAX3232 (or MAX232) costs around 2 EUR and can be obtained as free sample from Maxim within a few days, so I "won't afford the economy" (if you see what I mean). Simpler yet, the MAX233 has internal capacitors. It's a bit more expensive but cabling is reduced to almost nothing.
I prefer not to have people asking us why their circuit doesn't work and have to imagine all possibilities, including exotic serial ports. It must work :-)
But of course, if you want to use simple resistors in your specific case, no problem...
Quote:
I'm asking because if the max232 is not needed from the HU to the PC I'm thinking to replace the transistor and the max232 with an optocoupler and a diode (since the optocoupler wouldn't stand more than 5v of reverse voltage).
Note the apparently reversed connection of the optocoupler: the transistor will be open with a positive TX (hence a 12V via the internal pull-up of the HU) and closed with a negative TX (hence 0V to the HU).
Edit: of course a resistor is needed in series with the optocoupler's led in order not to fry it. Around 2K should do.
Mmh, I'm not used to optocouplers but why not. Now let me guess... you do have a CNY17 in stock, don't you ? :-). Well, I'm probably not the best to comment on that solution, but from a newbie point of view, this doesn't seem incredibly simpler than using the MAX I think...
(Nice ascii art by the way :-) ).
Tell us if you get results, it's always good to have alternative solutions.