CAN-BUS Datalogger for Vectrix

120 posts / 0 new
Last post
prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
CAN-BUS Datalogger for Vectrix

Hi,

As part of CAN-BUS analysis i've been working on a CAN-BUS adapter to 'tap' into the CAN messagestream of my Vectrix.
Reason for this is beause I want to use a programmable CAN enabled charger instead of the original ESD or Runke chargers and still use the dashboard to display some usefull information about the battery status like voltage, amps, SOC and such.

I came up with an AVR/Arduino controller with CAN functionality which can read (and later on sent)CAN messages.
At this time it just plugs into the CAN socket in the glovebox and spits out every CAN message it sees on the bus through USB which can be read by any device with USB and serial terminal programm like Putty, Terminal or alike.
I'd figure this could be usefull for other Vectrix users without the expensive Peak adapter because this little device is just $50.

As it is right now it just spits out the raw CAN data in HEX format like this:
0xDeviceID 0xDataByte0 0xDataByte1 0xDataByte2 0xDataByte3 0xDataByte4 0xDataByte5 0xDataByte6 0xDataByte7

But I could configure it like sending out XML format if needed (for example by pressing both brakes and pass switch or something) or sending out status info of switches, dashboard lights and such.

Is someone interested in this or maybe come up eith other functionality requests I can program in the logger ?

Paul

oley
Offline
Last seen: 2 years 1 month ago
Joined: Wednesday, December 2, 2009 - 02:28
Points: 37
Re: CAN-BUS Datalogger for Vectrix

Very interesting project !

Are you using this can bus shield ?
http://www.seeedstudio.com/wiki/CAN-BUS_Shield

Do you plan to distribute the source code of your data logger ?

Regards,
Olivier

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

I'm using a similar type of CAN shield with Leonardo MCU.

Not sure about distributing the source yet, im just focusing on reading and analyzing the CAN data stream besides outputting the raw data output.
Although I can control almost all instrument lights and symbols and fuel gauge on the dash as we speak.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

I did make some progress on the CAN-analyser which ended up in a Vectrix VX1 'Expansion Box' as I will call it.

It's a plug-and-play box which attaches to the CAN socket inside the glovebox. No soldering or additional wiring needed.

After plugging in the box what it does is this:

- It shows an accurate Ah counter on the center odometer when driving faster then 5kmh
- Ah counter value is stored in memory
- Ah counter is user resettable
- Bus voltage is shown on left trip/odometer when driving faster then 5km
- Adjustable maximum battery Ah from 0Ah - 99Ah by using brake handles and kill-switch
- Fuel gauge is showing appropriate values according to measured Ah counter versus set Ah maximum.
- Software in box is user updatable
- Box has USB interface and can provide diagnostic information about the Vectrix

This works with every type of charger/motorcontroller/firmware/battery

I'm still working/expanding on this project but if someone is interested I'll be happy to sell you one for just $45,-

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

Kocho
Offline
Last seen: 8 years 3 months ago
Joined: Friday, March 21, 2014 - 21:05
Points: 488
Re: CAN-BUS Datalogger for Vectrix

That sounds like a great gizmo! Being able to use the instrument panel with an aftermarket charger and get that data on display is nice.

If my currently "dead" Runke charger turns out hard to repair and I end-up with an aftermarket charger (Elcon?) I'll be sure to get one of these from you.

Any photos? Will it (and the socket on the bike) survive the vibrations? Unless this device is really very tiny, It would probably be better to have a short dongle and to secure the device with sticky tape near the plug rather than plug it directly. Direct plug works fine in cars, but on the bike it will shake a lot...

hybride
Offline
Last seen: 1 year 9 months ago
Joined: Friday, August 1, 2014 - 01:10
Points: 145
Re: CAN-BUS Datalogger for Vectrix

This sounds to good to be true, but i know it is true! Well done, very well done. Count me in for 1.

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Made a small update on the 'Expension Box' aka Ah counter:

- 'Ah Used' is calculated as Ah drawn from the battery minus the Ah regenerated into the battery
- when driving faster then 5kmh the 'Ah Used' is shown on center dash
- when driving faster then 5kmh AND in regen mode (braking with throttle) the 'Ah Regen' is shown with the '-' minus sign

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

RuFuS
RuFuS's picture
Offline
Last seen: 8 years 7 months ago
Joined: Wednesday, August 13, 2008 - 13:53
Points: 70
Re: CAN-BUS Datalogger for Vectrix

Hi everyone.

We are also developing this kind of features for our Vectrix Premium customers.

By now, we only shared this:

