Elbilforum.no

Bilmerker => Tidlige elbiler: Think => "Nye" TH!NK City produsert fra 2008 - 2012 => Emne startet av: BauDemo på onsdag 19. desember 2012, klokken 16:09

Tittel: OVMS for Think
Skrevet av: BauDemoonsdag 19. desember 2012, klokken 16:09
I just ordered an OVMS unit and plan to make it compatible with the Think.

More info on OVMS: http://www.openvehicles.com/node/32 (http://www.openvehicles.com/node/32)

It is currently used on Tesla Roadster, but the software is open source and should be possible to adapt to work with the Think.

I purchased it from here:
http://www.fasttech.com/products/0/10000001/1000300-ovms-car-module-v2

For those of you that have RAC module in the car that does not work, you can replace it with this and use the existing antennas (GPS and GPRS)...

Anyone up for this project?

Edit:
Link to video of the iphone app:
http://www.youtube.com/watch?v=CSh-Mdf-QKo
http://www.youtube.com/watch?v=v1oGXYngI3c
Tittel: Sv: OVMS for Think
Skrevet av: Lynetonsdag 19. desember 2012, klokken 18:42
Jeg er med :D
Tittel: Sv: OVMS for Think
Skrevet av: elektroluxonsdag 19. desember 2012, klokken 19:01
I don't quite see what this can do, but anything that gives more driver info interests me.

I'm in.
Tittel: Sv: OVMS for Think
Skrevet av: Lynetonsdag 02. januar 2013, klokken 16:16
Har du fått OVMS i løpet av jula BauDemo? Må si at jeg er skikkelig spent på dette  :D
Tittel: Sv: OVMS for Think
Skrevet av: BauDemoonsdag 02. januar 2013, klokken 20:05
Yes, I got it and I have started coding. I had some problems, but I am up and running now. Today I got my first response from the car - and it was only SOC, and then it turn out I had the wrong bytes... so there is still some work to be done.
It is very cool!!
Tittel: Sv: OVMS for Think
Skrevet av: BauDemosøndag 06. januar 2013, klokken 09:37
Screenshot of sms communication.
Tittel: Sv: OVMS for Think
Skrevet av: Lynetsøndag 06. januar 2013, klokken 11:54
Kjempebra  :D
Dette blir spennende.
Tittel: Sv: OVMS for Think
Skrevet av: jahnarnetirsdag 08. januar 2013, klokken 21:27
Superspennende. Jeg har bestilt og venter på OVMSen. Har fått Pictprogrammerer.
Tittel: Sv: OVMS for Think
Skrevet av: BauDemotirsdag 08. januar 2013, klokken 23:03
Great! I could really use some testing help, and feedback.
Did you order the antennas?
If not you may want to try the built-in antennas that are (or should be) there for the RAC unit. I found a supplier for an adapter from the plugs for the RAC to the plugs on the OVMS.
Tittel: Sv: OVMS for Think
Skrevet av: jahnarneonsdag 09. januar 2013, klokken 08:44
Bestilte med antenner ja. Har en 2011-modell, så ingen RAC. :)
Tittel: Sv: OVMS for Think
Skrevet av: BauDemoonsdag 09. januar 2013, klokken 11:14
Are you sure that the wiring harness and the gprs/gsm antennas are not installed anyhow?

Sitat fra: jahnarne på onsdag 09. januar 2013, klokken 08:44
Bestilte med antenner ja. Har en 2011-modell, så ingen RAC. :)
Tittel: Sv: OVMS for Think
Skrevet av: Go-carteronsdag 09. januar 2013, klokken 20:08
Sitat fra: BauDemo på onsdag 09. januar 2013, klokken 11:14
Are you sure that the wiring harness and the gprs/gsm antennas are not installed anyhow?

Sitat fra: jahnarne på onsdag 09. januar 2013, klokken 08:44
Bestilte med antenner ja. Har en 2011-modell, så ingen RAC. :)

Mostly only the 2008 models, and the pre-production ones that got this. I have a complete cable loom with the RAC-wires, and antenna from my racing-think.
Tittel: Sv: OVMS for Think
Skrevet av: BauDemoonsdag 09. januar 2013, klokken 23:05
Sitat fra: Go-carter på onsdag 09. januar 2013, klokken 20:08
Mostly only the 2008 models, and the pre-production ones that got this. I have a complete cable loom with the RAC-wires, and antenna from my racing-think.

Interesting... have you worked for Think, and seen this or other source? I am asking because I am looking at 3 Thinks from 2009, Norway VIN up to 153, that have the antennas, wiring and RAC... But maybe these are special?
Tittel: Sv: OVMS for Think
Skrevet av: Lynettorsdag 10. januar 2013, klokken 11:52
Jeg har 2009 modell 5017, den har RAC og GPS-antenne.

Airbaglampe lyser så jeg ser frem til å få ut RAC og inn med OVMS.
Tittel: Sv: OVMS for Think
Skrevet av: Go-cartertorsdag 10. januar 2013, klokken 12:17
Sitat fra: BauDemo på onsdag 09. januar 2013, klokken 23:05
Sitat fra: Go-carter på onsdag 09. januar 2013, klokken 20:08
Mostly only the 2008 models, and the pre-production ones that got this. I have a complete cable loom with the RAC-wires, and antenna from my racing-think.

Interesting... have you worked for Think, and seen this or other source? I am asking because I am looking at 3 Thinks from 2009, Norway VIN up to 153, that have the antennas, wiring and RAC... But maybe these are special?

Naaah, I was just guessing. But seems as I guessed wrong :) My racing-think has a 5xxx VIN-number as well, so it isnt a pre-production model.
Tittel: Sv: OVMS for Think
Skrevet av: Lynetfredag 11. januar 2013, klokken 16:47
Så vidt jeg forstår kobles OVMS rett inn på CAN-bussen. Hva da med inn og utgangene som går rett inn på RAC?
Hvordan løses det på OVMS, har den ekstra inn- og utganger som kan konfigureres?

Tror airbaglampa styres via CAN-bus til RAC som igjen sender et signal til kontrollampeboksen.
Tittel: Sv: OVMS for Think
Skrevet av: BauDemofredag 11. januar 2013, klokken 17:58
Sitat fra: Lynet på fredag 11. januar 2013, klokken 16:47
Så vidt jeg forstår kobles OVMS rett inn på CAN-bussen. Hva da med inn og utgangene som går rett inn på RAC?
Hvordan løses det på OVMS, har den ekstra inn- og utganger som kan konfigureres?

Tror airbaglampa styres via CAN-bus til RAC som igjen sender et signal til kontrollampeboksen.

OVMS does not have extra in/out pins exposed. There are some pins on the PCB though that could be used for airbaglight function, but this is something I decided not to do.

I considered carefully and then I made a separate box that I call airbaglamp ecu. It just plugs in the place of the RAC unit and reenables the airbag lamp function as it was designed - when there is a problem with the airbag or related (pretensioners, etc) the lamp will turn on.

This airbaglamp ecu uses automotive grade MCU and takes care of only this particular function.
Installation is plug and play - takes max 15 min, and the most time consuming part is disconnecting the connector from the RAC unit. The RAC unit does not need to be removed.

I can sell airbaglamp ecu for around 3700 NOK.

Tittel: Sv: OVMS for Think
Skrevet av: Lynetsøndag 13. januar 2013, klokken 23:24
Hmmm, 3700,- for å få slukket lampa!! Da trur jeg at jeg bruker et annet alternativ: ta ut pæra  8)
Det er jo bare å lese ut eventuelle feilkoder med ujevne mellomrom  :D
(ingen feilkoder nå, selv om lampa lyser....)
Tittel: Sv: OVMS for Think
Skrevet av: elektroluxmandag 14. januar 2013, klokken 05:07
I Sverige er det ikke så enkelt. Fungerer ikke lampen slik den skal, blir bilen avskiltet. Da er plutselig 3700 kr som småpenger å regne.

Og da er det godt å ha kapasiteter som Nicolay som kan gjenopprette riktig funksjon på disse kretsene. ;)
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 14. januar 2013, klokken 12:32
Sitat fra: BauDemo på fredag 11. januar 2013, klokken 17:58
I considered carefully and then I made a separate box that I call airbaglamp ecu. It just plugs in the place of the RAC unit and reenables the airbag lamp function as it was designed - when there is a problem with the airbag or related (pretensioners, etc) the lamp will turn on.

I can sell airbaglamp ecu for around 3700 NOK.
From an isolated point of view the price seems quite high.
On the other hand, I know you have put a lot of effort in the project. The hw-components are also very expensive (especially when doing prototyping or low volume production), so taken to consideration that this is the only product on the marked which solves this critical issue, it's probably a fair price.
Tittel: Sv: OVMS for Think
Skrevet av: Lynetmandag 14. januar 2013, klokken 15:11
I den Norske utgaven av EU-kontroll er ikke airbag nevnt. Airbag er et viktig sikkerhetstiltak for å redusere skader, men er ikke påbudt. Og om lampen lyser på Thinken er det ikke airbagsystemet som har feil, det er RAC som har hengt seg opp.
Det er ikke ment som kritikk av BauDemo at fiksen koster 3700,- men for min del blir det uaktuelt å bruke så mye for å få slukket pæra.
Har full forståelse for at hardware koster, og jeg har full forståelse for at BauDemo vil ha litt igjen for alt arbeidet han legger ned på Thinken.

Bruker heller noen tusenlapperpå OVMS  :D
Tittel: Sv: OVMS for Think
Skrevet av: BauDemomandag 14. januar 2013, klokken 15:24
This is really off-topic, and maybe we should create a new thread if you want to discuss price and functions in the airbaglamp ecu.

I do not mean to defend the price I set - and I fully understand if you someone wants to choose a different strategy to solving the problem - timer, short, connecting to another lamp just to name a few. None of these was a something I would be comfortable with in my car... so here is the solution, again, for myself. I would have paid that price for that function if such device existed.

The hardware is the cheapest part of this project - the price I set barely covers the assembly and parts procurement time. If I have to calculate research and development time and cost, it would probably end up costing 25 000 kr. This was made for my personal use and I just mentioned that I can provide a limited quantity to anyone willing to part with this amount of money.

Back to topic - how many have ordered ovms?
Tittel: Sv: OVMS for Think
Skrevet av: Lynettirsdag 15. januar 2013, klokken 21:05
Sitat fra: BauDemo på mandag 14. januar 2013, klokken 15:24
Back to topic - how many have ordered ovms?

