Any general discussion around the firmware, what is does, how it does it etc.
#58013
So this is a little out of scope of Speeduino firmware as such, but I figured I'd ask here in case someone can help. I have an inertia dyno and I'd like to use my 043c speeduino that I have to send data to SimpleDyno. In this case it's not performing any ECU functions.

SimpleDyno comes with a sketch for an Arduino Uno Sketch, but from what I can tell from the pin assignments will not work with how the MEGA is setup with the 043c board, so I need to reassign the pins. But I don't see any pin assignments detailed in the sketch.

Any thoughts on how I could make these inputs work with Simpledyno? Or where I might go to remap them?

Engine RPM
IAT
CLT
AFR
Dyno flywheel RPM (Could I use CPS for this)
#58014
The pin mapping is implicit. You need to change the code so instead of just looping through A0 to A5 it reads the correct channels in Speedy, something
like:
Code: Select all
// do first channel
              AnalogResult = analogRead(insert speedy channel);
             AllResult += ",";
              AllResult += AnalogResult;
// repeat for each channel
              .........................
For clarity you could #define the analogue inputs
Code: Select all
#define SpeedyIAT       0   // IAT is A0
then in the main code it becomes
Code: Select all
AnalogResult = analogRead(SpeedyIAT);
You may also need to change the definitions for the pin change interrupts to match the inputs that Speedy uses for cam and crank.
If you can't understand it then run through some of the Arduino tutorials to familiarize yourself with Arduino programming.
#58019
Thanks so much. I wondered if it was just looking at the pins in sequence but I was just guessing vs knowing.
Maybe I'll try and grab the crank signal to start and see how it goes....

.... So circling back on just getting RPM to work... I'm totally lost on how I can map that to D19 which is used for RPM on the MEGA... Looks like this might need to be explicitly defined too?
Code: Select all
  // Initialize interupts (Pin2 is interrupt 0 = RPM1, Pin3 in interrupt 1 = RPM2)
  attachInterrupt(0,channel1,FALLING);
  attachInterrupt(1,channel2,FALLING);
}
I'll continue thinking out loud in case it helps someone else. So these are not just digital channels, but interrupt ones. On the Uno the two pins being used are

D2 Digital Pin 2 INT0 Interrupt Pin 0
D3 Digital Pin 3INT1 Interrupt Pin 1

Looking to get a a concrete answer what the interrupt pins are on the 2560 board. Turns out the Crank and Cam pin mapping in the 043c board with a mega are interrupts. (This probably seems obvious to anyone with knowledge of arduino)

From https://www.circuitstoday.com/arduino-m ... schematics

Hardware Interrupt Pins :
Digital pin 18 – 21,2,3 hardware interrupt is used for interrupt services. Hardware interrupt must be enabled with global interrupt enable to get interrupt from other devices.

Going to poke around in init.ino for speeduino and see if I can figure something out.. Way above my head here.
#58020
Looking at the schematic and the Mega documentation Speedy uses INT2 and INT3 so you need to change the code to:
Code: Select all
  attachInterrupt(2,channel1,FALLING);
  attachInterrupt(3,channel2,FALLING);
or RISING if thats what you need. I haven't tested that, the correct way to measure RPM is using Input Capture but Speedy doesn't support that.
#58023
Thanks again, I updated the code with that and will try it shortly...

How were you able to ascertain that INT2 and INT3 were involved? When I looked at the schematic, the CPS and CKP signals were mapped to MCU-D19 and MCU-D18

Image

Which show as being Rx and Tx in the serial area of the Mega board. Clearly I'm not interpreting it correctly.
Image

The duty cycle of an Arduino Mega and Speeduino is[…]

Does anyone know the drive capability of the progr[…]

Vtec and speeduino

Worked it out. The flex fuel and Knock inputs can[…]

I'm in the process of drawing up the DIY-EFI TinyW[…]

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