For any add-on boards such as VR conditioners, optos and OEM interface boards
By dazq
#7963
I like your thinking, but the reason im getting through so much memory is to allow it to be programmable via TS, if it was hard coded for each device it would be a lot less.if i put pass through comms into another device piggy on the bridge then that device wiuld need the memory capacity...(downward spiral...)
I think if i go with the mapping table idea i can store it externally in fram,eeprom or similar.i just need to work out how to do struct tables into an external memory?
User avatar
By ktop
#27299
hey!

bringing back the topic from the silence.
I wanted to explore CANBUS a bit and play with it. I've already have ordered the 2515 module for arduino and a canbus enabled instrument cluster. I think that is one of the easiest options to start with.
I was thinking lately also that I could get data from Speeduino and convert them to canbus. My intention so far is for the specific cluster.
I like your project. You employ a mega2560 for the memory and the serials ? I wanted to either use a Uno or a nano, since I have them basically. I guess that the original code that you have for the bridge will not work on an Uno, correct ?
My requirements so far is for hardcoded values on the CANBUS for the cluster and only few values like RPM, speed, temp for now.
For the rest like fuel or turn signals, alarms etc I haven't decided how it will be done yet, but I guess all of them end up in a way behind the dash, so an arduino (the same?) to check inputs and send the CANBUS signals to the cluster will do.
By dazq
#27303
ktop wrote: Fri Jul 27, 2018 12:24 pm hey!

bringing back the topic from the silence.
I wanted to explore CANBUS a bit and play with it. I've already have ordered the 2515 module for arduino and a canbus enabled instrument cluster. I think that is one of the easiest options to start with.
I was thinking lately also that I could get data from Speeduino and convert them to canbus. My intention so far is for the specific cluster.
I like your project. You employ a mega2560 for the memory and the serials ? I wanted to either use a Uno or a nano, since I have them basically. I guess that the original code that you have for the bridge will not work on an Uno, correct ?
My requirements so far is for hardcoded values on the CANBUS for the cluster and only few values like RPM, speed, temp for now.
For the rest like fuel or turn signals, alarms etc I haven't decided how it will be done yet, but I guess all of them end up in a way behind the dash, so an arduino (the same?) to check inputs and send the CANBUS signals to the cluster will do.
My suggestion to you would be to use a mega as your bridge Arduino for a few reasons.
It has a few hardware serial ports making connection to the speeduino easier.
It has loads of spare analog and digital pins in to connect your additional sensors and switches.

Take a look at my gpio STD code it will give you a big head start on what you are doing.
It communicates with speeduino,
It reads analog and digital inputs
Outputs digital signals if rqd
Finally it has canbus periodic transmission all setup, you just need to add your instrument specific command to the transmission list in the code. :-)
Speeduino can now read in additional analog and digital values on local io pins, these can be sent via serial3 to the external device too.

My gpio was created to be a bcu( body control unit) and thus collate and broadcast canbus data including to my dash/instruments.

If I can help in any way let me know
:-)
User avatar
By ktop
#27393
thanks a lot for the info Dazq!
I still need to wait to receive my canbus shield. I will take a look on the code.
I already read the documentation for this, but I'm not really sure if it will work ok with the 2515 shield. I need to take a look on the shield once it's in and see what I can do.
In theory it should work with the Uno also, since Uno has 1 HW serial, but if I can avoid re-coding, I will, of course with reference to your work/code.
I will try to compile/upload/test the GPIO STD on the mega once the shield is in firstly, then we shall see.

One question that it was not clear from the documentation of the GPIO. Have you made a specific shield/board ? Which 2515 canbus module did you use ? (there are 2-3 I think)
Is there any hw example design ? eg a pic with the in/outs etc ?

and lastly, I still don't know how I will convert (if I will) the speedo cable to digital, or should I take the calculated value from speeduino or calculate it in the second arduino ? Any thoughts would be great.
My initial idea was either to take it from speeduino (don't remember if it's there as a value) or calculate it from the revs somehow (still under investigation)
By dazq
#27394
The issue with the uno is it had just one hardware serial. You need two for reliable data transfer (the softserial library is a time hogger)
I use these mcp2515 modules for testing
https://m.ebay.com/itm/MCP2515-CAN-Bus- ... nav=SEARCH

I have yet to finish a design for a universal gpio board design(although it is nearly done), my use of the code is in rather more hardware specific devices.

The pin list is defined in a similar manner to speedy in utils.ino.
Where I differ is the io sets a port.eg a pin is assigned to port in1 . Then when configuring in TS you select the port number NOT the pin number.
I have some vss code that is planned to be added(some of it is in gpio STD)
Speedy has no vss value at this time.
Alternatively you could calc the speed using the rpm from speedy and the gear selected?
User avatar
By ktop
#27398
thanks again for the detailed replies.

The module on ebay looks like only receiving part. hmmm .
I actually got this one: https://www.ebay.co.uk/itm/MCP2515-Can- ... 2749.l2649
Still I need to do basic tests etc. so it will take a while :P

VSS would be handy indeed.
Knowing what gear you are into, it's tricky enough. I would probably need sensors (buttons) in every position of the stick, I will explore it for sure.
There are few speed sensors for the miata, I need to check that also. (replacing a MK1 sensor that drives the cable with an MK2 sensor that has some output - that needs to be checked also). I guess that would be a cheaper option.
For other cars, I guess we would need to see it per car basis.
By dazq
#27427
The only difference between your board and mine is yours is layed out as a shield whereas mine is connected on Dupont cables.
An MCP 2515 can both transmit and receive
User avatar
By ktop
#27442
funny since the ads for the small one say it's receiver and the other transceiver.
I will try with the one I got, once it's here and for size I will try the other one I guess. But we have a long way to go until then.
By hannded
#28338
Do you guys have details on this CANBUS bridge? I was wondering if i could connect a WB conditioner that uses CAN protocols to comunicate with the speedo
By dazq
#28339
The only module I have that can read in can data currently is gpio STD, this could send the data to speeduino.
You would be able to log and see the data in TS but speedy currently cannot use that data an input to control fuel and spark values.
An update issue has been raised to enable support for this and is being worked on.

I've managed to dig up a few obscure wiring diag[…]

Niiiice... 8-) Looking forward to your updates![…]

I'd be surprised if its not a 32-bit processor on[…]

I search for the datasheet of the IC and the on[…]

Still can't find what you're looking for?