OVMS bestiller jeg så snart vi får vite om du er rimelig sikker på at det går an å lage program for Think City, og hvilke funksjoner som det blir mulig å legge inn.
Men hvis det er ønskelig at flere bestiller for testing så bestiller jeg.
Tittel: Sv: OVMS for Think
Skrevet av: jahnarneonsdag 23. januar 2013, klokken 19:25
Sitat fra: BauDemo på mandag 14. januar 2013, klokken 15:24
Back to topic - how many have ordered ovms?
Da er OVMSen og SIM-kort på plass. Ser for meg å montere den med GPS og mobilantenne i Thinken til helgen.

BauDemo: ser du ikke har lagt ut noe kode på GitHub-repoet - betyr det at du kun jobber lokalt? Så opprinnelig for meg å kjøre en logg av CAN-bus-meldinger for å ha noe å starte med, men det har du kanskje alt gjort?
Tittel: Sv: OVMS for Think
Skrevet av: BauDemofredag 25. januar 2013, klokken 08:46
Sitat fra: jahnarne på onsdag 23. januar 2013, klokken 19:25
Sitat fra: BauDemo på mandag 14. januar 2013, klokken 15:24
Back to topic - how many have ordered ovms?
Da er OVMSen og SIM-kort på plass. Ser for meg å montere den med GPS og mobilantenne i Thinken til helgen.

BauDemo: ser du ikke har lagt ut noe kode på GitHub-repoet - betyr det at du kun jobber lokalt? Så opprinnelig for meg å kjøre en logg av CAN-bus-meldinger for å ha noe å starte med, men det har du kanskje alt gjort?
I am having trouble understanding the windows client for GitHub, and was planning to sync back this weekend.
If you are super eager I can see if I can send you the think file that you can copy/paste and build.
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 09. juli 2013, klokken 18:24
Ovms, Pickit3, antenna adapters and obdII-d9sub ordered.
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 23. juli 2013, klokken 01:17
I have received my ovms-unit and antenna adapters, but have not had time to do anything, other than study the source code at GitHub https://github.com/thinkcity/Open-Vehicle-Monitoring-System/tree/master/vehicle/OVMS.X (https://github.com/thinkcity/Open-Vehicle-Monitoring-System/tree/master/vehicle/OVMS.X)

I can see author 'markwj' have made a very small (example)file for Think City (vehicle_thinkcity.c) containing two interesting parts:

1) 'car_type' = TC (Think City)
BOOL vehicle_thinkcity_initialise(void)
  {
  char *p;

  car_type[0] = 'T'; // Car is type TCxx (with xx replaced later)
  car_type[1] = 'C';
  car_type[2] = 0;
  car_type[3] = 0;
  car_type[4] = 0;



The parameter 'car_type' is the code referred to as 'Vehicle Type' in the userguide https://github.com/markwj/Open-Vehicle-Monitoring-System/raw/master/docs/OVMS_UserGuide_TeslaRoadster.pdf (https://github.com/markwj/Open-Vehicle-Monitoring-System/raw/master/docs/OVMS_UserGuide_TeslaRoadster.pdf) page 19, when setting up the OVMS module via SMS/app.


2) Calculation of car_soc

Message 301, DOD is pulled from the CAN, but I wonder if this is correct? Maybe this was the error when BauDemo got got into 2nd of January 2013?
http://elbilforum.no/forum/index.php/topic,6755.msg73010.html#msg73010 (http://elbilforum.no/forum/index.php/topic,6755.msg73010.html#msg73010)

    case 0x301:
      car_SOC = 100 - ((((unsigned int)can_databuffer[4]<<8) + can_databuffer[5])/10);



If the OVMS module is flashed with latest fw v.2.3.2 (e.g. V2_production.hex or V2_experimental.hex)
https://github.com/thinkcity/Open-Vehicle-Monitoring-System/tree/master/vehicle/firmware (https://github.com/thinkcity/Open-Vehicle-Monitoring-System/tree/master/vehicle/firmware)
it might present SOC "out of the box" to both SMS and the app.

The code of vehicle_twizy.c is much richer, containing tons of features, and some of them could be reused in the code of vehicle_thinkcity.c.
However we then need some Think-owners with programming skills (in C++)

Anyone who volunteers?

It would also be nice if BauDemo could give an explanation how the can-data in the different messages are pulled. I've been looking at the autorun.bas-file (from the new Nikometer) to compare with the methods in the ovms vehicle files, but I don't fully understand how data from each can-channel is read.

For the Think, my opinion is that SOC and a 'charge status message' are the most important parameters at a starting point.
Tittel: Sv: OVMS for Think
Skrevet av: BauDemotirsdag 23. juli 2013, klokken 23:16
Sitat fra: hma på tirsdag 23. juli 2013, klokken 01:17
It would also be nice if BauDemo could give an explanation how the can-data in the different messages are pulled. I've been looking at the autorun.bas-file (from the new Nikometer) to compare with the methods in the ovms vehicle files, but I don't fully understand how data from each can-channel is read.

Do you need more info on how can data is pulled in the "autorun.bas" or in the "vehicle_thinkcity.c"?
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 25. juli 2013, klokken 02:39
Sitat fra: BauDemo på tirsdag 23. juli 2013, klokken 23:16
Do you need more info on how can data is pulled in the "autorun.bas" or in the "vehicle_thinkcity.c"?
Both would be nice, but only if it's ok with you :)
Maybe we should comment vehicle_thinkcity.c in this post and autorun.bas in the post for "new nikometer"?

In the following I will sum up some of my findings (from both files) and ask a few questions:
(sorry if those are basic stuff, it's my first look into C-programming).

autorun.bas
The function "can addrxchnl" maps one message group to one channel.
E.g. add message 301 to channel 1:
can addrxchnl 1, &h301
Then rxchnl number 1 can be used to retrieve parameters in message 301.

In message 301 we find DC current, DC voltage, DOD and temperature. All those parameters are words of 2 bytes / 16 bits, split into high- and low byte.
The data from each parameter (within the message) are pulled with the function rxData(n), where 'n' is the position of each byte (8 bits).
E.g. DOD is the 4th and 5th bye in 301-message -> rxData(4), rxData(5)

In case of parameters containing non-negative numbers (unsigned integer), like DOD or voltage, the function getU16 is used to create a 16 bits long word from a 8 bits word, by multiplying high bits with 256
e.g. 0110 0101 -> 0110 0101 0000 0000
then the low byte is added.

For parameters both negative and positive (signed integer), like DC current, the function getS12 is used to create a 12 bit long word by multiplying the high bits with 256 and then adding the low byte.
Then, if the result is a negative number, hex8000 or greater  (most significant bit is set to '1') hexFFFF is subtracted.
If (result > &H8000) Then result = result - &HFFFF

Then there is a part I don't understand. Why is the low byte divided with 10?
E.g.
_dod=getU16(rxData(4),rxData(5))/10
_dccurrent=getS12(rxData(0),rxData(1))/10


Further on, the value in the parameters are formatted and printed like this:
Print Format$(100 - _dod,"% 4.1f");
Print Format$(_dccurrent,"%6.1f");

I assume the 4.1 and 6.1 notation is describing the length of the number and how many digits behind the decimal pointer?


vehicle_thinkcity.c
In the function vehicle_thinkcity_poll0 the databytes are read into an (array?) of variables, named 'can_databuffer[n]'. It handles unsigned integers, -non-negative numbers.

As for autorun.bas, DOD are found in databyte 4 and 5.
Instead of multiplying the high byte with 256 (adding 8 zeros to the end), they use this:
can_databuffer[4]<<8
(e.g. 0110 0101 -> 0110 0101 0000 0000)
then add the low bytes by:
+ can_databuffer[5])/10)

I don't understand the usage of 'this part:
unsigned int id = ((unsigned int)RXB0SIDL >>5)+ ((unsigned int)RXB0SIDH <<3);
I assume it's about shifting the bits 5 positions right for rxb0sidl (data low), and 3 positions left for rxb0sidh (data high), but can't figure out why?

How do I read the switch-part? :
car_SOC = 100 - ((((unsigned int)can_databuffer[4]<<8) + can_databuffer[5])/10);
How can I handle signed integers (like DC current)?
In vehicle_twizy.c one find:
// POWER:
      t = ((unsigned int) (can_databuffer[1] & 0x0f) << 8) + can_databuffer[2];
      if (t > 0 && t < 0x0f00)
      {
        twizy_power = 2000 - (signed int) t;



Then I wonder if any other files have to be modified to make it work with other values in the can-messages?
I assume the value of parameter 'car_SOC' is global available in the net_sms.c , net_msg.c and diag.c, making it available via SMS and the mobile app?
Tittel: Sv: OVMS for Think
Skrevet av: BauDemotorsdag 25. juli 2013, klokken 12:42
For the OVMS there is a dev-list, where the guys are very quick to respond and provide info/feedback.
Here are some answers that I hope help.

Sitat fra: hma på torsdag 25. juli 2013, klokken 02:39
Then there is a part I don't understand. Why is the low byte divided with 10?
E.g. _dod=getU16(rxData(4),rxData(5))/10

If you look closely you will see that the division by 10 is for the result of the getU16 function, and simply means that the avalue is reported as multiplied by 10.
So if the car puts 576 on the bus, it would mean that the DOD is 57.6%.

Sitat fra: hma på torsdag 25. juli 2013, klokken 02:39
The value is the parameters are formated and printed like this.
Print Format$(_dccurrent,"%6.1f");

I assume the 6.1 notation is describing the length of the number and how many digits behind the decimal pointer?
True

Sitat fra: hma på torsdag 25. juli 2013, klokken 02:39
I don't understand the usage of 'this part:
unsigned int id = ((unsigned int)RXB0SIDL >>5)+ ((unsigned int)RXB0SIDH <<3);
I assume it's about shifting the bits 5 positions right for rxb0sidl (data low), and 3 positions left for rxb0sidh (data high), but can't figure out why?
I can't look at the code in detail now, but I think this is to make the frame ID - so the message id (for example 301) is reported as certain bit in the two bytes.

Sitat fra: hma på torsdag 25. juli 2013, klokken 02:39
How do I read the switch-part? :
car_SOC = 100 - ((((unsigned int)can_databuffer[4]<<8) + can_databuffer[5])/10);
How can I handle signed integers (like DC current)?
The above (with shifting bits) is more efficient way than multiplication.
I suspect getting signed values will work in a similar fashion as the BAS code. I am sure there is better and more efficient way though.

Sitat fra: hma på torsdag 25. juli 2013, klokken 02:39
Then I wonder if any other files have to be modified to make it work with other values in the can-messages?
I assume the value of parameter 'car_SOC' is global available in the net_sms.c , net_msg.c and diag.c, making it available via SMS and the mobile app?
There are some values that are common. If you want other values, you would need to define them yourself and the "override" one of the methods in the common modules with a method in the specific Think module.
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 04. august 2013, klokken 08:24
OVMS flashed with firmware v.2.3.2, installed temporarily in my Think.
Tested successful reading of SOC and GPS-position both in the OpenVehicle app and by SMS.

Next up is getting a C18 compiler running (for Mac), so I can edit the project and add some more parameters, like "chargestatus".
See attached screenshot of the iOS-app (image for Think-car is not yet available).
Tittel: Sv: OVMS for Think
Skrevet av: BauDemosøndag 04. august 2013, klokken 08:52
Looks very good!
Tittel: Sv: OVMS for Think
Skrevet av: habazotsøndag 04. august 2013, klokken 17:05
Hi, I've just bought a Think City 2008 and are planning a series of "pimps" :)
This one looks interesting, so I'll join in on the development if possible, since I have some experience programming stuff like this. But first of all I have to order the HW..
I suspect I already have GSM/GPS antennas; what connectors do they use? Someone mentioned having found some converters, but I could not find any links..

Do we have any documentation on available parameters on the CAN bus?

On a possibly related side-note: are the parameters displayed in the trip counter (the ones enabled by holding it in while powering on) decoded and a reflection of what is available on the CAN bus?

(sorry for asking some stupid questions, still new to the CAN bus and it´s wonders..)
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 04. august 2013, klokken 22:46
Great to hear that more people are joining :)
My purchaselist was:
- OVMS Car module V2 ($99 FastTech)
- PICKIT3 Programmer ($26 FastTech)
- OVMS Data Cable or similar DB9 ($9,5 FastTech) (I got two cables for some reason, so maybe there is one included with the OVMS module...?)
- SMA male to Fakra C male RG174 ($6)
http://www.ebay.com/itm/Fakra-SMB-C-5005-plug-to-SMA-male-6-RG174-pigtail-GPS-Telematics-Navigation-/320978360903?pt=LH_DefaultDomain_0&hash=item4abbcd1a47
- SMA male to Fakra D male RG174 ($6)
http://www.ebay.com/itm/Fakra-SMB-D-4004-male-plug-to-SMA-male-6-RG174-pigtail-cable-GSM-antenna-/320978361964?pt=LH_DefaultDomain_0&hash=item4abbcd1e6c
- SIM (SMS + gprs)

