Author Topic: Stm32f105 ARM based dauther board for vems for canbus  (Read 33393 times)

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Stm32f105 ARM based dauther board for vems for canbus
« on: August 05, 2017, 05:13:27 pm »
There have been a lot of years down the road as I am making new vems installation in my new car, I see that still there is no progress on vems 4.0 based on ARM proc.

As I was developing some gadgets like gnss based car alarm systems,  jetski control etc,  I was using atmega128 just like vems. But this is ten years later and atmega is slow and small and absolite embedded controller. And starting of this year I have switched to stm32f105 ARM cortex m3 controller with 2 canbus and USB periferial on-board.

So, as I am working on canbus on many cars with my alarm system. Well actually reverse engineering on canbus on many cars and as my new project car is 2001. Old Astra coupe bertone I woould like to use my knowledge and implement my canbus system in Astra just like in new vw or audi.

So, I would have 5 or 6 ecus around the car (for every door) to control everything over canbus. Why? Because I can. :-)

So let's get to the vems. I need some kind of input output interface to vems so I can relay everything to canbus and back. Vems would just control the engine. Everything else would relie on canbus.

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #1 on: August 05, 2017, 05:21:55 pm »
Ok. Let me explains how I would do this.
I would use any information I can get over aim protocol and relay it to my canbus network.
Also I would emulate tpic6a259 with ARM daughter board to relay some commands over canbus (like fan fuelpump etc)  and also I would remove mcp3208 and emulate it with my ARM daughter board. So I could receive commands and values like throttle pedal through canbus and relay this information to vems.

Vems would think it got analog value from mcp3208 while in fact it would receive it from canbus and ARM daughter board.

I was talking to mwfire to enables me some kind of access to vems through SPI but he said that canbus is pointless and not needed.
I was also thinking of emulating SD card on my ARM daughter board and that way get all the info from vems all the time.

This daughter board card opens many advantages like OBD  emulating. Or even stock ecu engine emulating so gearbox like dsg would work etc.

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #2 on: August 05, 2017, 05:25:17 pm »
I have many ideas. My knowledge of programming embedded systems and canbus is huge.
And I would like to help bring vems to the 21st century but I didn't get any support from the man I know in the vems development team so I am asking here.

I can always go the way I know the best. Reverse engineering. But I think that we could get better resaults if we cooperate.

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #3 on: August 05, 2017, 05:32:13 pm »
Btw I am willing to share my achivement with vems team and maybe bring this device and options to everybody who want new daily car working on vems without losing any feature like a.c. etc dsg and so on.

Offline gunni

  • Hero Member
  • *****
  • Posts: 1492
  • BHP: 37
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #4 on: August 07, 2017, 10:44:02 am »
Your ambitions to work with VEMS should be welcomed by VEMS. They could get you to write some code without having to give you full access as they are worried that people take the code and use it for themselves I guess. NDA would be obvious.

However, I understand that there is minimal if any more room for improvements (more code) on the Atmega chip currently in the ECU so the Atmega hardware as it is now is pretty much at maximum capacity and has been for a some years. Which I´m sure is clear to anyone seeing the development of the firmware in the last few years. More anytrim stuff, no complete new strategies apart from traction control, an example would be proper ethanol content, i.e. different boost levels, ignition tables, fuel tables etc with varying ethanol content (in my oppinion anytrim is definitely not enough).

Anyway, rumour has it that VEMS is working on introducing a new processor which according to what I remember it is very comparable to what you find in todays medium priced ECUs if not better, this would set of another wave of firmware builds coming out as current strategies and new ones can be built without the current restrictions of the Atmega processor. I don´t know in what form they will introduce it or when.

But VEMS without a doubt can see that the current processor and the firmware it supports and their level of sales are not sustainable for much longer as other cheaper ECUs get better and eat into the same market segment VEMS operates in (ECUmaster, MS3 etc.)

The proposed new processor is from the STM family.

Personally a new processor couldn´t come any sooner.

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #5 on: August 09, 2017, 12:30:21 pm »
Thank you gunni for reply. I'm aware that VEMS is working on 4.0 on a new processor. I hope it is an ARM based one.
I'm aware of mega limitations, so I was proposing a daughter board based on ARM to supersede those limitations.

In the meantime I understood that there is aim2can daughter board based on STM32F103, but there is no schematics or any further documentation about it...

Offline Kamuto

  • Hero Member
  • *****
  • Posts: 814
  • BHP: 19
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #6 on: August 09, 2017, 07:35:47 pm »
Thank you gunni for reply. I'm aware that VEMS is working on 4.0 on a new processor. I hope it is an ARM based one.
I'm aware of mega limitations, so I was proposing a daughter board based on ARM to supersede those limitations.

In the meantime I understood that there is aim2can daughter board based on STM32F103, but there is no schematics or any further documentation about it...

what do you want from it? it is made just to provide can signal to the dash with some main parameters
Vems installer in Lithuania
[email protected]

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #7 on: August 09, 2017, 09:55:53 pm »
Kamuto, I want to relay commands from outputs to canbus and also want to relay commands from canbus to vems.
So I want virtual analog inputs (pedal, all sort of enabling buttons) to be received from canbus and acknowledged by vems. I would have 14 analog inputs relayed from canbus just by emulating mcp3208 and analog multiplexing.
Also I would relay p259 outputs to canbus and all I could get on aim.
Also daughter board would emulate real obd 2 for legal car inspection.

Offline fphil

  • Sr. Member
  • ****
  • Posts: 398
  • BHP: 6
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #8 on: August 10, 2017, 08:28:41 am »
.. and let the atmega to only drive the engine, It is more a sister board which has to take care of the outside world than a daughter. I like the concept.

