1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Welcome To LandyZone!

    LandyZone is the biggest Land Rover forum on the net. We have plenty of very knowledgable members so if you have any questions about your Land Rover or just want to connect with other Landy owners, you're in the right place.

    Registering is free and easy just click here, we hope to see you on the forums soon!

P38A tapping into BECM signals with an arduino

Discussion in 'Range Rover' started by TallPaulB, Aug 28, 2018.

< Previous Thread | Next Thread >
  1. TallPaulB

    TallPaulB Member

    Joined:
    Aug 16, 2018
    Posts:
    29
    Likes Received:
    5
    Location:
    Manchester, UK
    Hi All,

    I have a couple of projects I want to integrate into my 2001 P38, but doing so requires picking up some signals from the BECM. First off, I want to get access to the 'engine running' (C1279 pin 9) and lock / unlock (C1283 pin 8, 18) signals.

    I'll be using standard 3.3v GPIO on arduino shields or arduino compatible boards to read these.

    Has anyone done this sort of thing before? Just want to establish if it's doable, or if I'm doomed to failure / frying my BECM before I start.

    The outputs *I think* pull to ground when they trigger, so as long as I have a common ground between the arduino and the car I *should* be able to just watch for my inputs going low to detect a trigger. I'm not an expert on the electronic side of things though, so any advice on this would be appreciated!


    pinout information: https://www.rangerovers.net/repairdetails/becm/index.html
     
  2. wammers

    wammers STILL BREATHING. Donater

    Joined:
    Oct 19, 2008
    Posts:
    50,964
    Likes Received:
    6,665
    Location:
    Preston Lancs.
    What exactly are you hoping to achieve. My advice would be forget it.
     
  3. TallPaulB

    TallPaulB Member

    Joined:
    Aug 16, 2018
    Posts:
    29
    Likes Received:
    5
    Location:
    Manchester, UK
    To start with I want to trigger something (a powerfold mirror) when the door is locked / unlocked but only when the motor isn't running.

    Longer term I might build a web based dashboard showing engine status, road speed (this is available on one of the pins from the becm), alarm status etc. All this data is available as outputs from the becm, it's just a case of working out how to tap into those outputs.
     
  4. wammers

    wammers STILL BREATHING. Donater

    Joined:
    Oct 19, 2008
    Posts:
    50,964
    Likes Received:
    6,665
    Location:
    Preston Lancs.
    Well good luck with that. Can't quite see the point in it but if you do that is all that matters.
     
  5. Grrrrrr

    Grrrrrr Well-Known Member

    Joined:
    Jul 8, 2012
    Posts:
    9,434
    Likes Received:
    1,482
    Location:
    Buckinghamshire, UK. ('95 DT)
    Sounds like he is following down the same path Blackbox solutions went down in creating the Nanocom, although not sure you'd want all your car details (including secuirty codes) displayed over the web.

    You could just buy a Nanocom if you want to see the input/outputs. Or look at the Nanocom documentation but given how much work went into working it all out I doubt BBS will be particularly forthcoming. Given the age of the vehicle I expect there is little if any encryption. The BECM chips can be read straight off the chip with an appropriate reader. EPROM is it called? @martyuk knows how to do it. Rick-the-pick almost certainly knows. MrSporty might have had a play. Wouldn't surprise me if @pwood999 has had a play too.

    An Arduino can only handle 1 thread at a time? Each module is a separate unit so you'd need multiple threading to monitor all inputs at once. Crack that and put it on Android and you might have something people would pay a fiver for.
     
  6. Grrrrrr

    Grrrrrr Well-Known Member

    Joined:
    Jul 8, 2012
    Posts:
    9,434
    Likes Received:
    1,482
    Location:
    Buckinghamshire, UK. ('95 DT)
    Wouldn't a relay fed off the switched live for accessories be a better idea?
     
  7. TallPaulB

    TallPaulB Member

    Joined:
    Aug 16, 2018
    Posts:
    29
    Likes Received:
    5
    Location:
    Manchester, UK
    God no, I'm not going to do any reading of fault codes or anything, I just want to live monitor some of the signals coming out of the becm. The ones I'm interested in all appear to be 'pull to ground' type things, which are reasonably easy to monitor.

    Once I have the powerfold mirrors sorted, I'm going to start looking at things like sending me an email when the doors are unlocked. Ring my phone if I lock the car and the lights are still on (because I do this annoyingly often).

    It's more about stuff I can do for the sake of it, not things that are actually useful :D

    probably, but then I wouldn't be able to show off by folding my mirrors in as I walk away from the car.
     
  8. Datatek

    Datatek Well-Known Member

    Joined:
    Feb 5, 2009
    Posts:
    29,999
    Likes Received:
    592
    Location:
    Near Poitiers SW France
    If you have no electronics expertise, you would be well advised to stay away from the P38 electronics.
     
    kds likes this.
  9. tomcat59alan

    tomcat59alan Well-Known Member

    Joined:
    Apr 3, 2011
    Posts:
    10,006
    Likes Received:
    1,722
    Location:
    wirral and triquivijate
    I for one dont know what the feck your talking about and Why? :D
     
    Mark Piercy likes this.
  10. Mark Piercy

    Mark Piercy Well-Known Member

    Joined:
    Jul 11, 2016
    Posts:
    2,475
    Likes Received:
    535
    Location:
    sud ouest France
    Wow, im all for thinking outside the box.
    Just be careful you don't kill your pride and joy!!:eek:
     
  11. wammers

    wammers STILL BREATHING. Donater

    Joined:
    Oct 19, 2008
    Posts:
    50,964
    Likes Received:
    6,665
    Location:
    Preston Lancs.
    Sounds like you are playing with fire don't get your fingers burned.
     
  12. TallPaulB

    TallPaulB Member

    Joined:
    Aug 16, 2018
    Posts:
    29
    Likes Received:
    5
    Location:
    Manchester, UK
    Ha, I have a spare unlocked Becm sat on my desk so I should be okay if I manage to kill my current one. Pun intended :D
     
  13. wammers

    wammers STILL BREATHING. Donater

    Joined:
    Oct 19, 2008
    Posts:
    50,964
    Likes Received:
    6,665
    Location:
    Preston Lancs.
    As for the automatic phone call if you leave your lights on. Do you often walk away from the car with your eyes shut? Do you have a BBS MSV2 or a Nanocom to input the fob code with on your unlocked BECM. Anyhow fiddle away it's your car. ;):D:D
     
  14. martyuk

    martyuk Well-Known Member

    Joined:
    Aug 31, 2012
    Posts:
    702
    Likes Received:
    224
    Location:
    Swindon, UK
    OK, I'll try and provide something more than discouragement....

    Arduinos are great for all kinds of things - the only thing to look out for between P38 and Arduino is that the P38 logic levels for most things go from between VBatt (12V ish) and ground. Arduinos usually use 5V logic (the one's i'm playing with for other things will do 5V on an analog or digital pin) and generally can only sink about 20mA MAX on an input pin.

    So if you are wanting to tap off a feed into the BECM, then I would recommend doing it through a voltage divider with resistors and making sure that the current into the arduino pin is limited to 20mA max.

    You should then be able to read the signals on a digital pin on the arduino as a digital 0 or 1 depending on whether it's high or low.

    Shouldn't damage the BECM at all, as it's got input protection on most of the inputs anyway - and you're more likely to damage the BECM by trying to feed something into it, than tap off an input line to read the status of it.

    Hope this helps,
    Marty
     
    Grrrrrr likes this.
  15. Mark Piercy

    Mark Piercy Well-Known Member

    Joined:
    Jul 11, 2016
    Posts:
    2,475
    Likes Received:
    535
    Location:
    sud ouest France
    Now there's two of them at it!!!:eek::p
     
  16. TallPaulB

    TallPaulB Member

    Joined:
    Aug 16, 2018
    Posts:
    29
    Likes Received:
    5
    Location:
    Manchester, UK
    Cheers @martyuk!

    I do have a bit of electronics experience, built a few microcontroller things in my time so not really worried about the mysteries of the becm (famous last words before frying it)

    Like you say, I'm much more likely to fry my arduino type things, but they're cheap as chips these days so not a massive problem.
     
  17. martyuk

    martyuk Well-Known Member

    Joined:
    Aug 31, 2012
    Posts:
    702
    Likes Received:
    224
    Location:
    Swindon, UK
    Indeed - I've got various arduinos from different projects - been recently playing with one and a pressure transducer to be able to give a digital readout of air pressure. Thoughts have been had on using it on the RR, but at the moment, I'm looking at making it into a valve block test rig, so once I've refurbed one with new O-rings, I can pressurise it all and see if there are any leakdowns for various places.

    The BECM is pretty robust - unless you do something crazy like short things out or get the polarity wrong on the power feeds... :)
     
  18. pwood999

    pwood999 Well-Known Member

    Joined:
    Nov 6, 2006
    Posts:
    716
    Likes Received:
    144
    Location:
    Near Heathrow.
    out of interest, what "power fold mirrors" are you gonna use ? Didn't know there are any that fit a P38 ?
     
  19. pete12345

    pete12345 Active Member

    Joined:
    Jun 15, 2012
    Posts:
    729
    Likes Received:
    48
    Location:
    Isle Sheppy
    I’ve got them on my old girl u close the door fold the mirror in and walk away job done
     
    tomcat59alan, Mark Piercy and Grrrrrr like this.
  20. wammers

    wammers STILL BREATHING. Donater

    Joined:
    Oct 19, 2008
    Posts:
    50,964
    Likes Received:
    6,665
    Location:
    Preston Lancs.
    Now you're being pedantic. :D:D
     
    Mark Piercy likes this.
< Previous Thread | Next Thread >