There are some info about the CAN-messages in the code (autorun.bas) for the new-Nikometer https://sites.google.com/site/theevmonitor/think-ev-monitor/download (https://sites.google.com/site/theevmonitor/think-ev-monitor/download)

Some hints in setting up the can for OVMS is setting up filters and masks for the specific messages you want to interrogate by the App or SMS.
I've made a simple testfile this evening, but have not compiled the project for testing in the ohms-unit. If successful I will publish here.
Looking forward to hear from your progress.
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 05. august 2013, klokken 00:19
Installed the C 18 compiler in addition to Mplab X IDE and compiled a experimental hex-file, only with changes in vehicle_thinkcity.c , but the ohms-unit behaves the same way. No new parameters in the SMS (I was only expecting the chargstatus to be set 'true'.)
I also discovered that both the official 2.3.2 fw and my own version is not updating SOC during charging.
To get updated SOC , I think the key have to be set on for a second...
However SOC is updating correct during driving/discharge.
Tittel: Sv: OVMS for Think
Skrevet av: BauDemotorsdag 08. august 2013, klokken 11:06
I had similar problem with the SOC value not updating, and after about 50 SMS-es I gave up on the issue.
I think the correct SOC is reported on the CAN bus, but the OVMS is hanging or not updating the values. There was some talk about data structures being overwritten on the OVMS dev list, but I never got the time to investigate further.

You can confirm if this is correct by having both the OVMS and the new nikometer connected to the CAN bus and observe the SOC value on the new nikometer screen while using the OVMS function to read it.
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 08. august 2013, klokken 17:15
I'm checking the SOC-update during charging now with the new Nikometer installed :)

It looks like the OVMS-unit behaved the same way as the analog SOC-gauge, which also does not update before key is on.

Both the OVMS and the Duinomite are now powered +12V "always hot".
I started charging from 82% SOC, waited an hour and checked both by SMS/App and by the Nikometer, and now shows 89% all places. Then waited some extra time and interrogated by SMS/App and got 92% SOC. Very strange (it works as expected!).
I will do some more testing this evening, leaving the car unplugged and check if SOC decreases.

In the attached picture is my cable loom also used with the new Nikometer.
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 13. august 2013, klokken 02:10
[edit]: Latest firmware (hex file) is from now kept in my last thread in this post!

The OVMS is now up and running both on SMS and on the App, presenting charging parameters (line voltage and current), SOC, Charge state, battery temperature and GPS location.

The hex file which I've made (OVMS-ThinkCity_13082013_v1-0_hex.txt) is attached and can be used of all.
Please rename the file before use to OVMS-ThinkCity_13082013_v1-0.hex
The version is only tested on Zebra-Think with gen1-PCU, but I might think it will work on all cars ...
You can flash is from any computer (Win, Linux and Mac) with free MPLAB X IDE.
You don't need to know much about programming to flash it to a ovms-unit.

The only two things you need to make sure of is:
1) "Preserve EEPROM memory" is checked (otherwise you need to give all SMS-commands every time you reprogram)
2) Make your programmer (PICKIT 2 or PICKIT3) supply +5V to the OVMS module.

Preserve EEPROM and set +5V:
1) Start MPLAB X IDE -> Run -> Set Project Configuration -> Customize
2) Click on your programmer, drop down "Option Categories" = "Memories to Program"
3) Check "Preserve EEPOROM memory" -> Apply
4) Click on your programmer, drop down "Option Categories" = "Power"
5) Check "Power target circuit from PIKkit" and chose Voltage level 5.0
6) Apply -> OK


To flash your OVMS unit:
1) Start MPLAB X IDE, click "File" and then "Import Hex (Prebuilt)  Project"
2) Prebuilt filename : browse to your hex.file (OVMS-ThinkCity_13082013_v1-0.hex)
3) Family: "Advanced 8-bit MCUs (PIC18)
4) Device: PIC18F2685
5) Hardware tool: "click on your programming device, e.g. PICkit3
6) Next -> Next -> Finish
7) Check that programming was finished successful.





To get it running, simply follow this manual (for Tesla Roadster) in detail, it works for all vehicles:
https://raw.github.com/markwj/Open-Vehicle-Monitoring-System/master/docs/OVMS_UserGuide_TeslaRoadster.pdf (https://raw.github.com/markwj/Open-Vehicle-Monitoring-System/master/docs/OVMS_UserGuide_TeslaRoadster.pdf)
I strongly recommend you to write down all users and passwords according do page 6 in the document


The SMS registration needed to configure are the following commands (this is explained in the manual above):
REGISTER OVMS
PASS "your_ovms_modul_password" (the passord is set in this command) e.g. PASS OvModSecret123
MODULE "your self made Vehicle ID" K - TC  (TC = Think City, K = Km) e.g. MODULE NO5001 K - TC
SERVER 64.111.70.40 "your Open Vehicle Password" -  e.g. SERVER 64.111.70.40 OvServSecret123 -
GPRS "apn" - - (apn can be telenor or netcom or whatever your provider have) e.g. GPRS telenor - -

You can check if the GPRS-settings are OK by sending
GPRS?


Good luck, and please report back if someone tries this! :)

/Håkon
Tittel: Sv: OVMS for Think
Skrevet av: habazottirsdag 13. august 2013, klokken 07:22
Great!! I will try this out as soon as I get my car back and my gizmoz in the mail, possibly this weekend...

Have you committed the changes back to the OVMS site? I'd love to get the source and built it myself as well.

What are the next logical steps?
What is missing or needs be improved?

At some point we should update the resource files in the iOS and Android apps to show some nice pictures of the correct car :)
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 13. august 2013, klokken 10:19
I have not found out (yet) how to contribute on the git-hub, so there you'll find the default code only (presents SOC on SMS and the App).

Make a Github-account, click on the url and use the "fork" button to make your local copy of the master project.
The project is called OVMS.X
https://github.com/thinkcity/Open-Vehicle-Monitoring-System/tree/master/vehicle/OVMS.X

I have made a minor change in the net_msg.c file to trim the SMS printout (in the function net_prep_stat).
This function checks if the car_doors1 bits are set, to determine if charge is ongoing.
This is a common file for all vehicles, so I cannot upload my version.

We should make a vehicle_thinkcity.c file which contain all SMS handeling, e.g. like in the vehicle_twizy.c

One lesson learned is that the global variables in ovms.h and ovms.c should not be changed.
The global variable car_tbattery is defined as 'signed char' in those files. When trying to send a 3-digit decimal number (unsigned int) to this variable, the temperature is presented incorrect, e.g. as 8 instead of 264.
My workaround is quick and dirty, simply by using the global variable 'car_trip', which is already defined as 'unsigned int'.

Further improvements would be:

- Adding car_thinkcity_red.png (and yellow, black and blue) to the App

- Adding more values to 'car_type', to distinguish between Zebra gen1 PCU, Zebra gen2 PCU and Enerdel gen2 PCU.

- Improving the handling of car_doors1 bit and 'charge enabled', so the SMS/App reflects correct charging state, for 80% 'top off' and 100% EOC detected - 'Charging Done'. I'm currently reading the 305 message and checking if bit 24 is set (charge enabled) ;  case 0x305: if ((can_databuffer[3] & 0x01) == 1)

- See if there is a way to correct transfer battery temperature to 'car_tbattery' and present it in the App.

- From the above; make one vehicle_thinkcity.c file, which contains can data-work and SMS/App interrogation, to be uploaded to Github :)
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 14. august 2013, klokken 23:16
[edit]: Latest firmware (hex file) is from now kept in my last post!

Attached is an improved version (hex-file) for Think with Zebra (most parameters will also work on EnerDel).

In this version the charging state is reflected on SMS and on the App. When the car pauses at 80% SOC for OpenCircuitVoltage Measurement (30 mins), you can see "Charging, top off" and 230V/0A.

Still I have to make changes to more files than the vehicle_thinkcity.c , so it make no sense of publishing the source code on Github.

Remember to rename the file to OVMS-ThinkCity_Zebra_14082013_v1-1.hex
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 15. august 2013, klokken 21:52
Latest fw (hex file) is attached here.

Changes:
- Chargelimit is displayed in the App (over the battery symbol during charging)
- PCU temperature is displayed in the "Car" section of the App as "PEM" (please ignore battery and motor temp in the App)
- Correct state detection at EndOfCharge. Charge symbol is present at EOC until charge connector is unplugged.

Any feedback is welcome :)

