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

Open Vehicle Monitoring System

Discussion in 'Tesla Parts for Sale' started by markwj, Oct 22, 2011.

  1. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Why?

    We are a group of enthusiasts who want an interface to be able to talk to our cars remotely, perhaps add on-car displays (such as heads-up speed), and we want to have fun doing it.

    What is it?

    The Open Vehicle Monitoring System is three things:

    1. A low-cost module that fits in the car. It is powered by the car, talks to the car on the CAN bus, and uses the GSM cellular network to talk to its user.
    2. A server. The car module can be configured to either talk to the server (via UDP/IP or TCP/IP over the Internet) or the user directly (via SMS).
    3. A cellphone App. This talks to the server (via TCP/IP HTTP protocol) to retrieve messages from the car and issue instructions.

    Part [1] is all that is required. You can use a cellphone and SMS messages to talk to the App. It requires a SMS messaging plan on the SIM card in the GSM modem in the car.

    Parts [2] and [3] provide a much more seamless and powerful experience, but are optional. It requires a small data plan on the SIM card in the GSM modem in the car.

    Even if you choose [2]+[3], you can still use [1] as well (for initial setup as well as ongoing on-demand).

    The Car Module

    The car module is the hard part. We require an extremely reliable and low-power module to fit in the car. While it is relatively simple for a hobbyist to create one of these, the hard part is making a common platform that a group of hobbyists can get behind, and to make it very high quality. Home-soldered connections and US$100k electric cars don't go well together.

    What we've done is take the foundational work done by fuzzy logic and others, to build a base platform module. We've then negotiated with factories in China (we live just over the border in Hong Kong) to get this professionally built.

    The module plugs into the car DIAG port, which provides both power and a CAN bus connection that the module can transmit/receive messages on.

    The platform itself is based on a PIC18F2680 processor and SIMCOM GSM module. Factory built and assembled, but based on an open source extendable architecture. You can either buy these modules pre-built, or build your own. Any profits on the sale of hardware will got to charity.

    The SIMCOM GSM module has the ability to send/receive SMS messages, as well as a built-in IP stack for GPRS communication. It allows the module to talk both communication protocols with very little PIC software required. We decided to use these modules (rather than USB modems) for reliability reasons, as well as the SIMCOM built-in support for IP protocol.

    The attached picture show the initial prototype we worked with. The square board is the prototype CPU + CAN controller based on Fuzzylogic's design. This is a rough proof-of-concept prototype, but you can see the quality of factory production we're getting.

    OVMS_CAN_CPU.png

    The final version re-works the CPU+CAN board to be rectangular and fit as a plug-in piggy-back on the SIMCOM module we've sourced. We've also re-worked the board layout to separate the CAN bus across a cicuit-board divide (to keep the CAN signals very simple and physically separated from the rest of the components). In the final version, we also extend the unused I/O pins of the CPU out on expansion pins (to allow for such things as in-vehicle displays). It all fits in a small case, is extremely low power, and has two LEDs for diagnostics and a windscreen / rear window stick-on GSM antenna for optimal reception. Overall, the design is very elegant and extremely robust.

    The in-car module can be configured to just be a passive listener on the CAN bus, but can also be an active participant and transmit control messages onto the bus. It can even just relay CAN bus messages over the Internet to the Server/App. It is very flexible and has enough RAM and ROM to do some interesting things.

    Users can either follow the schematics to build their own compatible boards, or buy them pre-made from us. We expect to be able to charge just US$99+shipping for pre-assembled in-car modules (the CPU+CAN controller module, SIMCOM GSM module, car DIAG cable, housing box and GSM antenna). This is a non-profit endeavor, with any profits inadvertently made being donated to charity.

    The Server

    The server is a simple open source server which talks two protocols - one to the car and the other to the cellphone App.

    The car protocol is built on UDP using encrypted communication packets. Two passwords are used - one to talk to the server and the other to talk to the App.

    If the car module wants to send a message to the server, it uses the first password. Once the server receives the message, it can decrypt and act on the instruction contained. Communications of this type are used for network registration and PUSH notification messages to Apple/Android phones, or other alerts.

    If the car module wants to send a message to the user, it uses the second password. The server has no ability to decrypt such messages, so merely passes them on to the cellphone App transparently. The cellphone App itself decrypts and acts on the message. In this way, as only the car module and cellphone App have the password, the server has no way to spy/eavesdrop on these messages. Communications of this type are used for such things as car GPS location updates.

    The server also includes a web interface for basic functions such as setting the password, registering the car and checking status.

    The CellPhone App

    The API to the car and the server is open and will be published. Anyone can write to it, and we hope they will.

    Initially, we intend to release a standard iPhone and Android App, but anyone is welcome to follow the API and write their own. A screen shot of the prototype iPhone App we are working on is attached.

    OVMS_iPhone_ScreenPrototype.png

    Open Source

    The entire project will be open source - from the hardware schematics to the APIs to the car and server firmware. We will be loading up what we have onto github within the coming few weeks.

    The purpose of this project is to get the community of Tesla, and other, tinkerers to be able to expand the project. We can't do it all, and there is so much to do. What we are doing is providing an affordable and flexible base that the community can work on and extend.

    Everything is open, and APIs are public. Other car modules can talk to the server, and other Apps can show the status and control the car. This will be a foundation that will hope others will interface to and and build upon.

    When will it be ready?

    We have been working hard on this for the past couple of months. Initial prototypes have been made and tested; and we are very happy with the choice of factory and their work. The hardware design is now being finalized and we will soon be ready to start the first production run. If there is sufficient interest, final hardware will be available within the next two-to-three weeks. If we can't get sufficient interest, we'll just build it for ourselves and not worry about the larger community.

    How does it compare to the Tesla Tattler?

    The Tattler will be an off-the-shelf product offering a purely-SMS controlled solution to controlling roadster charging (as well as other such functions). It is built on some fairly sophisticated hardware and requires no user 'tinkering' to get it working. From our understanding, you just plug it in and play. It connects to the car in the same way as OVMS, but the cellular modem is very different.

    This project is as an open-source extensible framework based on SMS and UDP/IP control, for enthusiasts. It is designed to be controlled by SMS, websites and/or cellphone Apps.

    Thanks

    So many people to thank. W.Petefish for sourcing the car connector, Fuzzylogic for the original hardware and software design and demonstration of it working, Scott451 for figuring out many of the Roadster CAN bus messages, and many others for showing that this kind of thing can work in the real world.

    Please help us by answering the survey, so we can gauge interest. Any questions? Ask away...

    Thanks,
    markwj and foxium.
     
  2. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    An update:

    Thanks for all the responses. We're particularly grateful for all the offers to help out.

    Due to restrictions in the forum software, we can't see the names / logins of those who responded with what, but the numbers are OK for the first build. Accordingly, we are proceeding with the first factory run (and hoping the numbers go up when the modules are actually available) and should have hardware within 2-to-3 weeks.

    Next steps:

    For those interested in helping with development, please PM me so that we can get the details out to you and find out who can help with what. We'll also add you on to the reservation list for the first batch of modules.

    For those who just just want a module in their car, please also PM me to get on the reservation list for the first batch of modules (which will be limited quantity).

    We expect to have the code up on github, and the server API available, sometime early next week. The clients can then be written to that, and more eyes can go through the code.

    Thanks,
    markwj and foxium.
     
  3. Lloyd

    Lloyd Active Member

    Joined:
    Jan 12, 2011
    Messages:
    4,883
    Location:
    San Luis Obispo, CA
    How does this compare to Tesla's application that was demonstrated at the Beta event? Is not much of what you are trying to accomplish as well as the hardware already in the model S and already done by Tesla, or are you building specifically a Roadster device?
     
  4. efusco

    efusco Moderator - Model S & X forums

    Joined:
    Mar 29, 2009
    Messages:
    4,585
    Location:
    Nixa, Missouri, United States
    This seems to only duplicate what Tesla is already doing/planning for the Model S. What features would your product add that would make me consider spending extra money for it?
     
  5. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Our current focus is on the Tesla Roadster, as it doesn't have any remote monitoring/alerting ability. There are also other EVs in a similar situation.

    But, our hopes go much further. If you use the manufacturer's system, you get what they give you and have no ability to extend it or do it another way. Even the Leaf with its extensive Carwings system doesn't expose battery SOC% to the user.

    What we are trying to build is an open base that can be extended by enthusiasts. Given the right firmware, it should work in any car with a can bus. It is obviously most applicable to cars with no remote monitoring/alerting ability.
     
  6. kgb

    kgb Member

    Joined:
    Sep 22, 2009
    Messages:
    605
    Location:
    Houston, TX
    I am interested in these solutions, but I guess it depends on how much it will be.
     
  7. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    We're estimating US$99+shipping for the enthusiast-level hardware. Non-profit, any inadvertent profits going to charity. Software is open source.
     
  8. doug

    doug Administrator / Head Moderator

    Joined:
    Nov 28, 2006
    Messages:
    15,912
    Location:
    Stanford, California
    If you're talking about the poll, it has to do with the settings you choose as you set it up.
     
  9. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Doug, yes about the poll. Any way I can see who (ie; usernames) voted for what?
     
  10. dsm363

    dsm363 Roadster + Sig Model S

    Joined:
    May 17, 2009
    Messages:
    18,235
    Location:
    Las Vegas, NV
    I don't know if you can change a current poll but you can create a new one. There is a box you check to make the votes public.
     
  11. W.Petefish

    W.Petefish Active Member

    Joined:
    Apr 29, 2011
    Messages:
    1,059
    Location:
    North Texas (DFW)
    Mark,

    You have my support. I can also help with alpha and beta testing of an Android app.

    -W
     
  12. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    I've opened a separate thread for technical discussions and progress on the technical side of the OVMS used in Tesla Roadster.

    The technical discussion thread is at Open Vehicle Monitor System (OVMS) - Technical Discussion

    We've now published the github code repository for this project. The master branch is at:

    markwj/Open-Vehicle-Monitoring-System - GitHub

    So far, today, we've uploaded the vehicle code (in vehicle/OVMS.X - a PIC MP Lab X project), hardware module wiring schematics (in vehicle/Car Module), and common artwork for the Apps (in apps/artwork).

    Several people have already let me know that they want to help out with development, and that is most appreciated. I really hope we can build a community around this. The steps to help out are (a) create a free github account (if you don't have one already), (b) pull the code, (c) github 'watch' the project, (d) fork the project if you want to work on a branch, or let me know your github username if you want to be a collaborator and need write access to the master repository, or just send me patches/fixes/extensions for merging into mainline. It would also be helpful if you could PM me your TMC forum username and eMail address so we can keep in touch.

    A final note: the hardware is coming ;-) We've in final sample stage at the moment, and the factory should start production of the first batch of hardware modules real soon. We're just working through the logistics of how you can actually purchase it and get it shipped safely.

    Thanks, Mark.
     
  13. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    A short note to let you know where we are.

    We first posted here about a month ago, and in that time:

    • The car firmware is pretty much done and available on the github page. The firmware is running in the test cars, and is looking good. The car is controllable either via SMS or encrypted TCP/IP link (over GPRS) to the server. We've also completed the work on analysis of the CAN bus, and have access to things like UNLOCK/LOCK, TPMS, door status, etc.
    • The server software is also working and communicates securely (over an encrypted TCP/IP link) with both the car and the apps. The first public server is available at Open Vehicle Systems. The only thing missing is the iPhone PUSH notification integration, which should come over the next few days.
    • Progress on the first App (designed for the iPhone) is ongoing and close to completion. We have car status and location showing nicely, and just have to complete the PUSH notification and car configuration systems. Again, the code is on github, publicly available.

    Factory production of the hardware has been troublesome, but all issues are now resolved and production hardware should be available for shipping to developers next week. We'll contact those of you who have let us know you are interested, and post details here, as soon as we know the logistics.

    At the moment we're concentrating on getting the hardware, firmware and server into developers hands. The initial release of this will be for those who 'know what they are doing' and can program a PIC chip (or know someone who is willing to help them with this). Once things have settled down, we'll cut a stable version of the firmware that can be used by anybody.
     
  14. kgb

    kgb Member

    Joined:
    Sep 22, 2009
    Messages:
    605
    Location:
    Houston, TX
    At that price point, I am interested. I see that you are getting close, I will keep an eye out for it.
     
  15. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    #15 markwj, Dec 1, 2011
    Last edited: Dec 1, 2011
    Want to participate in the testing of the first Tesla Roadster iPhone App?

    The OVMS iPhone App has been largely completed, and has now entered testing phase. Even if you don't have the car hardware yet (as most don't), you can still get the App and try it with the DEMO car provided.

    Requirements are:
    • Apple iOS device (iPhone, iPod Touch or iPad)
    • iOS version 5.0 (or later)

    We're using a system called testflight to distribute the testing builds:

    TestFlight iOS beta testing on the fly

    At the moment, the App is fairly minimal. It lets you see the battery and charging status, the car's location, and works with as many cars as you have access to. It supports push notifications (both in the App as well as outside using Apple's Notification Centre).

    If you would like to participate in the testing of this App, make sure you meet the minimum requirements (primarily an Apple device running iOS v5), then follow the above link to sign up for testflight. It is free.

    photo 1.PNG photo 5.PNG photo 2.PNG photo 3.PNG photo 4.PNG
     
  16. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    A (hopefully) final status update before v1.0 release:

    • The car firmware is pretty much done. We've ended up using about 40% of flash and 50% of RAM, so we have room for expansion. Stability seems ok, and since finalising the antenna arrangements, the reception is excellent. The car is controllable either via SMS or encrypted TCP/IP link (over GPRS) to the server. In the case of TCP/IP link, paranoid mode is now supported (so that the messages can be optionally encrypted so that not even the server can read them - only the App and the Car share the paranoid password).
    • The server software is also working and communicates securely (over an encrypted TCP/IP link) with both the car and the apps. It acts as a store-and-forward hub for both normal and paranoid mode messages between the cars and the apps. The first public server is available at Open Vehicle Systems. PUSH notification for Apple iOS Apps is now working well.
    • The Apple iOS App is pretty much done. It support iPhones, iPod Touches and iPads running iOS v5.0 (or later) (although the iPad interface is very klunky). A separate post has been made detailing how you can get this now if you want to try it (to see what it looks like). PUSH notifications are working well (both in and out of the App).
    • Work on the Android App is coming along well. Basic functions are working well, and we hope to have this to a similar level of polish as the iPhone App within the new few days. Push notifications (via Androids C2DM service available in Android v2.2 and later) are in progress, and extensions to the server will be made to support this in the same timeframe.

    The car firmware, server software and iOS App are all available on github now. The Android App should follow over the weekend.

    Factory production of the hardware has been troublesome, but all issues are now resolved. We've got the first few units in our hands, and the factory is now finalising the first batch. We're about to announce the availability of production hardware to developers and will contact those of you who have let us know you are interested, and post details here, as soon as we know the logistics.

    At the moment we're concentrating on getting the hardware, firmware and server into developers hands. The initial release of this will be for those who 'know what they are doing' and can program a PIC chip (or know someone who is willing to help them with this). Once things have settled down, we'll cut a stable version of the firmware that can be used by anybody.
     
  17. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    v1 in-car-module pictures

    Here are some snapshots of the V1 in-car-module. Design is finalized, and in production now. Only change on production version (vs these) is some re-arrangement of the connector orientation and case holes.

    The CPU board. Based on a PIC microprocessor, the board includes CPU (ram+flash), power regulator, async line driver and CAN interface. We've spent some time working on the CAN interface design to isolate the can bus from the rest of the board as much as possible. You can see about 1/3rd of the board is completely bare with a white line that the can controller and power supply chips bridge. The blank side of the line is the CAN bus side and has as little as possible on it.

    v1-cpuboard-2.jpg v1-cpuboard-3.jpg v1-cpuboard-4.jpg

    The MODEM board. Based on a SIMCOM SIM900 modem (with built-in IP stack). This is a very high quality GSM/GPRS modem. The design is based on an existing SIMCOM development board. Working with the factory, we've modified it to our needs, including arrangements for the CPU board to piggy-back on to it. We've left the debug ASYNC port and microphone/audio connectors in place, as those might be useful in future (or for other projects).

    v1-modemboard-1.jpg v1-modemboard-2.jpg v1-modemboard-3.jpg

    The two boards mated. As you can see, they mate together in a very sturdy piggy-back arrangement.

    v1-twoboards-4.jpg v1-twoboards-5.jpg v1-twoboards-6.jpg

    The box. The box is a pretty standard rectangular housing.

    v1-box-1.jpg v1-box-2.jpg

    We've got lots of expansion here. We've brought out the unused pins from the CPU to allow extra modules to be connected in future. A microchip-standard 6pin connector is also there for in-circuit programming.
     
  18. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Antenna arrangement

    We found that the short stubby antennas found on most USB modems were just not good enough (particularly when placed in the passenger footwell of the car). Mounting the box behind the passenger/driver seat is a possibility, but requires laying cable and makes the whole unit vulnerable to theft.

    The solution we found is a short flat adhesive antenna specifically designed for in-vehicle applications. The cable runs through the fuse box area of the car, and down to the passenger foot-well. It is not too difficult to lay this (once you know how).

    v1-antenna-4.jpg

    Of course, you can decide for yourself where to put this, but in the lower corner of the windscreen it is fairly unobtrusive and the cellular signal using this is dramatically better than the stubby little antennas we were using before.

    v1-antenna-2.jpg v1-antenna-3.jpg

    P.S. Sorry for the lousy picture quality.
     
  19. foxium

    foxium Member

    Joined:
    Jun 19, 2011
    Messages:
    39
    Location:
    Hong Kong
    #19 foxium, Dec 3, 2011
    Last edited: Dec 5, 2011
    Android App alpha

    Here comes the OVMS Android app. :smile:

    Just like Mark's iOS app, even if you don't have the car hardware, you can still get the App and try it with the DEMO car provided.

    Requirements (for this beta) are:
    1. Screen with WVGA (800 x 480) or higher resolution (future release will support lower res screens)
    2. Android OS 2.3.3 or higher (future release supports Android 2.2+)

    This app uses the Internet Access permission only.

    Changelog:
    20111205: Fixed landscape layout. Fixed Paranoid Mode communication bugs. Added "Clear Notifications" in menu to purge all notifications.
    20111204: Added notifications tab. All received C2DM notifications are archived there. Notifications remove themselves from the status bar after clicking. Added "Quit" in menu.
    20111203: Initial release

    Like Mark's iOS release, this app lets you see the battery and charging status, the car's location, and works with as many cars as you have access to. It supports push notifications via Google's C2DM. Notifications show up in the status bar even when the app is not running.

    To install the beta app, please ensure the option "Unknown Sources" is enabled in Settings > Applications.
     

    Attached Files:

  20. markwj

    markwj Moderator, Asia Pacific

    Joined:
    Apr 10, 2011
    Messages:
    3,655
    Location:
    Hong Kong
    Brilliant!

    So, if the iPhone App took about 14 days, the Android App about 7 days, who is brave enough to step up and do a (cr|bl)ackberry App?
     

Share This Page