Offline Kamuto

  • Hero Member
  • *****
  • Posts: 814
  • BHP: 19
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #9 on: August 10, 2017, 12:08:48 pm »
Kamuto, I want to relay commands from outputs to canbus and also want to relay commands from canbus to vems.
So I want virtual analog inputs (pedal, all sort of enabling buttons) to be received from canbus and acknowledged by vems. I would have 14 analog inputs relayed from canbus just by emulating mcp3208 and analog multiplexing.
Also I would relay p259 outputs to canbus and all I could get on aim.
Also daughter board would emulate real obd 2 for legal car inspection.
hmn, that sounds pretty complicated and vems wont help you on this I believe :) ant this is pretty much impossible on current v3
Vems installer in Lithuania
[email protected]

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #10 on: August 10, 2017, 12:37:05 pm »
Kamuto, you would be surprised how easy this is... I just need CS_P259 and CS_MCP routed to daughter (sister) board. All other pins are on PROG/LCD port... Well, TX2/RX2 would also be nice to have routed...

And I would have to remove MCP3208, so this daughter board would completely emulate 8 ADC + 6 multiplexed inputs... I could have ADC on daughter board just to cover EGT, all other I could get from canbus. As newer cars do send pedal and all the information through canbus.

And the other way is even easier. I would capture vems commands sent to TPIC6A259, and relay those commands to canbus boards (fans, ac, cluster, etc). Also there is a lot of information in AIM output, so I would relay those as well, and make my own data logging (on tcpip server of course) so I could analyze log at my spare time in comfy sofa.

And for those guys at the technical station, daughter board would emulate OBD2 with the real engine data and VIN and so on...

What do you think about this? Would this be something that you would like to have in your car?

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #11 on: August 10, 2017, 12:45:58 pm »
And if those VEMS guys, acctually find this usefull, they could make another CS_MCP inputs on CS_CAN so we would get even more inputs (digital and analog).

But mwfire sad that there is no way he would change the firmware just for my Astra... I think that this would change his opinion, because, everything I make for my Astra (complete canbus inside the car for the car without canbus), I am willing to donate to VEMS team in order to get in the team... :)

So I would make:
engine compartment canbus module (to operate fans, ac, lights and everything that vems doesn't)
cluster compartment canbus module (to operate all the switches)
cluster itself (to convert older instrument cluster in canbus)
doors canbus module (to operate locks, windows and mirrors)
hood canbus module (to operate rear lights, pumps, etc).

So through the car there would be only canbus wire and power supply.

Offline Kamuto

  • Hero Member
  • *****
  • Posts: 814
  • BHP: 19
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #12 on: August 10, 2017, 01:26:33 pm »
Kamuto, you would be surprised how easy this is... I just need CS_P259 and CS_MCP routed to daughter (sister) board. All other pins are on PROG/LCD port... Well, TX2/RX2 would also be nice to have routed...

And I would have to remove MCP3208, so this daughter board would completely emulate 8 ADC + 6 multiplexed inputs... I could have ADC on daughter board just to cover EGT, all other I could get from canbus. As newer cars do send pedal and all the information through canbus.

And the other way is even easier. I would capture vems commands sent to TPIC6A259, and relay those commands to canbus boards (fans, ac, cluster, etc). Also there is a lot of information in AIM output, so I would relay those as well, and make my own data logging (on tcpip server of course) so I could analyze log at my spare time in comfy sofa.

And for those guys at the technical station, daughter board would emulate OBD2 with the real engine data and VIN and so on...

What do you think about this? Would this be something that you would like to have in your car?

cant imagine board installed in ecu, but yes that's possible, anyway, that will cover astra only :) anyway still possible to program whatever you like it. but I dont think anyone will change current vems fw regarding that.
Vems installer in Lithuania
[email protected]

Offline Kamuto

  • Hero Member
  • *****
  • Posts: 814
  • BHP: 19
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #13 on: August 10, 2017, 01:32:29 pm »
anyway fill viki page, pretty much none of devs are siting here :)
Vems installer in Lithuania
[email protected]

Offline mr_g

  • Full Member
  • ***
  • Posts: 205
  • BHP: 9
Re: Stm32f105 ARM based dauther board for vems for canbus
« Reply #14 on: August 11, 2017, 07:12:19 am »
Kamuto, you would be surprised how easy this is... I just need CS_P259 and CS_MCP routed to daughter (sister) board. All other pins are on PROG/LCD port... Well, TX2/RX2 would also be nice to have routed...

And I would have to remove MCP3208, so this daughter board would completely emulate 8 ADC + 6 multiplexed inputs... I could have ADC on daughter board just to cover EGT, all other I could get from canbus. As newer cars do send pedal and all the information through canbus.

And the other way is even easier. I would capture vems commands sent to TPIC6A259, and relay those commands to canbus boards (fans, ac, cluster, etc). Also there is a lot of information in AIM output, so I would relay those as well, and make my own data logging (on tcpip server of course) so I could analyze log at my spare time in comfy sofa.

And for those guys at the technical station, daughter board would emulate OBD2 with the real engine data and VIN and so on...

What do you think about this? Would this be something that you would like to have in your car?

cant imagine board installed in ecu, but yes that's possible, anyway, that will cover astra only :) anyway still possible to program whatever you like it. but I dont think anyone will change current vems fw regarding that.

Why not? It's just like SD CARD board.... It is small and plugged on ISPI+LCD port... The funny thing is I don't need them to change fw for 14 analog inputs and 8 digital outputs plus aim all relayed to canbus..

But if they would cooperate, we all would benefit with more than 14 analog inputs relayed from canbus...

I would make it open source and cheap if they don't wont to cooperate.