Takuma to Flipsky remote conversion. Almost done

In a previous thread i explained why I undertook this project and will share all my findings soon. Bottom line is that I can confirm that the Takuma receiver puts out a PWM signal at 50Hz. Zero throttle it send a high for 1.5 ms and at full throttle around 1.9 seconds with the boost button taking it to 2m.s. This great news since we can use the “braked” Flipsky profile to manage the ESC with no mods to anything.

I found the 5v “BEC” too. So that’s good.

BTW i read the Flipsky and Takuma signals with a really simple arduino sketch and circuit.

Question: does the Battery Voltage wire on the Flipsky receiver, attach directly to the +ve battery terminal or is it conditioned? Seems scary to put 50V into a PCB.

1 Like

When you use a Flipsky VESC it comes pre-wired it just plugs into the UART or PPM port. You can look up the specs for their 75200 or 75100 controller. I also think putting high voltage in the tiny circuit is a good idea.

Uploading: IMG_2799.jpeg…
It’s alive

2 Likes

Nicely done! Did you connect to the battery directly after all?

All closed up and working.

@aussieatlarge …have you done a wiring diagram for this?..i would be interested in doing the same thing for my Takuma setup…i use mine on a tow boogie and would like to implement a more comfortable remote.
Cheers
K

Interesting thread.
One question about the arduino sketch.
How did you read in the data?
I am trying to do the same with a MGM Compro ESC and arduino. Therfore I use a Teensy. It is more powerful.
But I am struggling with the reading of the CAN Bus signals from the ESC.
So if you can provide some ideas :+1::+1::+1:

Canbus is best read with a canbus add on board and canbus libraryt file. There are plenty of scripts online to follow. There may even be a sample script with the canbus addon. I’ll take a look later.

Mine was very easy. I connected pin 2 to the receiver and simply read the duration for high and duration until the next high. Added low and high to get the frequency. Then plotted everything through the serial port. I think it was 6 lines. Ask ChatGPT.

const int pwmPin = 2; // Pin where the PWM signal is connected

void setup() {
Serial.begin(9600);
pinMode(pwmPin, INPUT);
}

void loop() {
// Measure high and low pulse durations in microseconds
unsigned long highTime = pulseIn(pwmPin, HIGH);
unsigned long lowTime = pulseIn(pwmPin, LOW);

// Calculate period and duty cycle
unsigned long period = highTime + lowTime;
float frequency = period > 0 ? 1000000.0 / period : 0;
float dutyCycle = period > 0 ? (highTime * 100.0 / period) : 0;

// Output the results
Serial.print(“High Time: “);
Serial.print(highTime);
Serial.print(” us, Low Time: “);
Serial.print(lowTime);
Serial.print(” us, Frequency: “);
Serial.print(frequency);
Serial.print(” Hz, Duty Cycle: “);
Serial.print(dutyCycle);
Serial.println(” %”);

delay(500);
}

1 Like

To read a CAN bus signal with an Arduino, you’ll need:

1. Hardware Requirements

  • Arduino board (Uno, Mega, etc.)
  • MCP2515 CAN Bus Module (with TJA1050 transceiver)
  • CAN High (CANH) and CAN Low (CANL) lines from the vehicle or device

Example module:
MCP2515 + TJA1050 SPI CAN module (often labeled as “MCP2515 CAN Bus Module”)


2. Wiring

Here’s how to wire the MCP2515 to the Arduino Uno:

MCP2515 Pin Arduino Uno Pin
VCC 5V
GND GND
CS 10
SO (MISO) 12
SI (MOSI) 11
SCK 13
INT 2 (optional)

Connect CANH and CANL to the respective lines in your CAN network.


3. Software Setup

Install Required Library:

In Arduino IDE, go to:
Sketch > Include Library > Manage Libraries
Search for and install:

  • “MCP_CAN_lib” by Cory J. Fowler

4. Basic Receive Sketch

cpp

CopyEdit

#include <mcp_can.h>
#include <SPI.h>

const int SPI_CS_PIN = 10;
MCP_CAN CAN(SPI_CS_PIN);

void setup() {
  Serial.begin(115200);
  while (CAN_OK != CAN.begin(MCP_ANY)) {
    Serial.println("CAN init failed. Retrying...");
    delay(1000);
  }
  Serial.println("CAN init OK!");
}

void loop() {
  unsigned char len = 0;
  unsigned char buf[8];

  if (CAN_MSGAVAIL == CAN.checkReceive()) {
    CAN.readMsgBuf(&len, buf);
    unsigned long canId = CAN.getCanId();

    Serial.print("ID: ");
    Serial.print(canId, HEX);
    Serial.print(" Data: ");
    for (int i = 0; i < len; i++) {
      Serial.print(buf[i], HEX);
      Serial.print(" ");
    }
    Serial.println();
  }
}

5. Important Notes

  • Make sure terminating resistors (typically 120 ohms) are present at both ends of the CAN network.
  • Check your CAN network baud rate (usually 125 kbps, 250 kbps, or 500 kbps) and match it with CAN.begin(CAN_500KBPS) if needed.
  • The MCP2515 module may need a 16MHz crystal for reliable 500 kbps communication.
1 Like

@aussie@large…brilliant thanks
K

@aussieatlarge
Thanks a lot for the documentation.
I have ordered a Sparkfun module for CAN.
Why, I am using quite often the modules from them.
After the arrival of the module, I will test it out.
Thanks again :+1::blush::blush::blush:

All good mate. Took the Takuma out today for the first time. What a pleasure it just connected with no hassles. Board is still a dog to get on plain but it’s not the remotes fault. I noticed that the GPS shows speed. That was pretty cool. One thing I don’t like is that the trigger is still live after a fall. I was hoping it would lock so i will check the settings.

Does anyone know what you can do with the GPS. Is there a session one can download like on the Fliteboard?

Btw. My Fliteboard struggled to connect for 30 minutes. It’s been getting confused since i lent it to a buddy who paired it with his remote.

You have to hookup their bluetooth data module it’s only a few dollars and you can download you session to a phone. I don’t bother I just use my Garmin watch to get my sessions stats and GPS route.

Glad to hear it’s a functional rig again.:grinning:

VX3 no “lock” function other than at power on. I flip mine around 180d when climbing back on to reduce potential for bumping the trigger - or you can power off to be really sure.

No GPS log function in VX3 itself. Not sure if Takuma esc can do that via VescTools logging.