/Håkon
Tittel: Sv: OVMS for Think
Skrevet av: habazottorsdag 15. august 2013, klokken 22:25
Ooh, great! Still waiting for my hw, shipment got stuck, restocking, bla bla..
Will at least get my car back tomorrow, and will experiment a bit with CAN dumping through other means while waiting. Will also see if I can get my RaspberryPi to talk CAN.
I have checked out the git fork you created, maybe time to commit the changes back.?.
Or send a zip file of the source, does not make sense to start from scratch when you have done so much nice work already..
I have also started gathering promo pictures (top and front/side) which can be used in the apps, still missing a few color options, but will get there eventually... Or maybe someone has a complete set (examples attached)?
Anyone experimented with HUD type displays btw? Considering a 7" HUD connected to my PI..
Tittel: Sv: OVMS for Think
Skrevet av: hmafredag 16. august 2013, klokken 16:04
Looks like Mark Webb-Johnson already have managed to merge my source files to the project public (after a few changes), great - thanks! :)

I have not compiled it but will do so and test it as soon as possible.

He also gave some comments regarding SMS STAT which i quote here:

Regarding the SMS STAT message, and how to extend it, the correct way is via the vehicle_fn_smshandler hook. You can see vehicle_twizy.c for an example of how to implement this.

Given that the standard net_sms_stat does this:

    BOOL net_sms_stat(char* number)
      {
      char *p;

      if (sys_features[FEATURE_CARBITS]&FEATURE_CB_SOUT_SMS) return FALSE;

      delay100(2);
      net_send_sms_start(number);
      net_prep_stat(net_scratchpad);
      cr2lf(net_scratchpad);
      net_puts_ram(net_scratchpad);

      return TRUE;
      }

you should be able to replace it with your own thinkcity_sms_stat that does the same, but adds your own private data to the end of the standard SMS STAT response. You will need to provide a hook function (see vehicle_twizy for an example) to hook in and handle this in your vehicle_thinkcity module.


Tittel: Sv: OVMS for Think
Skrevet av: hmafredag 16. august 2013, klokken 17:06
I've also made images in the correct size:
- Car front angle view 654x302  car_thinkcity_color.png
- Car x-ray view  304x606 ol_car_thinkcity_classicblack.png (black only)
- Car map images 96x96 map_car_thinkcity_classicblack.png (black only)

It remains making the background transparent on all images.
Anyone with PhotoShop?
Tittel: Sv: OVMS for Think
Skrevet av: habazotfredag 16. august 2013, klokken 17:57
Great! In my opinion the yellow one has the best angle and is most similar to the other images in the apps.
It might be possible to trick the color as well as the transparent background, I'll see if I can convince someone with Photoshop/Gimp skills...
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 18. august 2013, klokken 00:32
Update:
I have a very good progress on the SW development. Currently v.1 is stable and forwards all possible parameter (at the time) to the app. I uses standard SMS-handeling, which limits the selection of parameter to display.

Next I have made a successful beta-test of vehicle_thinkcity.c v.2 (which of course is not uploaded to Github yet).
I have put in the internal SMS handling structure as the vehicle_twizy.c and managed to pull customized parameters from one of the self made commands.

This offers the possibility to interrogate the car with our own groups of SMS-commands. E.g. "WARN" if you want to pull warnings/alarms/flag status/etc.

The OVMS is a very cool gadget :)
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 18. august 2013, klokken 12:04
Sitat fra: habazot på torsdag 15. august 2013, klokken 22:25
Still waiting for my hw, shipment got stuck, restocking, bla bla..
If your airbag lamp is always lit on your car, which means your RAC-unit is defect, I recommend you to remove it.
Then you have access to the GPS- and GSM-connectors, and the connector for can_h /can_l/+12V (and the wire which should be grounded if airbag (SRS) unit is OK.)
BauDemo is selling a nice unit, which check if SRS-system is OK and turns off the lamp. Plug and play :)
It's  some quirky job to remove the RAC, but I recommend it :)
Tittel: Sv: OVMS for Think
Skrevet av: habazotsøndag 18. august 2013, klokken 23:42
Sitat fra: hma på søndag 18. august 2013, klokken 12:04
Sitat fra: habazot på torsdag 15. august 2013, klokken 22:25
Still waiting for my hw, shipment got stuck, restocking, bla bla..
If your airbag lamp is always lit on your car, which means your RAC-unit is defect, I recommend you to remove it.

It is actually not broke, yet :)
Considering to remove it anyway, because it is not used per se.?..
Or what is the status on the RAC unit, not much documentation around..
Btw, my OVMS hw is finally in the mail..

Sitat fra: hma på søndag 18. august 2013, klokken 12:04
Then you have access to the GPS- and GSM-connectors, and the connector for can_h /can_l/+12V (and the wire which should be grounded if airbag (SRS) unit is OK.)

Exactly..
I replaced the stereo today and saw the GSM and GPS antenna cables, so it's there..
I might put the stereo replacement process in a separate thread..
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 19. august 2013, klokken 01:44
I have commited v2.0 of vehicle_thinkcity.c tonight.
SMS is migrated  from the standard handler to the vehicle-file. This makes it possible to create our own SMS-commands.
Currently two commands are available:
  STAT: prints Charge state,AC-voltage/current (during charging), SOC, batt temp, PCU temp, aux batt voltage, traction battery voltage and current.
DEBUG: prints flags/variables like SOC, Charge Enable, Open Circuit Voltage Measurement, End of Charge, Doors1 (PCS connected) and Charge status.
  HELP: This command should return a list of available commands ("STAT, DEBUG, HELP"), but ironically it's not working... I have tried a lot, but had to skip it for now.

I'll guess my changes will be migrated to the master project within a day or two :)
Attached is my latest hex-file which I have tested OK (all except SMS "HELP").

@habazot:
Regards to the RAC. If it's working and your airbag lamp if functional, you should leave it. There is no support for the RAC and it's only purpose is relaying SRS OK signal to the instrument panel.
If possible, try to release the GSM and GPS-connectors from the RAC for OVMS-usage. You'll need some very long hands, a flexible spine, and lot of patients ;)
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 19. august 2013, klokken 21:50
v2.1 is committes. and can be downloaded here. It's been 'pull requested', and I'll guess Mark will merge the changes to the master within a day :)

Changes:
- SMS command "HELP" is fixed
- New Think parameters added
- SMS command "FAULT" is added, which displays some known "registered" errors (Failed Cells, Crash, ISO-error, etc). I hope someone with better programming skills can contribute here and make some kind of logic that counts active messages and display if active only...

Next up is integrating the Charge Alert SMS commands (SMS command CA).
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 26. august 2013, klokken 23:57
Latest version v2.2 is attached.
  - Motor, PCU and ambient temp is present in both SMS "stat" and app. Charger temp is available in SMS.
    (Those values are not preset or are stale when key is off)
  - SMS "fault" lists number of failed cells, active errors/notifications/flags/warnings and count them if present.

Lessons learned:
  - If attaching both Duinomite and Ovms to the can-bus, both units have to be powered on at the same time. If    Duinomite is of while Ovms is on, the Ovms wont read the can-bus
  - To allow transmitting on the can-bus (to retrieve motor- and PCU-temp or functions like door locks) one need to activate feature 15 by sending SMS "FEATURE 15 1" or setting feature 15 to "1" in the app.
  - Don't do complicated developement on the Ovms...

I will do some tests on the current version and commit to GitHub if stable.


I'm pretty happy with the way Ovms works by now, and I need a break to gain new motivation :)

Remaining work is:
  - SOC/Charge alert
  - Remote doorlock / Eberspächer/Webasto from SMS and/or app.
    (need hw modification on the Ovms or using Duinomite as a relay/gateway)
  - Uploading transparent Think-png's to the app.
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 27. august 2013, klokken 21:42
OVMS master is upgraded from 2.5.1 to 2.5.2, and I have merged and tested the Think City specific adaption.

All changes are committed to Github and will be available within a few days.

Attached is the hex-file which can be used to flash the module.
The screen shots shows the sms-interaction and the new parameters in the app.

Tittel: Sv: OVMS for Think
Skrevet av: habazotonsdag 28. august 2013, klokken 11:57
I finally got my OVMS hardware yesterday and installed it immediately.. :)
After a few initial programming and SMS issues I got it up and working, juhuu!!
I used the bundled antennas just to get started, but plan on stealing the RAC cables soon.

You have done a nice job, hma, thank you for all your hard efforts, much appreciated!
I will try to build my own hex files as soon as the latest edits are in place and see if there is anything I can contribute with. We should aim for "official" Think support in both the controller and the apps including the images. But it is a very usable product at this stage.

On a separate note I installed a OBDII bluetooth dongle and managed to dump some of the CAN traffic. With a bit of clever filtering we might be able to reverse-engineer some more data.
If anyone has more specs or any info/screendumps/whatever it would be appreciated, I currently only have ezmon.bas/OVMS and a screenshot of a partially decoded CAN dump. Send me a PM if you like. Any relevant info could save us bucketloads of time.. :)

I will also look into using the DIAG port on the device to communicate with a RaspberryPi or similar.
And also maybe just write an Android app running on a 5-10" tablet communicating with a bluetooth dongle to present whatever it can find on the CAN bus. Since one can get a cheap tablet with both GPRS, GPS, touch panel, ++ it could almost replace all of the above. Probably uses too much power, though, but could be a low threshold, non-intrusive solution to a lot of people.

Still looking for that 25th hour to do all of this stuff.. ;)
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 28. august 2013, klokken 13:52
Sitat fra: habazot på onsdag 28. august 2013, klokken 11:57
You have done a nice job, hma, thank you for all your hard efforts, much appreciated!
I will try to build my own hex files as soon as the latest edits are in place and see if there is anything I can contribute with. We should aim for "official" Think support in both the controller and the apps including the images.
Thanks! Good to hear you got it working :)

For my personal choice; what I currently have achieved with the Ovms, is the functionality I was looking for in the first place. Being able to poll the SOC and charge status from the palm of my hand, was my initial goal.

Reverse engineering the ECU-messages is difficult, and some times you just have to be lucky to find what you are looking for.
Think City have both CAN and K-line connected to their ECU's, hence the approach of pulling data is different.
Some CAN-messages are broadcasted, you can read them directly, but some data have to be requested, like the motor temperature.

I'm not yet sure if the door locks can be triggered by the CAN, because it's controlled by the GEM ECU (which is wired K-line only).

