Are you sure that this pullup can supply almost 12V at pin 14? what value have you tried?Originally Posted by Vicne
I reformated the "dumps13", captured when opening A and B in the spying circuit, and confirm that the HU should reply with an acknowledge when questioned with a frame such as :
- 3Dh 00h 03h 11h 60h 06h 49h
It's also interesting to see that when the CDC receives no ACK, it retries 2 times the same frame without incrementing the id (so 3 identical frames in a row), then waits for 1 second and tries 3 times with the next id, and so on until id = 09, then it falls back to 00h. No idea why...
Are you sure that this pullup can supply almost 12V at pin 14? what value have you tried?Originally Posted by Vicne
STOP
I had typos in my code ! Start of frame is 3Dh, not D3h !!!
Ladies and gentlemen, we're getting very close !
Once I send correct frames, I AM GETTING ACKNOWLEDGES BACK ! :-)
See capture below (Acknowledges come as soon as I turn the HU on), along with fixed code :-).
I sent both BOOTING and PLAYING and both are getting acknowledged. Well, that's not sufficient yet for the HU to allow me to switch source, but it's now just a question of emulating startup sequence I think.
For the circuit, I left the transistor in open collector configuration, with no divider on the base (once again, less components works better :-) )
So to finish this historic day here's a picture of my setup (PC, interface, hacked M/F blue mini-iso connector and Belgian Champagne :-) )
Cheers !
The pull-up still was 4K7 but it seems it's not needed.Originally Posted by Ale
I think voltage measurement of 5.7V when putting this resistor to ground shows that there most probably is some internal pull-up and we can safely leave an open collector, right ?
For the sake of completeness, here's the circuit I'm using. Now finally I think more people (without a CDC) can enter the game :-)
Note : having re-read the MAX3232 Data Sheet this afternoon, it seems I should replace the three 0.1uF capacitors at pins 2, 6 and between 4 and 5 by 0.47uF ones as my power supply is 5V and not 3V (see table 2, page 9)
Thanks again for your insightful input, as well as pippolippi's.
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.
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).Code:----------------------------- GND------ 1--|---- |------------|--6 | | | | | \---/ \ | ------ | | \ / \ | | / C | | | --- \ \| | |/ | | | | \ -- --| ---|--5 HU RX 1N4148 | | \| B |\ | TX ---|<- 2--|---- -- | V E | | --------|--4 HU GND 3--|--NC | ----------------------------- CNY17
Edit: of course a resistor is needed in series with the optocoupler's led in order not to fry it. Around 2K should do.
Yes, it worked with a simple 10K resistor only.Originally Posted by pippolippi
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...
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...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.
(Nice ascii art by the way :-) ).
Tell us if you get results, it's always good to have alternative solutions.
No, actually I have an unused max232 hanging aroundOriginally Posted by Vicne
with capacitors and everything already connected, and maybe even a couple of npn transistors.
OTOH revising various optocoupler circuits online maybe they're not suitable for these speeds without a lot of extra components.
BTW, the datasheet for the max232 says that input voltages for T_IN have to be between -0.3V and 6V
Yes...Originally Posted by pippolippi
And they are, as T1IN (pin11) is linked to R2OUT (pin 9) which is TTL level (0-5V) and T2IN is tied to GND to avoid leaving it floating.
I don't see the problem (if any).
Bookmarks