Jump to content

DIY vipec display


lekonna

Recommended Posts

  • 3 weeks later...
  • 3 months later...
On 9/10/2012 at 12:13 PM, lekonna said:

 

 

added a button to flip between pages. code also updated.

 

was initially going to add max and min value display on a double click but since i was lazy and didn't solder a small capasitor in the switch i get lots of noise and had to filter it in the interrupt handler to make the button behave better.

 

will think of a way to implement the display for min and max also.

 

the button is wired between digital pin 3 and ground.

sorry to dig this up from its grave. I have looked at this code and tried to get a page flip to work. after not working I checked out the code and I dont see where the page flip would be in code. I have tried to place the code but I am not sure where it should go. anyone have any ideas on this? I believe it should go some where around here.

 

void loop() {
  for(int i=0;i<NR_OF_CHANNELS;i++ )  read_channel();
  if (digitalRead(UP)(millis()-500 > last_click  && flip_request )
  {
    current+=4;
    if (current > NR_OF_CHANNELS - 4) current=0;
    last_click = millis();
    flip_request = 0;
}
flip_request = 0;
display_page();
print_to_serial();
delay(10);
}

 

can someone correct me if I am wrong or point me in the right direction.

Thanks guys!

 

Mike-

Link to comment
Share on other sites

  • 2 weeks later...

I've had a go at this as well using the instructions from Paul (awesome - thanks!). I had a go, but I have questions...

So far I have a 4duino (arduino with integrated 4D Systems screen), had a go at the graphics side (promising) before realising I should focus on making sure I can read and understand the CAN messages from my ECU. The shield is this, which is a 16Mhz Seeed style one. I used a 100R terminating resistor because that's what I had, and will get a 120R. Although its taken me a while (I am starting essentially from scratch), using the code from Paul's website I can successfully connect the arduino to the ECU and get serial display of the "Generic Dash" CAN messages. Questions...

1) If I leave the CAN bitrate at 500kbps, the serial monitor does not report every line (5 out of 13). If I drop it to 125kbps, I see almost all of them (12 of 13 - see pics). It's not always the same missing messages, so ... are they actually missing or not being reported somehow? Changing the "Transmit Rate" even down to 1hz doesn't seem to affect whether they are there or not, just the update speed (as you'd expect).

2) I can see that the instructions Paul provided to decode the CAN stream work (the "96" in the message starting "00" is hex for the 150kpa for the MAP sensor, which I set manually). How do I interpret where it spans two data blocks (eg ECU voltage is "95 04", which should somehow translate to about 1200 (12.00v). 
(edit - I think I figured it out, you take the second number in the pair and put it in front of the first number, then convert from hex. So voltage is 0x0495, which is 1173 (being 11.73v, which is about right as its an old battery on the bench. I wonder how my extremely basic coding skills / google are going to join those pairs together).

(edit again - worked it out - can take the second pair and multiply by 0x100 (or decimal x 256) then add the first pair, so in decimal 4*256 + 149 = 1173)

(and a final edit - have looked at Paul's code which displays on his 4D screen and see exactly this...)

3) For when I get to it, what will the message look like for the Limit Flags? 

(edit - have had a think about it and presumably its a number that is converted to (considered in?) binary and then whether there is a 0 or a 1 in each bit is whether the flag is on - eg CAN message "05" would be binary 101, which is RPM Limit and Speed Limit active (being bits 0 and 2). Am feeling this might be low priority for me as code to pull that out would take me a looong time.

Thanks for any assistance.

125kbps.PNG

500kbps.PNG

Link to comment
Share on other sites

On 11/25/2017 at 10:56 PM, CamB said:

3) For when I get to it, what will the message look like for the Limit Flags? 

(edit - have had a think about it and presumably its a number that is converted to (considered in?) binary and then whether there is a 0 or a 1 in each bit is whether the flag is on - eg CAN message "05" would be binary 101, which is RPM Limit and Speed Limit active (being bits 0 and 2). Am feeling this might be low priority for me as code to pull that out would take me a looong time.

Correct the limit flags are "bit fields".  There is probably some smart way to do it with programmers math but I normally do exactly what you did  - convert to binary and look where the 1's are...  Most aftermaket/programmable CAN devices have "bit masks" for this purpose.

An easier option may just be to change the "generic dash stream" to send out a parameter that is easier to work with such as "% ignition cut".

Link to comment
Share on other sites

Thanks - I've put that part of it far down the list of priorities (although actually may not be too hard using a bit mask after a quick google) as I have decided I am more worried about basic functionality and what I think I've learned so far is:

- at higher bit rates, I think the buffer on the can shield might be overflowing. It definitely misses frames

- easy solution is sending only what I want to know and using 125kbps bit rate. I don't need all 39 items in the generic dash plus another 5-10 "nice to have", so it will be much easier if I just create a custom stream with the ~15 items I really want. I just had it in my head it would be nice to have code someone else could just grab, compile and go with minimal config in PCLink required

Link to comment
Share on other sites

42 minutes ago, CamB said:

Thanks - I've put that part of it far down the list of priorities (although actually may not be too hard using a bit mask after a quick google) as I have decided I am more worried about basic functionality and what I think I've learned so far is:

- at higher bit rates, I think the buffer on the can shield might be overflowing. It definitely misses frames

- easy solution is sending only what I want to know and using 125kbps bit rate. I don't need all 39 items in the generic dash plus another 5-10 "nice to have", so it will be much easier if I just create a custom stream with the ~15 items I really want. I just had it in my head it would be nice to have code someone else could just grab, compile and go with minimal config in PCLink required

Hey CamB,

can you do me a favor. I am having a bit of trouble getting the code I have working.

I am also trying to purchase a can bus cable to connect to my ECU and can't seem to find one, can you point me in the right direction to purchase one of these?

 

Mike-

On 11/21/2017 at 3:47 AM, paulr33 said:

can you post up your complete code or zip it and upload somewhere and i can check it for you

Hey Paul,

here is the code I am using.When you get a chance let me know what you see or think.

 

Mike-

canbus.zip

Link to comment
Share on other sites

11 minutes ago, awpturbo said:

I am also trying to purchase a can bus cable to connect to my ECU and can't seem to find one, can you point me in the right direction to purchase one of these

Tell us what ECU you have and I will tell you what you need to connect to CAN.

Link to comment
Share on other sites

The round port next to the tuning port (without the red o-ring) is the CAN port.  You need the mating 6pin connector.  It is an Amphenol LTW connector, part number AU-06BFFA-LL7001, you will find one at Mouser, Digikey, RS Components etc.

Pinout as follows:

Epgtswo.png

Link to comment
Share on other sites

3 hours ago, awpturbo said:

Hey CamB,

can you do me a favor. I am having a bit of trouble getting the code I have working.

I had a look at your code (based on the original poster's?), and if there is a button on pin 3 it is supposed to flip page when pressed. At least I think it is - I am a complete novice. Although it may be that you need to reword the interrupt as per discussion on "digitalPinToInterrupt(pin)", so it won't matter which board you have:

https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/

Is that the only issue? Or are you having trouble with the CAN side too?

I am using the same code / libraries as Paul - starting with his sketch (thanks!) but with the newest version of the libraries from here:

https://github.com/coryjfowler/MCP_CAN_lib

Link to comment
Share on other sites

  • 3 months later...

hi

the biggest issues i had was getting a working CAN adapter and connection, once i got that working everything else was easy.

are you gettting CAN data correctly from the Vipec ? dont try and troubleshoot it at all at once, focus on one thing, first minimum requirement is are you getting any data from the vipec

 

Link to comment
Share on other sites

  • 5 months later...

hi all

considering a commercial off the shelf replacement screen, namely the PLX SDM 102 pro here;

https://www.plex-tuning.com/product/plex-%ce%bcsdm-102-pro/

The tech manual states to connect it to the Vipec V44 via Serial TX/RX but the product states it supports CAN but they dont use it on the V44? The I44/i88 refer to connecting it via CAN. Is there a reason for this? I dont want to run it via serial

Link to comment
Share on other sites

I assume they use the "Generic Dash Stream" when connected to a i88 via CAN?  The V44/G4 Generic dash CAN stream is very similar with one exception - the "Wideband" parameter was sent as AFR units with 0.01 resolution in the V44, whereas in the I88/G4+ that changed to "Lambda" with a resolution of 0.001. 

Their (Plex) manual is a bit confusing (combined with the higher end dashes), but it looks like it has configurable CAN receive and math channels so you should be able to easily correct the 10X factor at the plex end.  Might pay to confirm that with them too but it looks ok to me.

Link to comment
Share on other sites

On 11/27/2017 at 11:23 PM, Adamw said:

The round port next to the tuning port (without the red o-ring) is the CAN port.  You need the mating 6pin connector.  It is an Amphenol LTW connector, part number AU-06BFFA-LL7001, you will find one at Mouser, Digikey, RS Components etc.

Pinout as follows:

Epgtswo.png

do I actually got this all going and working. I found the connector from an online, I think from mouser or something and made a cable out of CAT 5. I got the code all going and now I just need to get the wiring in order.

 

 

 

 

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...

I used a base project called CAN_recieve and simply modified it to talk to the 4d Display systems screen library and process all the values from my Vipec V44 on Evo 8 setup. 

 

The project is known as mcp_can or CAN_Recieve. I found it in google last time and simply used the free library code to get started.

CAN_recieve.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...