It would be nice if you managed to implement SOC alert (feature #9 Minimum SOC), to trigger a push notification/SMS if car_soc < minSOC.
Also charge alert if e.g. charging is interrupted due to certain criteria.
Charge alert is implemented in the vehicle_twizy.c and the SOC-alert is a standard feature.

Also, when I remember it, I have committed my work to the "v2_experimental" project. From build 2.5.2 the main project has been splitted to vehicle specific versions to reduce memory usage.

Think source code from master:
https://github.com/markwj/Open-Vehicle-Monitoring-System/blob/master/vehicle/OVMS.X/vehicle_thinkcity.c (https://github.com/markwj/Open-Vehicle-Monitoring-System/blob/master/vehicle/OVMS.X/vehicle_thinkcity.c)
Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 02. september 2013, klokken 19:08
Latest fw attached.
Bugfix to get feature GPS streaming working:
- car_speed set (also added in the print of SMS "STAT")
- car_doors1bits.CarON = 1 when tc_bit_dischgenbl is set (car is 'on' when discharge is allowed)

GPS streaming is activated either by SMS "FEATURE 9 1" or in the App -> Control -> Feature.
When activated car position is streamed to the app in realtime. When deactivated the map is updated every 1-2 minutes
Tittel: Sv: OVMS for Think
Skrevet av: hmalørdag 07. september 2013, klokken 20:43
Final version! Had some time with Photo Shop and managed to manipulate the colors and make multi color duplicates from one image.
Tittel: Sv: OVMS for Think
Skrevet av: Lynetlørdag 07. september 2013, klokken 22:50
Utrolig hva du greier HMA  :D mens jeg har kjørt Leaf 190km med 2,5 time ladepause halvveis i dag.
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 08. september 2013, klokken 12:20
Herlig, 190km på en dag med en liten ladepause er jo knallbra med Leafen :-)

Ellers, Think-bilder kommer ved neste oppgradering av appen, både på Android og iOS. :)
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 22. september 2013, klokken 22:41
Latest fw is attached. Feature control of central locks (require some additional hw). If you are interested in how, post here.
Still waiting for the next upgrade of the app with the new Think images.
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 24. september 2013, klokken 00:51
Latest Ovms build is available here, it features:
- Control of external auxiliary (e.g. a Webasto) from "Valet Mode" button (pin 8 at 9X2).
  Pin is set auto off after 20 min.
- Door lock control (lock at pin 4 /RC1, unlock at pin 6/RC2)
- Control of airbag lamp status

To hook up the thing, one have to build a cable with a d9sub (female) in one end, and a molex-connector in the other end (if your car originally was equipped with RAC).
Tittel: Sv: OVMS for Think
Skrevet av: habazottirsdag 24. september 2013, klokken 12:28
Nice :) I'm interested in the HW mod, was thinking of upgrading FW anyway so I can add a few wires.
Actually I think I'm going to make a connector to be able to reprogram the think without having to pull everything apart... I wish the next generation could allow for reprogramming via GPRS.

Anyway: I have one other issue: I get a lot of battery warnings, my battery seems to go below 13.0V when not plugged in or driving. My battery is just fine, works nicely and will not change behavior even if charged. So should we make the battry voltage limit adjustable? By using one of the parameters.?..

Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 25. september 2013, klokken 20:09
Sitat fra: habazot på tirsdag 24. september 2013, klokken 12:28
Anyway: I have one other issue: I get a lot of battery warnings, my battery seems to go below 13.0V when not plugged in or driving. My battery is just fine, works nicely and will not change behavior even if charged. So should we make the battry voltage limit adjustable? By using one of the parameters.?..
There are built in alerts for 12V and minSOC, but they currently don't work. I'm troubleshooting with Mark, I think there is a bug in the server-script.

I will also post a picture of how to do the HW-modification for central lock, airbag lamp control and heater control.
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 25. september 2013, klokken 20:11
Latest version is attached, it features:
- Car park time visualization in the app (very useful!)
Tittel: Sv: OVMS for Think
Skrevet av: habazotonsdag 25. september 2013, klokken 21:12
Sitat fra: hma på onsdag 25. september 2013, klokken 20:09
Sitat fra: habazot på tirsdag 24. september 2013, klokken 12:28
Anyway: I have one other issue: I get a lot of battery warnings, my battery seems to go below 13.0V when not plugged in or driving. My battery is just fine, works nicely and will not change behavior even if charged. So should we make the battry voltage limit adjustable? By using one of the parameters.?..
There are built in alerts for 12V and minSOC, but they currently don't work. I'm troubleshooting with Mark, I think there is a bug in the server-script.

I will also post a picture of how to do the HW-modification for central lock, airbag lamp control and heater control.

Actually battery alerts work too well, I get plenty of notifications, it seems to compare at 13.0V, which is a bit high for my battery, reducing it to ~12.5V would make it useful again, now it's just noise.

Eagerly awaiting the "OVMS on steroids howto" :)
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 26. september 2013, klokken 18:37
Sitat fra: habazot på onsdag 25. september 2013, klokken 21:12
Actually battery alerts work too well, I get plenty of notifications, it seems to compare at 13.0V, which is a bit high for my battery, reducing it to ~12.5V would make it useful again, now it's just noise.
Interesting! 12V-warning does not work to me (and I have had a few incidents with low voltage).
Do you run the android-app or the iOS-app? Do you receive warning on both SMS and to the app?

Have you done any changes to the code from the version pushed at Github? If yes, can you e-mail me your vehicle_thinkcity.c-file (you find my email in the developer list).

The 12V alert is done in the function net_msg_12v_alert in net_msg.c and in net_send_sms_start in net_sms.c.
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 26. september 2013, klokken 18:45
Attached you can see how to modify the board to connect to the 4 external pins (RC0-3) used for airbag, central lock/unlock and heater.


Note that this is +5V TTL logic, and the pins cannot be connected directly to the car. One can use a mosfet (e.g. 2n7000) in combination with a resistor as a digital switch.

One have to make a cable with a female d9sub to be attached to OVMS. Clas Ohlson have one for sale for NoK 70,-. Cut off one of the connectors and attach the wires to can_h / can_l +12V GND, Airbag signal (via mosfet) GEM central lock and unlock-switch (via mosfet) and to a heater if you have one.
Tittel: Sv: OVMS for Think
Skrevet av: habazottorsdag 26. september 2013, klokken 23:25
Sitat fra: hma på torsdag 26. september 2013, klokken 18:37
Sitat fra: habazot på onsdag 25. september 2013, klokken 21:12
Actually battery alerts work too well, I get plenty of notifications, it seems to compare at 13.0V, which is a bit high for my battery, reducing it to ~12.5V would make it useful again, now it's just noise.
Interesting! 12V-warning does not work to me (and I have had a few incidents with low voltage).
Do you run the android-app or the iOS-app? Do you receive warning on both SMS and to the app?

Have you done any changes to the code from the version pushed at Github? If yes, can you e-mail me your vehicle_thinkcity.c-file (you find my email in the developer list).

The 12V alert is done in the function net_msg_12v_alert in net_msg.c and in net_send_sms_start in net_sms.c.

I use the Android app.
I currently have the latest official release installed (not compiled by me).
It works both with notifications and sms, but I had to turn off sms to avoid  excessive noise and costs.
My battery has a voltage of 12.8V when not charged so changing the limit to 12.5V might be reasonable?

Sent from my GT-I9505 using Tapatalk 4

Tittel: Sv: OVMS for Think
Skrevet av: habazotfredag 27. september 2013, klokken 11:58
Sitat fra: hma på torsdag 26. september 2013, klokken 18:45
Attached you can see how to modify the board to connect to the 4 external pins (RC0-3) used for airbag, central lock/unlock and heater.


Note that this is +5V TTL logic, and the pins cannot be connected directly to the car. One can use a mosfet (e.g. 2n7000) in combination with a resistor as a digital switch.

One have to make a cable with a female d9sub to be attached to OVMS. Clas Ohlson have one for sale for NoK 70,-. Cut off one of the connectors and attach the wires to can_h / can_l +12V GND, Airbag signal (via mosfet) GEM central lock and unlock-switch (via mosfet) and to a heater if you have one.

The OVMS side looks straight forward, but the other end of that RS232 is a bit unclear to me. You mention a molex connector? I have not pulled out the RAC unit yet (seems to be a bit of a hassle...), and I think I'd like to keep it connected since it is actually working sort of. Hm. So maybe you just removed it and now have a way of controlling the one thing you needed it to do; the airbag lamp?
Maybe a picture tells it all :)

Also would it not make sense to put the mosfets in the OVMS box and just run the cables directly to their destinations.? Because you are clamping them right, active "low"/short to GND?

Sorry for being a nag, just want to make sure I understand you correctly.. :)
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 29. september 2013, klokken 01:18
The pin-mapping (can_l, can_h, +12V and gnd) for the d9sub-to-obd2 cable is described in the picture bellow.

One can use the free pins on the d9sub at personal choice to route lock/unlock/airbag/heat. The picture with 9x2-to-d9sub mapping is just a suggestion only.

There is also no need to remove the RAC, however I find the 24pin RAC connector very convenient to use.

The 24-pin RAC-connector can be detached without unmounting the unit itself.
If you do so, the airbag lamp control have to be connected to Ovms/mosfet-switch (according to this description).
The 24-pin RAC-connector in the car is Molex 43025-2400 (female).
For the Ovms-cable one need a 43020-2401 (male)

RAC-pins:
- Pin 1: Always hot
- Ping 6: CAN_L
- (Pin 7: Key run, not needed, but nice to know)
- Pin 10: Airbag ECU status
- Pin 13: Gnd
- Pin 18: CAN_H

At the GEM you find:
  - Pin 19 Grey connector (most left): Lock switch (yellow/red wire)
  - Pin 16 Green connector (second left): Unlock switch (pink/green wire)

I have made a small labtest with a 2n7000 mosfet + 4k5 resistor.
Connected like this:
- RCx to Gate
- Source to GND
- Drain to lock/unlock/airbag/heat
- 4k5 between Gate/RCx and Source/GND

NB! If one plan to use the mosfet as relay controller, I think one need a fly-back protection diode over the relay coil.

A Veroboard with 4 switches (airbag, lock, unlock, and heat) measure 32x9x13mm (WxDxH).
I would prefer to keep it inside the Ovms-box, but I think that's might be impossible. There is no space on the bottom side of the Ovms-board and on the top side the d9sub junctions are inaccessible.
I will therefor keep the Veroboard next to the Molex-connector - see not problem with that.
Tittel: Sv: OVMS for Think
Skrevet av: hmasøndag 29. september 2013, klokken 21:46
Managed to run a successful test on the 2n7000-circuit today, locking, unlocking and switching on/off the airbaglamp.

Next up is building a 4 x switch array (4 x 2n7000) for controlling the whole thing.

Meanwhile, BauDemo gave me a nice suggestion of using ULN2003a circuit, which will save some space and make a smother installation. I might order a few of those (or a pre-build board).