https://www.facebook.com/394314527332539/photos/a.501230563307601.1073741837.394314527332539/761675807263074/?type=1&theater

It will make much more things than a simple "data logger" and will communicate with mobile devices.

Sooner there will be more details about it.

Best Regards,
RuFuS
FuelFree Motos Team

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Just another update on the 'Expension Box' (I think I can say it has superseded the name/function of 'data-logger' ):

The left ODO/TRIPmeter can now show following items:
- ODOmeter or TRIP A/B (default setting)
- Actual Bus Voltage
- Actual Bus current (preceded with '-' when in regeneration)
- Total Ah used from battery since last user reset
- Total Ah regenerated into battery since last user reset

More items can be added on request like temperature values, pack voltages etc etc.

Selecting the item to show is done by using the left brake handle with killswitch on.
After selecting the item it will be shown until scooter is switched off.

I got some questions about the box and will try to upload a picture of it:
It has a 15cm of cable on it which plugs right into the diagnostic socket into the glovebox.
The 'Expension Box' itself can be taped with double sided tape or velcro to the inside of the glovebox.
Upgrading of any future firmware can be easily done by a simple upload program and standard USB cable with any Windows PC.

Planned updates:
- bluetooth support
- wifi support
- XML export of all live CAN-bus data though USB (is already there but needs more attention)
- cruise-control enabler :-)
- integrated control to CAN-enabled chargers like Elcon or ThunderStruck

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Here's another update on the Expension Box (EB):

