TMC is an independent, primarily volunteer organization that relies on ad revenue to cover its operating costs. Please consider whitelisting TMC on your ad blocker or making a Paypal contribution here: paypal.me/SupportTMC

Roadster Charge Monitor (DIY cell phone app/hardware)

Discussion in 'Roadster: Technical' started by Fuzzylogic, Aug 24, 2011.

  1. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    #1 Fuzzylogic, Aug 24, 2011
    Last edited: Aug 26, 2011
    Roadster Charge Monitor V 0.3

    The first version was discussed here:
    iPhone app

    But as i created a new version, and rewrote it in C (by popular demand :wink:), i thought it should have it's own thread.

    What is it?
    The Roadster Charge monitor is a DIY hardware/software project, which will send status messages from your car.
    If a charge is interrupted or if your car is fully charged you will receive a SMS message instantly.
    You can request the current SOC (state of charge), Ideal Range and charge mode, by calling the unit's phone number or sending a command.

    The following SMS commands are accepted by the unit:

    STAT <password>, send SMS message about charge status; same as dialing RCM with registered phone.
    GPS <password>, send google maps map with location of roadster.
    REGISTER <password>, register phone number as owner.
    PASS <new password>, change password (only works for registered phone)

    Password is mandatory for unregistered phones, not needed for registered phone.
    default password is "roadster". passwords/commands are not case sensitive.

    The project can be downloaded here

    Thanks go out to Scott451 for figuring out many of the Roadster CAN bus messages used by the RCM, and the pinout of the CAN bus socket in the Roadster.
    see: iPhone app

    some screenshots:
    RCMss1.png

    RCMss2.png

    RCMss3.png
     
  2. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    17,252
    Location:
    Silicon Valley
  3. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    This is a DIY solution to basically the same problem, is my car still charging?
    It's based on a Microchip PIC microcontroller, with build in CAN interface, and a few extra components. It uses the same GPRS modem the Tattler uses (with the same problems) but modified, as i need to bypass the USB port of the modem.

    RCM_mainpcb.jpg

    As i see it, the Tattler is much more advanced, and can in theory do much more.
    The RCM just gives you the most important stuff (charging status messages, GPS location) and if you know how, you can build one yourself.
    I have no intention to sell pre-build units.

    I don't really see the tattler as competition, i have created this for myself, and sharing it to the world. I know a few members of this forum who already build their own version.
    But ofcourse without scott explaining the most important CAN bus messages, this project would have never started.
     
  4. TEG

    TEG TMC Moderator

    Joined:
    Aug 20, 2006
    Messages:
    17,252
    Location:
    Silicon Valley
    Thanks. Makes sense.
     
  5. S-2000 Roadster

    Joined:
    Apr 10, 2009
    Messages:
    636
    I could not open the .rar file on my Mac. Can you provide a .zip file? If you need server space, I'll even host the .zip file for you.
     
  6. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    Sure, here it is: RCM_v03.zip
     
  7. hcsharp

    hcsharp Active Member

    Joined:
    Jun 7, 2011
    Messages:
    2,535
    Location:
    Vermont
    Fuzzy thank you for this! It's nice to have some open source to start with for those of us who will build our own apps down the road. Too busy to help right now but will in the future. Thanks.
     
  8. S-2000 Roadster

    Joined:
    Apr 10, 2009
    Messages:
    636
    Thanks! ... and nicely done, sir.

    By the way, I notice that you're using an external comparator chip. Some of the PIC models have built-in comparators, so I wonder if there might be a way to take advantage of that.
     
  9. scott451

    scott451 KWH-PWR#1349Sprt,S Sig#96

    Joined:
    Apr 2, 2009
    Messages:
    251
    Location:
    Palo Alto
    #9 scott451, Aug 26, 2011
    Last edited: Aug 26, 2011
    Nice work! -- a good start for folks who want to roll their own.
     
  10. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    Hi Scott,

    I'm Sorry, i assumed everyone here knew you figured out many of the CAN bus messages, but now that this project has it's own thread, i guess it's not that clear any more.
    It was never my intention to ignore all the hard work you have done, and don't give you any credit for it.

    I just updated the source, readme file, and start post.

    -Michael
     
  11. Fuzzylogic

    Fuzzylogic EU Sport 359 & S94

    Joined:
    Jun 23, 2009
    Messages:
    336
    Location:
    The Netherlands
    Yes, the PIC18F2580 also has two comparators and a voltage reference module, so in theory it should be possible to remove the MAX942 and the resistors.
     
  12. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,661
    Location:
    Hong Kong
    To try to open this up to a wider community, myself and a group of enthusiasts are working on making something like this into a standard base platform, and building a server and iPhone/Android Apps (using a SIMCOM SIM900 module to provide the comms framework over the public Internet).

    We've posted some details up at:
    Open Vehicle Monitoring System

    Thanks to Scott, Fuzzylogic, and others for all their contributions to this. A Tesla-approved iPhone App (using the built-in GSM modem they already have in the 2.x cars) would be the best, but without that the community can step forward to build it ourselves. We feel that with the openness of that community we will eventually end up with something much better than Tesla, or others, could offer.

    If anyone is interested in participating, please comment / vote there, and/or PM me.
     

Share This Page