In the attached link some different methods of controlling relays / cmos from a 5V TTL-source.
http://www.electroschematics.com/7123/relay-driver-2/ (http://www.electroschematics.com/7123/relay-driver-2/)
Tittel: Sv: OVMS for Think
Skrevet av: jahnarnetorsdag 03. oktober 2013, klokken 13:50
Selger et komplett OVMS-sett om noen er interessert: http://elbilforum.no/forum/index.php/topic,9706.0.html
Tittel: Sv: OVMS for Think
Skrevet av: Ebloggsøndag 06. oktober 2013, klokken 12:18
Denne tråden er blitt så lang at mitt spørsmål er om noen kan gi en rask innføring i hva dette produktet er for noe. Virker spennende. Kan den brukes i en tvilling? Ligner dette på app funksjonen til Liefen?
Tittel: Sv: OVMS for Think
Skrevet av: testOmandag 07. oktober 2013, klokken 19:13
Sitat fra: espfri på søndag 06. oktober 2013, klokken 12:18
Denne tråden er blitt så lang at mitt spørsmål er om noen kan gi en rask innføring i hva dette produktet er for noe. Virker spennende. Kan den brukes i en tvilling? Ligner dette på app funksjonen til Liefen?

Se her for trillingene: http://elbilforum.no/forum/index.php/topic,9539.0.html (http://elbilforum.no/forum/index.php/topic,9539.0.html)
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 30. oktober 2013, klokken 20:15
Latest hex file for Think is available here.
It contains a fix for stale temperature in the app.
If the ambient temperature are not reported lately (e.g. car is off), the temperature is displayed grey in the app.
If the temperature is updated, it's white.
Tittel: Sv: OVMS for Think
Skrevet av: olefrefredag 08. november 2013, klokken 12:02
The described solution includes preheating by starting a webasto system.
Would it be possible to alternatively start the standard heater to preheat the vehicle?

Ole
Tittel: Sv: OVMS for Think
Skrevet av: hmafredag 08. november 2013, klokken 13:25
Sitat fra: olefre på fredag 08. november 2013, klokken 12:02
The described solution includes preheating by starting a webasto system.
Would it be possible to alternatively start the standard heater to preheat the vehicle?
Tar dette på norsk (sakset fra en epost til 'habazot')  :)

Jeg har sett på muligheten for å starte den elektriske varmekolben. Think hadde planer om å tilby slik styring via RAC, men kom aldri i mål. Det er to tilnærminger til løsning:

Styring med relé
1) Send en High Voltage Request
  - Enten tilføre +12V til BMI styringskontakt pinne 3/16 (via diode)
  - Eller tilføre +12V til CDCM pinne 21/27 (går via diode)

2) Starter kupévifte hastighet 2 ved
- Enten sette +12V via CDCM pinne 20/27
- Eller sette +12V på relé R1 pinne 86.

3) Slå på vannvarmer ved +12V til CDCM pinne 13/27

Dette er realisertbart, men ikke testet.


Styring med relé og CAN-melding
1) Sende +12V til CDCM (clima ECU) pinne 14/27 slik at den våkner.

2) Sender en CAN-melding til CDCM som beordrer
  - High Voltage Request (+12V pinne 21/27)
  - Kupévifte hastighet 2 (+12V pinne 20/27)
  - Heat request, slå på vannvarmer (+12V til pinne 13/27).

Jeg har ingen anelse om hvilke CAN-meldinger som kan brukes til dette, men det er i alle fall slik Think tenkte å utforme sin løsning med RAC.


Er du interessert må du gjerne prøve. Du kan starte med high voltage request til BMI og se om kontaktorene slår inn.
Tittel: Sv: OVMS for Think
Skrevet av: olefrefredag 08. november 2013, klokken 15:27
Hei

Jeg ser det er mulig, men jeg mangler kunnskap for å gjøre en slik jobb.
Kanskje er det andre som er interessert i en slik funksjon?

Tittel: Sv: OVMS for Think
Skrevet av: hmamandag 11. november 2013, klokken 23:49
New improvements! The app is now sending an alert if charging:
- is interrupted (assumed)
- reaches 80% (open circuit measurement / calibration)
- is done (end of charge).

Latest hex file is attached.
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 13. november 2013, klokken 21:13
Update containing bug fix for:
- False critical alert for 12V-battery (problem was caused by incorrect handling of "car_doors1bits.CarON" and "car_doors5bits.Charging12V").
- Fix for missing charging connector symbol at end of charge.
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 14. november 2013, klokken 09:46
Screenshot of alerts when chaging is interrupted and when done:
Tittel: Sv: OVMS for Think
Skrevet av: hmatorsdag 14. november 2013, klokken 19:18
Update containing bug fix for:
- missing charging connector symbol at 80% (open circuit voltage measurement).
See attached hex-file.
Tittel: Sv: OVMS for Think
Skrevet av: habazotonsdag 20. november 2013, klokken 17:12
Yo, I have tested this a few days now and everything seems to be working fine as advertised!
Good job! :)
Tittel: Sv: OVMS for Think
Skrevet av: hmafredag 22. november 2013, klokken 09:32
Have just built 12V control logic for airbag, doorlocks and heater to fit inside the OVMS-box.

Components used are:
- Clas Ohlson "eksperimentkort" 32-1281 http://www.clasohlson.com/no/Eksperimentkort/Pr223156000 (http://www.clasohlson.com/no/Eksperimentkort/Pr223156000)
- 4 x 2n7000 mosfets (ebay)
-  4 x 4,5kOhm resistors (Clas Ohlson)
-  Wires from a cat5/cat6 LAN-cable for routing signals to the OVMS-module.

I patched the wires from the module bottom layer through the big wholes of the d9-Sub connector.
Added heat shrink tube around the new board.

Next up is making d9-sub-to-Molex cable and the installation i finalized.
The heater will be controlled by a relay.
Tittel: Sv: OVMS for Think
Skrevet av: hmalørdag 23. november 2013, klokken 00:14
Finaly the Ovms auxiliary got installed! Doorlocks and Webasto-heater can be controlled by the app. Pretty cool :)
The airbaglamp is also now controlled by Ovms.

In the picture you see my final version of cable loom, with additional wires for Duinomite (New Nikometer), and wires for a new heater relay and the doorlocks.

The cable was mad of an old LAN-cable (four twisted pairs with multi core wires) and the 24-pin Molex-connector was applied with Molex crimping tool (#63811-1000) http://www.electrokit.com/crimptang-molex-638111000.49533 (http://www.electrokit.com/crimptang-molex-638111000.49533)
The Molex-connector and the pins was purchased at http://se.mouser.com/ (http://se.mouser.com/)
All wires was soldered by hand to the db9-connector.

In the bellow pictures you can see how the 5V-to-12V control logic i fitted to the Ovms-module.

Edit: Added building details to the post.
Tittel: Sv: OVMS for Think
Skrevet av: Warlocktirsdag 03. desember 2013, klokken 03:07
Hei

Jeg er "ny" på forumet, og har lest denne tråden med stor interesse.
OVMS enheten er jo opprinnelig, så vidt jeg har skjønt, ment som en "piggy-back". Det jeg lurer på er om RAC- eller OBD-kontaketene er eneste tilkoplingspunkt for CAN-busen? I mitt tilfelle er Thinken eid av dama (fin konebil :P) og dersom jeg skla legge inn en slik enhet liker ikke hun så mye fikling med eksisterende systemer, eller åpne koplinger/ledninger :)
Finnes det en direkte CAN-bus plugg, eller noe slikt, ala den som er på Tesla roadsteren?
Synes dette prosjektet uansett er svært spennende, og det er ikke fritt for at jeg kan finne på å bidra litt jeg oxo (HW-design, lodding, og programmering i f.eks C++ har jeg gjort en del av)  :D
BTW: hvor finner jeg GEM-enheten (for dør åpning/låsing) og hva står egentig disse TLAene for?
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 03. desember 2013, klokken 15:34
Flott at du liker prosjektet, jeg syns det virker helt etter intensjonene og gir stor merverdi :)

Programkoden for Think er blitt relativt bug-fritt (jeg har fikset en bug med air-baglame kontrollen som ikke er publisert ennå), men alle bidrag er kjærkomment - det er jo et open source prosjekt.

Om du behersker hw/elektronikkdesign ville det vært fint om du greide å bygge et bedre TTL 5V til 12V interface. Det viser seg at en av mosfetene ikke tåler belastningen fra dørlås-signalet (2n7000 tåler maks 200mA), og jeg har ikke kapasitet til å bruke så mye mer tid på det. Har forsøkt med noen mini boards med ULN2003A, men jeg ble ikke klok - de virket motsatt av det jeg forventet.

Det vil være nyttig om noen forsøker å starte den elektriske varmeren (high voltage request til BMI + heater blower speed 2 + heater on  -> alle tre ledningene er tilgjengelige fra klimakontrolleren og må tilføres +12V) Fjernstyring av Webastoen virker i alle fall helt supert.

OBD2-kontakten står etter min mening nokså upraktisk til i sikringsboksen, men du finner ledningsnettet på undersiden. Der kan du koble deg til. Ellers er det relativt enkelt å nappe av 24-pinns kontakten fra RAC. Det kan være en fordel å trekke ned reléboksen først (kun én 12mm bolt som må løsnes ved beina til passasjeren.)

GEM finner du like ovenfor sikringsboksen. Den har ca 4 gule kontaktlåser og er lett å få øye på. Den røde/rosa komponenten på bildet er en del av reléboksen.
(http://i42.tinypic.com/14jry9d.jpg).
Jeg vet ikke helt hva du mener med TLAene.
Tittel: Sv: OVMS for Think
Skrevet av: Warlocktirsdag 03. desember 2013, klokken 17:04
Hmm, ja høres jo gøy ut å bygge en liten integrert krets her :)
Har tilgang på kretskort-fres, så det kan jo være morsomt å prøve pinheaderen på OVMSen ser jo grei ut og det er vel plass til å borre et lite hull for tilkoplinger/kontakt også.

TLA -> Three Letter Acronym.
Jeg lurte på hva RAC og GEM sto for (slik at jeg kunne letter lokalisere de/søke på de på nettet. Jeg fant vel ut hva RAC var og at den var koplet på CAN-busen :D)

