Cement 864 Report post Posted July 3, 2023 The Car: For this project the relevant parts are that it's an E46 with Nissan VQ37 engine swap (running OEM ECM) and Alpine head unit. I need to interface with both of these things with the steering wheel controls, and neither of them speak BMW. The Plan: Make custom PCB's to replace the OEM units which will interface natively with the headunit and ECM respectively. Complete OEM look and feel but otherwise totally bespoke. Will likely use an Arduino for the radio controls, hopefully I can stash this some place well out of the way. It turns out the Alpine (and other brands I believe) use the same signals as the IR remote sends but simply over the wired interface. As for the Nissan cruise control settings, they are based on a resistance ladder which is documented in the service manual. So the cruise functionality (actually used for changing maps in the ECM) will be all passive and the radio will be a little more involved. So Far: Have taken the OEM items out of the wheel so I can replicate the PCB's physical layout including fixed items like switch pads + lights. 2 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 5, 2023 Not much to report here, got some good photos which i will use to draw up the PCB shape. Have been tooling around with EasyEDA, an online circuit designer / layout tool ... it's definitely a whole new world to learn !! Just for interest sake here is the rear side of the OEM boards. The radio PCB is actually a resistance ladder circuit which is read by the 'master' over on the cruise control side: Quote Share this post Link to post Share on other sites
Karter16 403 Report post Posted July 7, 2023 Might be worth having a look at https://github.com/Wnthr/arduino-alpine-remote/blob/master/src/AlpineRemote.cpp which might be helpful in that it references the hex codes to send for various commands. Might be an easier place to start than trying to capture the IR signals and replay them. I note that the readme.md on that project indicates that it's a variation on the standard NEC IR protocol. Cool project! 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 10, 2023 (edited) So a little bit of a change in plans based on some tooling around with the volt meter in the car. The radio controls circuit is fed 5V from the cruise control side and as mentioned is already a resistance ladder style ... so that makes it perfect out of the box for directly interfacing with the Arduino !! Score Got some help from a friendly person on an electronics forum (https://www.electro-tech-online.com/threads/simple-circuit-reverse-engineering-steering-wheel-radio-controls.165060/) and can now measure all of the button presses on the Arduino with some basic code. Will be parking my code here if anybody is interested: https://github.com/david-morton/E46-SteeringWheel-Controls/tree/main This is the setup as it stands: Next up will be: Add more code to actually detect the respective button presses Wire in the head unit to this PoC setup Test the internet sourced codes over the wire and see if the head unit does stuff (thanks @Karter16) Work out how I can get everything done with 5 cables total into the wheel via the clock spring taking into account what the cruise control side will need. May try and stash a super small micro controller within the wheel itself ... not sure yet This is the PoC circuit as it stands: Edited July 10, 2023 by Cement 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 12, 2023 Got the PoC running nicely and have validated it against the head unit now Next up I will take a look at the cruise control side again and work out the wiring setup + where I will stash the Arduino to deal with the radio controls. 1 Quote Share this post Link to post Share on other sites
Karter16 403 Report post Posted July 12, 2023 Great stuff!!! Very cool 😎 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 13, 2023 Getting the permanent solution wired up using an Arduino Nano. The other piece is a 'buck' DC-DC converter to give the Arduino a regulated 10V and protect it from the noise of the car wiring. The 1.5kohm resistors are inside the heat shrink. Have got a cable spliced into pin 27 on the lighting control module which will power this as well as provide the power for the lights in the button panels via a pin in the clock / volute spring. Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 22, 2023 Have started on designing the PCB for the cruise control side and its looking ok ... I think I'm in a good place for the actual controls, and have just got to add he little LEDs for the illumination now. Took some good photos of the existing board and have marked out the circuits that are used for the lights. Will just research why they have different resistor values for each LED ... I'm sure there is a good reason for it. Will add the LED's and resistors to the circuit tonight and then i can refine things a bit, 3D print the board to test fit and at some point actually order the PCB(s) !! Quote Share this post Link to post Share on other sites
polley 916 Report post Posted July 22, 2023 Jlcpcb for the boards ? Quote Share this post Link to post Share on other sites
Karter16 403 Report post Posted July 23, 2023 17 hours ago, Cement said: Will just research why they have different resistor values for each LED ... I'm sure there is a good reason for it. I wonder if it’s something to do with the button icons having different surface areas that illuminate, and they have adjusted the brightness of each LED so the brightness of each button appears to match? Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 23, 2023 17 hours ago, polley said: Jlcpcb for the boards ? Ya I think so, using EasyEDA which I believe is owned by or otherwise tight with them and it's cheap cheap plus good turn around it would seem !! Not quite sure if I am ready to hit the go button just yet but for the price i think I should just to learn whats wrong and how they come out. 2 hours ago, Karter16 said: I wonder if it’s something to do with the button icons having different surface areas that illuminate, and they have adjusted the brightness of each LED so the brightness of each button appears to match? Powered up the board today and all the LED's look to be the same brightness, to the eye at least. Have got another thread going with the electronic folks to see if there are some other ideas. https://www.electro-tech-online.com/threads/circuit-reverse-engineering-different-led-resistor-values.165113/ Looks good in a picture now at least which is encouraging 👍 1 Quote Share this post Link to post Share on other sites
Karter16 403 Report post Posted July 23, 2023 Looking at your thread on the electronics forum - voltage either side of the resistor won’t tell you anything as LEDs have a fixed voltage drop (approx 1.8v in this case), voltage drop across the resistors will therefore be fixed. V=IR therefore means, in this case, that with fixed voltage drop across resistors and varying resistance, the current will vary through each LED, which in turn will influence brightness (although not enough to be able to tell it would seem) so 🤷♂️ 1 Quote Share this post Link to post Share on other sites
Karter16 403 Report post Posted July 23, 2023 Sorry didn’t mean that to come across as short - was making dinner and looking after little one at the same time and just read it back to myself!! 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 23, 2023 4 hours ago, Karter16 said: Sorry didn’t mean that to come across as short - was making dinner and looking after little one at the same time and just read it back to myself!! All good for sure, I just read it as helpful advise 👍 I'm just going to split the difference and use a set value for all then can adjust from there if things look weird ... just ordered everything I need from RS (including new LED's so can try to not reuse) and will get the boards ordered this week. 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 28, 2023 PCB's arrived ... really impressed with the overall experience with JLCPCB !! Waiting on the remainder of the components from RS so i can assemble a board and test everything out. I'm expecting some minor fitment issues which may need a rev 2 but we shall see. 1 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted July 31, 2023 The balance of the components arrived today from RS and I got a board assembled as much as I could. One of the resistors was in the correct bag but the part was of the wrong value So held up until thats resolved, and of course it was the one weird value which came from the UK. Have to drill a missing hole in the board before I can at least test fit it and check the LED brightness etc. 3 Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted August 9, 2023 Got the missing resistor and everything measures perfectly as designed !! Pretty happy with that. Unfortunately something I didn't count on is the little rubber pads in the membrane being shitty conductors and throwing out all of the measurements 😕 So I'm pretty confident that in the car it would not function well at all ... will try and clean the pads but can't see it improving things hugely. Will then look to silver paints or other things i can add to the little membrane pads to give a better connection. Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted August 19, 2023 Have ordered some ultra small tactile switches to use instead of trying to get the button pads to work. They are only 0.3mm thick and less than 4mm across. New PCB's on the way to work with the new switches 👍 Link to the switches: https://sten-eswitch-13110800-production.s3.amazonaws.com/system/asset/product_line/data_sheet/236/TL3312.pdf Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted August 23, 2023 New boards and the switches arrived, incredible performance from both outfits ... boards ordered from China on Saturday 4pm and were manufactured and delivered on Wednesday, amazing. These switches are TINY ... might need to get some solder paste and try to reflow them (heat in a pan or similar ) but will have a hoon with some hand soldering first. Quote Share this post Link to post Share on other sites
Cement 864 Report post Posted August 24, 2023 Got a board assembled and tested ok, hopefully the switches stay put !! Yet to actually validate the buttons are functional for ECU map changes, will do that tonight. Then i have to try and capture the Nissan CAN (?) signals for cruise control light illumination. LED illumination looks good compared to the radio button side :) 2 Quote Share this post Link to post Share on other sites