Help with building your Speeduino, installing it, getting it to run etc.
#67627
Hi everyone, I am trying to get an old dashboard to "work" with an STM32 based speeduino build (SPECTRE design from Tjeerdie).

The plan is to design an interior control unit, at first I plan to only pull data from the speeduino over the CAN bus and send order to smaller modules, likely via a secondary CAN bus. Once that works I plan to add more stuff (like door control modules to control central locking and windows but the idea is to keep those "dumb" and let the main unit decide what orders to give in response to the informations the modules send back) and ideally send requests to the speeduino (turn A/C on, use secondary ignition MAP, etc).

I should finally have some time for myself so I picked the project back up but I'm waiting on the weather to work on finally getting the engine side of things operational (I am having sync loss issues at around 5500 RPM and I can't figure out why but that'll be for another topic later unless I have an eureka moment).

Before going all out and spending time designing something that won't work I would like to do some simple testing and to build some "proof of concept" prototypes, so I hooked up a VP230 module to my spare F407ZGT6 and an MCP2515 one to an ESP32. I have uploaded the autowp/can-usb sketch to the later (I found an edited version for the ESP32 and changed the pinout accordingly) I can connect to it through the CANHacker app but I don't know what to send exactly to get an answer, the loopback test also doesn't seem to work so I don't know if it's even sending anything.

Do you have any simple working example (getting the speeduino to send me any kind of data would be enough) ?
What should I send to the speeduino via the CANHacker to get an answer ?
Do I need to have a particular ID to get its attention ?
#67629
If I understand correctly sending this 02 01 05 55 55 55 55 55 with a random ID (I tried with 1AC) should return the current engine temp (which in my case would be 255 as the circuit is open) right ?

I remembered I had a few nanos lying around so I tried with one of them and the loopback works meaning my wiring is likely wrong on the esp32 (likely the CLK pin as it is the only one I can't edit with this library but I followed the wiring that was given to me so I don't know).

I don't get any answer to the requests I send so I might be doing something wrong or there's a problem with the app/code/wiring (I have put a jumper on the termination resistor of the MCP2515 module but there's nothing on the VP230 side).
By dazq
#67633
Speeduino canbus responds to std obd2 PID requests .
There are several OBD2 code reader firmwares out there you could look at for guidance.
I have collected a fair bit of obd and serial3 for speeduino example code on my GitHub (Autohome2)
#67637
Thank you, I will look that up in the evening if I have some time, is there any specific code reader project you know of that you'd recommend I look up ?
I would like to get at least an answer from the ECU before I start messing around.
By dazq
#67638
The wiki explains which can id you need to be talking on and the pids that are currently supported.
#67639
moussie369 wrote: Mon Mar 25, 2024 12:09 pm Thank you, I will look that up in the evening if I have some time, is there any specific code reader project you know of that you'd recommend I look up ?
I would like to get at least an answer from the ECU before I start messing around.
The ELM datasheets have quite good background information and you can drive the tools from a serial monitor to experiment with the different messages. You can also use the ELM device as a monitor.
#67745
So I looked a bit into it and I bought a few MCP2515 modules and a new TJA1050 to be sure there was no hardware issue and I was able to get a few CAN examples to work (there's only the STM32 left to check but the only example using the internal CAN I could find is way out of my league).
Turns out the MCP2515 I had been using and one of my ESP32 are only partly working so now that the hardware issues are solved I tried again but there's still no answer from the Speeduino, I sent 02 01 05 with the ID 7DF and I can see it's being sent when I check from another board that's in the middle.
When checking under the local/internal auxiliary inputs I have the message "internal CANBUS not available to MCU" so I think there might be a problem with the firmware itself, the thing is I can only make older releases work and I need to do it with the arduino IDE for some reason (last release builds with pio and arduino IDE but won't run, the older ones will build within arduino IDE but won't with pio and I have no idea why).

Now there's only two things I would need, first what exactly is the difference between the "true", "OBD" and "realtime data" CAN addresses in TunerStudio ? Is it that important in my case or are the default parameters enough ?
Secondly, does anyone have an example for using a TJA1050 with the internal CAN controller of the STM32 ? The libraries I could find seem meant to be used with an MCP2515 and therefore not the internal controller.
By dazq
#67764
Using the default broadcast address (07df) will get you working ok.
Pazi88 has stm32 can examples with his can library ( see his GitHub or I have a fork on my GitHub(autohome2) also.
Have you selected the correct board type in TS?
Also have you selected the correct MCU type in TS too??
Posting your tune here will help us .
#67770
I will try Pazi88's library in the afternoon, I selected STM32 during project creation, by board type do you mean the one under "engine constants" ? If so I selected Black STM32F407VET6 V0.1 as there doesn't seem to be anything else that would match (but I may be wrong).
I attached two tunes, the generic "MyCar" one is the one I am currently using on the bare STM32 board, the other one is the one that matches the full board that's in the car right now, I will give it a shot this afternoon just in case the problem comes from the board or the fact I have to build the firmware with the arduino IDE (at the time it was loaded on the "real" board I could build via pio but it doesn't work anymore and I can't figure out why).
Attachments
(536.65 KiB) Downloaded 11 times
(546.12 KiB) Downloaded 9 times

Hi there, I'm doing preliminary research and hope[…]

BMW E23 M30B28

Where did the plugs come from? I've heard there ar[…]

Injected 2 stroke Bultaco

Alternator testing. Its a 3 phase circa 200w alter[…]

NO2C crank signal issues

Once again PSIG, thank you. Note this is set up fo[…]

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