Thinken til dama er forøvrig en 2010 modell ser det ut til, YYCFT26C7AU005781. Er ikke sikkert det er en RAC enhet i den da? Hvordan er i så fall Airbag koplet? (Tror jeg leste et sted at antennene var installert uansett... Hva med mic'en til RAC montro?)

Da gjenstår det vel å overtale dama til at jeg får fikle med "sikringsboksen" hennes litt mer enn hun har lyst til selv :P
Tittel: Sv: OVMS for Think
Skrevet av: Lynettirsdag 03. desember 2013, klokken 17:17
Airbaglampa styres av RAC. RAC får beskjed fra airbagmodul via CAN. Hvis det ikke er feilkoder legger RAC ledningen fra airbaglampa til gods og den slukker.
Tror alle Norskproduserte Think har RAC. Tanken var vel hvis airbag går av skal en sentral automatisk (eller ved trykk på assist) kobles opp og man får hjelp.
GEM er en Ford sak og styrer mye av lys osv.
Tittel: Sv: OVMS for Think
Skrevet av: Warlocktirsdag 03. desember 2013, klokken 18:47
Er ingen "assist" knapp i alle fall, skal bla litt innover i kablene for å røve å finne ut i nær fremtid. Finner jeg RAC opp bak sikringsboksen, eller bak stereoen (har fått intrykk av begge deler)? :)
Tittel: Sv: OVMS for Think
Skrevet av: hmatirsdag 03. desember 2013, klokken 19:03
TLA ; da har jeg lært en ny TLA ;)
RAC = Remote ACquisition (finnes forran sikringsboksen inne i dashbordet stort sett på gen0/1-biler)
GEM = General Electric Module

VCU = Vehicle Control Module, finnes på gen2-PCU-biler (2010-2011) og har bl.a. i oppgave å styre lamper på dashboarder etc. Airbaglampa bøir styrt av VCU på gen2-PCU og av RAC på gen0/1-PCU.
Tittel: Sv: OVMS for Think
Skrevet av: Lynettirsdag 03. desember 2013, klokken 20:02
RAC sitter skrudd fast på torpedoveggen litt over releboksen.
Hvis du ser "gjennom" sikringsboksen så skimter du den tror jeg.
Det er hvite ledninger som er koblet til den.
Tittel: Sv: OVMS for Think
Skrevet av: Warlockonsdag 04. desember 2013, klokken 00:31
Kikka litt oppi der.. Fant en CDCM hva nå enn det er, den var i alle fall synlig.
Min favoritt er XTLAer (eXtended Three Letter Acronym).
Var litt trangt og utilgjengelig uten å begynne demonteringen for å finne så mye annet. Gjetter på en Gen 2 og dermed VCU en eller annen plass?
Uansett er det mest interesant å finne antennene om de er der, resten kan få lov å være som de er. Ikke umulig at en OBDII splitter dongle med muligheter for å fikseres der den opprinnelige nå står er løsningen for min del.
Finnes det noen form for dokumentasjon på OVMSens interne pinheader? Er disse aktive lav eller høy? Hvordan benytter du dem nå?
Hadde vært fint med noen form for dokumentasjon på Thinken også, disse linjene son skal trekkes høy, hva er egentlig i de to andre endene jeg hi-jacker meg inn på? Sinker en voldsomt til jord? Det kan for så vidt forklare en drain på mer en 200mA :)
Dersom MOSFETen din ryker, kan det være linjen som skal drives er koplet til et relé og du mangler flyback-dioden? (Kanskje en motstand på input som buffer heller ikke er så dumt...)
Et kjappt øyekast på datasheeten til ULN2003A gir meg inntrykk av at den er inverterende. Kan det ha lurt deg hma? I så fall er ikke det første gang, jeg blir stadig vekk irritert på at jeg gjør slike blundre :)
Alternativt kan man jo drive en liten relé -krets ment for f.eks arduino, f.eks noe ala http://www.elecfreaks.com/store/4-channel-5v-relay-module-p-269.html , men det forutsetter jo en egen breakout boks og henting av en 12V kilde da :)

-// W
Tittel: Sv: OVMS for Think
Skrevet av: Warlockonsdag 04. desember 2013, klokken 08:26
Det slo meg plutselig, når du sier:

Sitat fra: hma på tirsdag 03. desember 2013, klokken 15:34
... Det viser seg at en av mosfetene ikke tåler belastningen fra dørlås-signalet (2n7000 tåler maks 200mA), og jeg har ikke kapasitet til å bruke så mye mer tid på det. ...

Mener du da at MOSFETene ryker når du OVMSen er passiv og du låser opp og igjen bilen på vanlig måte, eller når du låser opp og igjen via OVMS? Løsningen på det første problemet er jo bare å sette en diode på linja mellom ditt signal og det opprinnelige. Da får du ikke tilbake-feed på uønskede 12V på kanskje flere Amp (noe som helt klart ville ha grillet MOSFETen). Signalet vil vel droppe en 0,4-0,7V men det er nok ikke så farlig :)

BTW: dersom signalet som drives her er et 12V logikksignal og ikke f.eks koplet til et relé ville jeg ikke brydd meg så mye om å bruke en ULN2003a...
Tittel: Sv: OVMS for Think
Skrevet av: hmaonsdag 04. desember 2013, klokken 10:14
CDCM - Climate and Defrost Control Module.
Denne modulen ble bl.a. koblet opp for framtidig fjernstyring av varme, via RAC (eller Mindbox).
Med OVMS tror jeg vi kan fullføre denne idéen, enten om noen greier å finne CAN-meldinger som kan styre selve CDCM, eller ved å sende +12V til high_voltage_request/BMI + blower_fan_speed2_relé + heater_on.
Pinnebeskrivelse er forklart tidligere i tråden.

Beskrivelse av OVMS-modulen finnes her https://github.com/markwj/Open-Vehicle-Monitoring-System/tree/master/vehicle/Car%20Module/v2-base (https://github.com/markwj/Open-Vehicle-Monitoring-System/tree/master/vehicle/Car%20Module/v2-base)
De 4 analog-utgangangene på OVMS sender +5V ved aktivering.
- Utgangen er koblet rett på Gate på hver sin 2n7000 mosfet.
- Source er koblet til jord på hver mosfet.
- Drain er koblet i GEM (lock-switch til én mosfet og unlock-switch til en annen).
- En 4,5kOhm motstand er koblet mellom utgangene og jord/Source på hver sin mosfet.

* Utgangen/mosfeten som styrer varme er koblet til et dempet relé. Ikke noe problem her.
* Utgangen/mosfeten som styrer airbaglampa er koblet direkte til instrumentclusteret (via RAC-kontakten) og virker fint.

Lock/unlock fra GEM aktiveres ved at utgangene kobles til jord med en puls (via mosfet). Jeg tror strømmen fra GEM til jord (via mosfet) blir for stor for 2n7000. Jeg har også prøvd med en diode, men da fikk jeg ikke noe forbindelse gjennom Drain og Source.

Mitt foreløpige og "enkleste" forslag til løsning, er å la lock/unlock-mosfetene styre hvert sitt relé. Da blir det mer mikk-makk og en mindre elegant løsning. Jeg vil aller helst samle all elektronikk inne i den lille OVMS-boksen. :)
Tittel: Sv: OVMS for Think
Skrevet av: Warlockonsdag 04. desember 2013, klokken 14:07
Ah! Lock/Unlock skal trekkes lav. Da hjelper nok ikke en diode nei :) Jeg antok at du måtte sette +12V som på Airconditionen du nevnte, men det er altså motsatt.
Spørsmålet her bllir da Hva holder denne linjen høy? Siden du sprenger 2n7000 så er det i alle fall 0.3A der. Det indikerer vel at noe holder linjen aktivt høyt, og ikke bare er en pullup-motstand. Spørs om det er et sikkrhetssystem her som f.eks låser opp dørene dersom bilen mister strømmen. Om man i så fall setter inn en Powerdriver eller kraftigere MOSFET risikerer man strengt talt bare å sprenge den enheten som legger linjen høy. (Ser at sikiringen totalt er på 20A for hele Låssystemet, så det er ikke sikkert det er sikringen som ryker først, uansett er det skodd for å kunne dra litt...) Uansett er MOSFETer på flere Amp gjerne større enn det du får plass til i kassa til OVMSen vil jeg tro.

Den enkleste, men mest intrusive løsninen, er da, som du sier, å drive et relé for hver linje. Da ville jeg valgt å fysisk kutte eksiterende linje med releet og kople signalmottaker til jord i en kort periode. inaktiv-mode på reléet vil være originalt oppsett.

Er det mulig å finne ut hva som står i hver ende av denne linja? Er det noen med verkstedsmanual eller tilsvarende?

Forøvrig var skjemaet for OVMSen veldig pent og oversiktlig, pin-headeren har jo både +5V og +12V i tillegg til TTL porter og GND så der burde man jo kunne bygge hva man vil :) Takk for informasjonen.
Tittel: Sv: OVMS for Think
Skrevet av: Warlocktorsdag 05. desember 2013, klokken 03:11
Har krabbet litt i dørken i dag :)
Tenkte jeg skulle måle hvor mange amp som trekkes dersom jeg jorder lock/unlock-signalene. Fikk ikke målt så mye AMP egentlig, det virker om om de står i tri-state når de kan aktiveres, og aktiveres ved en pulldown-puls, slik du har forklart hma. Tror ikke det er fare for å grille noe, for med en gang man kjører pulldown går linja til 0V og reléet aktiveres. Den andre linja går da til tristate (lock linja lå vel på ~3,5V i alle fall).

Fargekodene til kablene var noe anneledes på denne thinken (og det var svært mange testkontakter under der), men pin-outen stemte så de gikk greit å lokalisere. Er vel bare å kjøre på med MOSFET som tåler litt? f.eks en "inteligent" effekt-FET ala denne: https://www.elfaelektronikk.no/elfa3~no_no/elfa/init.do?item=71-014-32&toc=19189 .

Jeg tegnet også et lite overflatemontert kretskort for den, SOT-223 er sikkert liten nok, kretskortet blir ca 2x4cm, og bør få plass inne i OVMS-kassa. Pull-up motstandene du hadde satt på er strengt talt ikke nødvendige, linja er allerede kontrollert, det er Open Drain, og den stjeler derfor bare i verste fall 2mA kontinuerlig dersom motstanden er der... Om man virkelig vil ha de der kan overflatemonterte lett legges til i ettertid mellom Source og Drain (pin 2 og 3 på hver FET).

Hadde egentlig tenkt å legge ved ett bilde her, men fant ikke noen attach-mulighet? mulig jeg er for Newbie :)

Kan være jeg kan få freset opp noen kort i helga, vi får se :)
(http://home.nvg.org/~warlock/tc_ovms_exp/TC_OVMS_switchboard.png)
Tittel: Sv: OVMS for Think
Skrevet av: habazotfredag 06. desember 2013, klokken 09:48
Juhu, enno ein som er kåt på duppedittar! :)
Eg har fått tips av hma på kretsar og har ein pose med assorterte mosfets som eg tenkte å sy saman til ein krets inni OVMS boksen, men her ser det ut som andre er foran meg i sporet igjen :)
Dersom me finn ei varig løysing på brennande mosfets er det nok fleire som er interessert i kretskort og slikt (hint hint).. :)
Tittel: Sv: OVMS for Think
Skrevet av: Warlockfredag 06. desember 2013, klokken 16:46
Ja hvorfor ikke? lage 2 tar jo bare dobbelt så lang tid, og 3 tar jo bare 2/3 av det igjen, så før eller senere sparer man vel litt oxo ;)