The following 11 items can be shown on the left bottom odo/trip meter display:
1 - Actual Bus voltage (preceded with '-' when in regeneration)
2 - Actual Bus current (preceded with '-' when in regeneration)
3 - Ah used/withdrawn from battery since last reset
4 - Ah regenerated (into battery since last reset
5/7 - Capacitor 1,2,3 temperatures
8/10 - Current 1,2,3 sensors values
11 - standard ODO/trip meter

The item to view can be chosen by selecting the left brake while standing still and killswitch is off.
The selected item is stored in non-volatile memory of the EB until another item is selected.

The center ODOmeter shows the total used Ah ,that is Ah withdrawn minus the Ah regenerated.
This value is shown when driving faster then 5kmh.
The Ah numbers are shown in tens of Ah , so 123 is actually 12,3 Ah.
These values can be reset to 0 manually by selecting both brakes with killswitch of for more then 3 seconds.

foto 2(1).JPG

This is the EB as it is, i'm looking for a smaller enclosure and STP cable between EB and plug.

foto 2.JPG

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

BLUESTREAK
Offline
Last seen: 5 years 11 months ago
Joined: Sunday, November 15, 2009 - 19:55
Points: 282
Re: CAN-BUS Datalogger for Vectrix

That is one nice piece 0f work keep going my good man.

Kocho
Offline
Last seen: 8 years 3 months ago
Joined: Friday, March 21, 2014 - 21:05
Points: 488
Re: CAN-BUS Datalogger for Vectrix

This looks better and better, and the price is very reasonable too! The bike should have come with this from the factory...

bm3
Offline
Last seen: 5 months 4 weeks ago
Joined: Saturday, January 5, 2008 - 11:46
Points: 48
Re: CAN-BUS Datalogger for Vectrix

I read this today and think you do a great job ! Sent you a PM .

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Here's another update after some more testing:

The box has been tested with both ESD and Runke chargers with the following firmware

mc1014b with ESD charger and Laird firmware
mc1021 with Runke charger and bc3001 firmware

Reset of the Ah counters is done automatically after any charging cycle or can be done manually.

I'm currently working on an enhanced version which supports the ThunderStruck modular CH4100 2500W charger.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

BLUESTREAK
Offline
Last seen: 5 years 11 months ago
Joined: Sunday, November 15, 2009 - 19:55
Points: 282
Re: CAN-BUS Datalogger for Vectrix

I bought this logger and am waiting for it to arrive, I think it may be useful for someone like that's not good with the computer so you guys better get your order in.

hybride
Offline
Last seen: 1 year 9 months ago
Joined: Friday, August 1, 2014 - 01:10
Points: 145
Re: CAN-BUS Datalogger for Vectrix

Firmware upgrade's in Prensel's magic box can be flashed easily at home with Arduino builder on Win 8(.1)

First download and install the Arduino software: http://www.arduino.cc/en/Main/Software

Then download Arduinobuilder here: http://sourceforge.net/projects/arduinodev/files/ArduinoBuilder/

Connect the Box with usb cable to the PC. Start Arduinobuilder. Choose Leonardo and 16mhz.

Load a .hex provided by Prensel and press COM3 button (or whathever COM port is configurated on your PC)

Programm will be flashed then.

//i61.tinypic.com/2rmxxet.png)

bm3
Offline
Last seen: 5 months 4 weeks ago
Joined: Saturday, January 5, 2008 - 11:46
Points: 48
Re: CAN-BUS Datalogger for Vectrix

Updating worked for me finally with the Arduino builder under Windows.
Before I used it I tried out updating with avrdude under Debian and with Atmel Studio 6.1 but without success.

greetings

Klaus

BLUESTREAK
Offline
Last seen: 5 years 11 months ago
Joined: Sunday, November 15, 2009 - 19:55
Points: 282
Re: CAN-BUS Datalogger for Vectrix

HI my data logger came friday late and I just tried it out just a little, it's hard to belive that after all those years VECTRIX"S eng. could not have made the bike work like this device does, what were they doing with all their time?after all they did make the best looking and structural bike body made. better contact PRENSEL soon and see if he has any more.2015-05-27 11.59.56_0.jpg

goodgnus
Offline
Last seen: 9 years 5 months ago
Joined: Monday, January 7, 2013 - 19:32
Points: 8
Re: CAN-BUS Datalogger for Vectrix

Greetings! I'm looking to have a CANBUS data logger developed for a Bionx electric bike. It would need to be an inline/passthrough device using Hirose HR30 connectors as there is no diagnostic port. I've already got this device for programming (using a hex file developed to re-write very specific portions of the firmware), but what I want to do is just listen to everything going on.

http://www.chip45.com/products/crumb128-can-dongle_at90can128_usb_can.php

Your thoughts please!

israndy
israndy's picture
Offline
Last seen: 1 month 5 days ago
Joined: Tuesday, June 17, 2008 - 08:53
Points: 312
Re: CAN-BUS Datalogger for Vectrix

I am impressed that you have gotten the ability to read and write things on the bus. I am curious if you have figured out how to light the wireless icon on the dash. It would be cool if someday someone could light that icon as it communicates with your iphone. I have had all my phones mounted on the handlebars but only ever got to use them for anything but maps and music. Would be nice if diags and charging displayed there too.

-Randy

______________________
I also own a 2018 Tesla Model 3 and a 2012 Mitsubishi iMiev

kingcharles
kingcharles's picture
Offline
Last seen: 2 years 2 months ago
Joined: Monday, August 17, 2009 - 08:41
Points: 408
Re: CAN-BUS Datalogger for Vectrix

what were they doing with all their time? after all they did make the best looking and structural bike body made.

And that was done by Rob Brady.
See robrady.com
He still has some great ideas on his site that never made it. Like the bike stand/charger combo.
Such a pity.

Once you go EV, Gas is history!

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Greetings! I'm looking to have a CANBUS data logger developed for a Bionx electric bike. It would need to be an inline/passthrough device using Hirose HR30 connectors as there is no diagnostic port. I've already got this device for programming (using a hex file developed to re-write very specific portions of the firmware), but what I want to do is just listen to everything going on.

http://www.chip45.com/products/crumb128-can-dongle_at90can128_usb_can.php

Your thoughts please!

I'm not sure what you want.
I looked at the chip45 adapter you've quoted and this allready should provide you with what you need.
Apart from that you could consider buying a general type of CAN-BUS adapter like the one from PeakSystems.
This comes with a pcanview application that gives you all raw can traffic. You only need to make an adapter cable then from DSUB9 to Hirose HR30 connector.
Unforunally the Peak is rather expensive.

I can make a special firmware for my CAN datalogger which spits out every can message on the USB/Serial port.
But then i need to know what CAN bus speed and protocol is used on your bike.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix
what were they doing with all their time? after all they did make the best looking and structural bike body made.

And that was done by Rob Brady.
See robrady.com
He still has some great ideas on his site that never made it. Like the bike stand/charger combo.
Such a pity.

I like the docking station concept but in reality this would not work very well, if at all.
Just think about dirt, salt, ice, snow and whatever that would stick to the lower front legs of the scooter and then try to dock that..
It would be much better if they 'ínvented' something like a roll-on/roll-over inductive type charging system.
Just park the bike anywhere near a system like that and it could be charged.
No fiddling with connectors, adapters, cables or whatever.

Again i nice idea like many others implemented in the Vectrix but in reality not very feasable or practible.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

I am impressed that you have gotten the ability to read and write things on the bus. I am curious if you have figured out how to light the wireless icon on the dash. It would be cool if someday someone could light that icon as it communicates with your iphone. I have had all my phones mounted on the handlebars but only ever got to use them for anything but maps and music. Would be nice if diags and charging displayed there too.

-Randy

I'm working on this :-)
Both wireless and bluetooth sysmbols could be addressed and in future releases of my firmware it will support that.
Together with a BT plugin adapter which provides the data on any BLE enabled device.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

Sugarstorm
Offline
Last seen: 7 years 2 months ago
Joined: Wednesday, February 22, 2012 - 09:37
Points: 49
Re: CAN-BUS Datalogger for Vectrix

I am impressed that you have gotten the ability to read and write things on the bus. I am curious if you have figured out how to light the wireless icon on the dash. It would be cool if someday someone could light that icon as it communicates with your iphone. I have had all my phones mounted on the handlebars but only ever got to use them for anything but maps and music. Would be nice if diags and charging displayed there too.

LOL.
This IS a reality with the FFM Vectrix Spy Log:

http://visforvoltage.org/forum/14056-vectrix-spy-log-fuel-free-motos

Rafael(from FFM) already stated that in a previous post.
We can see all the cells voltage, pack temp, total pack voltage, IGBT temp. All in real time.
We can even change charging power and Ah of the pack, all with an Android smartphone.
It's priceless and should have been standard in all Vectrix from day one. It would have saved a lot of packs. And given lots of usefull information to the Vectrix engineers. If they actually cared about their product.

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Update:

The Magic Box firmware is now at 1.48.

Latest update has:
- temperature simulation
- support for fuel gauge when using aftermarkt chargers
- user selectable options/values

You can find the update and latest manual on The Lairds box location.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

Viajante
Offline
Last seen: 8 years 3 months ago
Joined: Monday, May 18, 2015 - 03:47
Points: 22
Re: CAN-BUS Datalogger for Vectrix

Hi prensel,

im litle doubt coz on the relase note you have "This version of the Magic Box firmware is for Lithium Ion battery chemistries."
so, can i use this relase 1.48 with the NiMh battery ?

kind regards

Anderson
Offline
Last seen: 8 years 7 months ago
Joined: Saturday, October 11, 2008 - 18:28
Points: 142
Re: CAN-BUS Datalogger for Vectrix

I would be interested in getting one if it could reset the fuel gauge, is that possible ?

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

What do you mean with 'reset the fuel gauge' ?

Currently it drives the fuel gauge based on 1: initial SoC at startup and 2: used Ah during driving.
This all with respect to the user settable parameters like battery capacity and upper and lower voltages.
With this method the fuel gauge is following the actual battery status very dynamically because at every trip the SoC is determined at first and used as reference during the trip.
This only works with a linear decharge curve as with Li-ion chemistry batteries like Leaf cells and 18650 cells.

Theres also the possibility to drive the gauge based on a (user adjustable) fixed battery capacity and used Ah during driving.
So you set your battery capacity fixed at ie. 40Ah and that together with the used/generated Ah during driving is used as reference for the fuel gauge.
At every charge the used Ah is reset to 0 and the gauge will be 100% full.

And finally theres a way of driving the gauge based on just battery voltages.
So you set your upper and lower battery voltages and this determines the range of the fuel gauge.
The actual voltage will then be used as gauge.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

Anderson
Offline
Last seen: 8 years 7 months ago
Joined: Saturday, October 11, 2008 - 18:28
Points: 142
Re: CAN-BUS Datalogger for Vectrix

I should have said "I would be interested in getting one if it could make the Vectrix's BMS think it's state of charge is full, is that possible ?"

What I want to do is to have a secondary way of charging the Vectrix using an external charger like the Lairds equalizer charger but the problem is the Vectrix's BMS is off when it's charging so when you turn the Vectrix on it thinks the state of the charge is different then what it is. I thought if your CAN-BUS Datalogger could tell it that it is fully charged and you had fully charged it then that would be useful to have a working fuel gauge.

prensel
Offline
Last seen: 2 years 8 months ago
Joined: Wednesday, January 21, 2015 - 04:52
Points: 136
Re: CAN-BUS Datalogger for Vectrix

Ok I see.
And do you want to let the BMS think its full or just the fuel gauge displaying all bars ie full or whatever SoC it has.?

Regarding the latter it already does that.

===================================
My contribution to EV in The Netherlands
- Novox C20
- Vectrix VX-1 Li+ my2009 #2791
- Vectrix VX-1 Li my2011 #3228
- CityEl Fact4 / Mini El Cabrio
- Th!nk PIV4 A266
- Th!nk City A306
- Tesla Model3 AWD

Pages

Log in or register to post comments


Who's online

There are currently 0 users online.

Who's new

  • eric01
  • Norberto
  • sarim
  • Edd
  • OlaOst

Support V is for Voltage