Er litt spent på hva som egentlig griller transistorene, eller om det rett og slett bare er for høy strøm for 2n7000.

Har tenkt å teste litt i helga, forhåpentligvis kommer jeg opp med noe. Men er det noen som har pinouten ti CDCM, aller helst tegning (eller bilde). Da slipper jeg å lete så mye etter riktig ledning/finne ut av pinnummereringen :)

Fant forøvrig til slutt VCU på venstre side av rattet (ganske synlig), så da er damas think versjon 2 da? Var ikke mye spor av GSM og GPS antenner, så jeg får vel til slutt anskaffe meg hele pakka. Monterbar OBDIIsplitter blir nok min tilkoplingsløsning.
Tittel: Sv: OVMS for Think
Skrevet av: Warlockonsdag 18. desember 2013, klokken 01:30
Bare en liten oppdatering

Har ikke fått enheten min ennå, men har testet opp og gjennlåsing, og det ser ut til å funke med å trekke dissa lav, uten å sprenge transistoren jeg prøvde med (den var på 1A, plukket bare en tilfeldig fra en boks her.)

Har fått freset opp noen testkort (bilde).
Det tok lengre tid en forventet å få deler fr RS og Elfa i disse juletider, så jeg får nok ikke tid til å teste så mye mer før jeg reiser vekk i jula. Virker uansett overkommelig ut. Kortet har tatt høyde for å kunne sende 12V til 3 linjer, men begrensingen her er OVMSens egen interne sikring på .5A alternativt må man hente ekstern kilde for dette, så dette må nok testes litt mer.

(http://home.nvg.org/~warlock/tc_ovms_exp/2013-12-08%2000.11.39.jpg)

(http://home.nvg.org/~warlock/tc_ovms_exp/2013-12-08%2001.05.27.jpg)

(http://home.nvg.org/~warlock/tc_ovms_exp/TC_OVMS_switchboard_R2.png)
Tittel: Sv: OVMS for Think
Skrevet av: Warlocklørdag 15. februar 2014, klokken 14:37
Har endelig fått enheten min, det tok _laaaang_ tid....
Har fått testet litt nå, og ja, dørene (rettere linjene til disse) drives av releer. For å unngå å sprenge transistorene bør man ha noen med intern beskyttelse eller en flyback-diode til 12V lederen (ikke til jord, det hjelper ikke).
Pinheaderen på OVMSen er også 2mm, ikke 2,54mm, så jeg må nok uansett redesigne litt igjen. Har forøvrig en ide om å bruke innmaten til en gammel Ford-nøkkel for en kabelfri (og mindre intrusiv) metode for opplåsing av dørene, siden vi ikke har RAC kontakten i vår bil (den kontakten ser ut til å ha både airbag og dører tilgjengelig).

Tittel: Sv: OVMS for Think
Skrevet av: svingensøndag 18. mai 2014, klokken 07:50
dere har kommet utrolig langt på utvikling av OVMS til think og virker som er mange "luringer" her.
det har og blitt laget som dere kjenner til en OVMS versjon til trillingene, (laget av test0 dyktig kar men dyktig folk har ofte får mye og gjøre så har han ikke hat tid til og se på det her) http://elbilforum.no/forum/index.php/topic,9539.135.html) men det er ikke kommet i mål med tanke på starte oppvarming av bilen.
Ut fra hva jeg leser her det "hardware mod" ble det noen gang forsøkt og bruke can bus meldinger til og gjøre jobben? eller fungerte ikke det? er det rett og slett vansklig og skrive til can buss meldinger? eller er det risiko forbunet med det?
er del info her http://myimiev.com/forum/viewtopic.php?f=25&t=763&sid=cb2054b3fdf9ae6de52c00ab074e05c4&start=90 og det siste som ble sagt er det....

PID 3A4
byte 0, bits 0-3: heating level (7 is off, under 7 is cooling, over 7 is heating)
byte 0, bit 7: AC on (ventilation dial pressed)
byte 0, bit 5: MAX heating (heating dial pressed)
byte 0, bit 6: air recirculation (ventilation direction dial pressed)

byte 1, bits 0-3: ventilation level (if AUTO is chosen, the automatically calculated level is returned)
byte 1, bits 4-7: ventilation direction (1-2 face, 3 legs+face, 4 -5legs, 6 legs+windshield 7-9 windshield)
Er det mulig og sende can bus meldinger enda bilen står av? eller må bilen stå på? må få bestilt meg blåtann dongle så kan teste mere på det her,ut fra hva jeg leser så ser det ikke så vansklig ut og sende de can bus medlingene her? ville vært utrolig kjekt og få OVMS til og varme bilen til vinteren så var godt og varm bil :)

Tittel: Sv: OVMS for Think
Skrevet av: svingensøndag 24. august 2014, klokken 23:29
gammel post det her,driver og vurdere og montere en så enkelt som defa i bilen men ønsker og kunne stoppe/starten den som jeg vil via OVMS.
Er det mulig og få det til på en enkel måte? blir får mye strøm til og gå "via" ovms så må være et rele av noe slag.
noen kreative som har løsning på det?
Tittel: Sv: OVMS for Think
Skrevet av: jim3cantostorsdag 27. august 2015, klokken 17:07
Sitat fra: hma på søndag 04. august 2013, klokken 22:46
Great to hear that more people are joining :)
My purchaselist was:
- OVMS Car module V2 ($99 FastTech)
- PICKIT3 Programmer ($26 FastTech)
- OVMS Data Cable or similar DB9 ($9,5 FastTech) (I got two cables for some reason, so maybe there is one included with the OVMS module...?)
- SMA male to Fakra C male RG174 ($6)
http://www.ebay.com/itm/Fakra-SMB-C-5005-plug-to-SMA-male-6-RG174-pigtail-GPS-Telematics-Navigation-/320978360903?pt=LH_DefaultDomain_0&hash=item4abbcd1a47
- SMA male to Fakra D male RG174 ($6)
http://www.ebay.com/itm/Fakra-SMB-D-4004-male-plug-to-SMA-male-6-RG174-pigtail-cable-GSM-antenna-/320978361964?pt=LH_DefaultDomain_0&hash=item4abbcd1e6c
- SIM (SMS + gprs)

There are some info about the CAN-messages in the code (autorun.bas) for the new-Nikometer https://sites.google.com/site/theevmonitor/think-ev-monitor/download (https://sites.google.com/site/theevmonitor/think-ev-monitor/download)

Some hints in setting up the can for OVMS is setting up filters and masks for the specific messages you want to interrogate by the App or SMS.
I've made a simple testfile this evening, but have not compiled the project for testing in the ohms-unit. If successful I will publish here.
Looking forward to hear from your progress.

Hello,

could somebody write down current installation procedure for use the OVMS module (with no HW modifications) in the Think city? 

Just following this post:

http://elbilforum.no/forum/index.php/topic,6755.msg108213.html#msg108213

with the .hex file from this one:

http://elbilforum.no/forum/index.php/topic,6755.msg142932.html#msg142932

should work?

If somebodby sells an used unit I could be also interested.

I have a 2012 model (A306?) with zebra battery.

thanks

P.D.: I have attached an image with tentative purchase list from FastTech. Any other thing needed apart from the SIM card?
Tittel: Sv: OVMS for Think
Skrevet av: jim3cantossøndag 29. november 2015, klokken 19:50
Sitat fra: hma på tirsdag 13. august 2013, klokken 02:10
[edit]: Latest firmware (hex file) is from now kept in my last thread in this post!

The OVMS is now up and running both on SMS and on the App, presenting charging parameters (line voltage and current), SOC, Charge state, battery temperature and GPS location.

The hex file which I've made (OVMS-ThinkCity_13082013_v1-0_hex.txt) is attached and can be used of all.
Please rename the file before use to OVMS-ThinkCity_13082013_v1-0.hex
The version is only tested on Zebra-Think with gen1-PCU, but I might think it will work on all cars ...
You can flash is from any computer (Win, Linux and Mac) with free MPLAB X IDE.
You don't need to know much about programming to flash it to a ovms-unit.

The only two things you need to make sure of is:
1) "Preserve EEPROM memory" is checked (otherwise you need to give all SMS-commands every time you reprogram)
2) Make your programmer (PICKIT 2 or PICKIT3) supply +5V to the OVMS module.

Preserve EEPROM and set +5V:
1) Start MPLAB X IDE -> Run -> Set Project Configuration -> Customize
2) Click on your programmer, drop down "Option Categories" = "Memories to Program"
3) Check "Preserve EEPOROM memory" -> Apply
4) Click on your programmer, drop down "Option Categories" = "Power"
5) Check "Power target circuit from PIKkit" and chose Voltage level 5.0
6) Apply -> OK


To flash your OVMS unit:
1) Start MPLAB X IDE, click "File" and then "Import Hex (Prebuilt)  Project"
2) Prebuilt filename : browse to your hex.file (OVMS-ThinkCity_13082013_v1-0.hex)
3) Family: "Advanced 8-bit MCUs (PIC18)
4) Device: PIC18F2685
5) Hardware tool: "click on your programming device, e.g. PICkit3
6) Next -> Next -> Finish
7) Check that programming was finished successful.





To get it running, simply follow this manual (for Tesla Roadster) in detail, it works for all vehicles:
https://raw.github.com/markwj/Open-Vehicle-Monitoring-System/master/docs/OVMS_UserGuide_TeslaRoadster.pdf (https://raw.github.com/markwj/Open-Vehicle-Monitoring-System/master/docs/OVMS_UserGuide_TeslaRoadster.pdf)
I strongly recommend you to write down all users and passwords according do page 6 in the document


The SMS registration needed to configure are the following commands (this is explained in the manual above):
REGISTER OVMS
PASS "your_ovms_modul_password" (the passord is set in this command) e.g. PASS OvModSecret123
MODULE "your self made Vehicle ID" K - TC  (TC = Think City, K = Km) e.g. MODULE NO5001 K - TC
SERVER 64.111.70.40 "your Open Vehicle Password" -  e.g. SERVER 64.111.70.40 OvServSecret123 -
GPRS "apn" - - (apn can be telenor or netcom or whatever your provider have) e.g. GPRS telenor - -

You can check if the GPRS-settings are OK by sending
GPRS?


Good luck, and please report back if someone tries this! :)

/Håkon

Ok. After two months waiting for the module to arrive, OVMS is up and running with "Zebralín". Instructions above still are fine. In my case, I had to use 4.5V instead of 5V in the project options and I think you have to import first the .hex file in a new project to be able to change the value of options (preserve EEPROM and voltage). Then, select RUN to program the device.

thanks