1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Discussion Speeduino collaboration

Discussion in 'Your 250cc Projects' started by ruckusman, Apr 28, 2024.

  1. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    Anyone interested in working collaboratively on getting Speeduino up and running on the 250/4s?

    FWIW I think two pair of Ninja 300 throttle bodies will be very close to suitable with minimal fuss - strap them together.


    I've just done a deep dive into what's available that suits that platform and it ticks a whole lot of boxes at incredibly low prices.

    Biggest hurdle to something like this is normally capital outlay for an ECU, fuel pumps, and some of the other components, it doesn't actually need to be that way when suitable elements are sourced from alternative places.
    E.g - the STM32 based Arduino will set you back about $40, the

    Bonus is that there's an Arduino based hardware engine simulator to test stuff before anything gets installed onto the bike - to test things like ignition and injector firing - to me that's a big deal.

    I'm about to research whether or not the hardware engine simulator can be effective to capture ignition advance curves for the OEM TCI units - I think it can quite simply TBV.

    In tank 3 bar fuel pumps and regulators can be had for reasonable cost, not the eyewatering prices te OEM's chrge for replacements.

    How it gets done isn't actually overly difficult (famous last words) from a starting point perspective because Tunerstudio takes various data input, such as injector specifications and creates a base map.

    Relevant specs for the 250/4 (Or anything else 4 cylinder bike related)
    4 channel Sequential ignition
    There's small ignitor cards to be able to run either 2 channel wasted spark or 4 channel sequential dumb coils (2 wire COP coils)
    8 channel sequential AND staged injection
    Stepper driver outputs (plural) - for Yamaha EXUP
    VR sensor conditioners for crank &/or or both crank and cam triggers - possibly use OEM crank triggers without issue.
    TPS input and a whole host of other inputs
    Small, modular, well priced Wideband sensor/controller daughter cards - to me that's a significant barrier to entry as a wideband controller and gauge is a significant expense, the sensors themselves are not expensive.

    What I'm anticipating is just making a connector board that is a breakout from their latest board to suit the wiring harness(es) and the plugs that I have, which are GSXR because I didn't (don't) want to reinvent the wheel and make a whole harness from scratch, plus the various plugs are relatively expensive - more than the cost of a second hand loom.

    Software wise Speeduino is fully supported by Tunerstudio
    https://www.tunerstudio.com/index.php/products/tuner-studio

    Bonus is that they've got something called Shadowdash that runs on Android - so phones can be connected to both view running engine data and most importantly log data.

    The thought of riding with a laptop connected just doesn't appeal to me quite frankly...

    An EFI conversion is all fine and nice, but going to get very expensive if all tuning has to be done with dyno hours.
    How do you get around that, well logged data of course, shadow dash and the data logging pretty much solves that problem.
    It's got other bonuses like incorporating data from accelerometer(s) and GPS on the phone itself.
    USB cable, Wifi or bluetooth connections are possible

    https://www.tunerstudio.com/index.php/products/13-shadowdash

    Anyway this is longer than I had anticipated...thoughts?
     
  2. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    Hopefully not surprising to hear, I am in. Should be fun AND easy AND cheap ;)
     
    • Love it! Love it! x 1
  3. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    XLNT!

    I just posted over on the Speeduino forums
    https://speeduino.com/forum/viewtopic.php?t=6330

    I'm really hoping for a second set of eyes on this, don't want to miss anything obvious and would like to keep it as universal as possible, so that there's a very low financial cost and learning curves as barriers to entry.

    There's quite a few boards available - they cost so little out of PCBWay and an unpopulated 0.4.4 board from one of the people right at the core of Speeduino costs a whole shocking $10 - the components might cost $50 over that and the Arduino board itself another $45 - bugger that's a cheap initial outlay!

    The clincher for me was the hardware engine simulator - I figure that's a way to test actual individual components and sensors on what the ECU thinks is a running engine...
     
  4. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    I have considered this some point in the past, until the next shiny thing caught my eye and I forgot about it. Capturing the stock ignition curve is easy as long as you can trick the CDI into thinking theres a pulse. This isn't 100% correct since its mostly off the top of my head, but the theory should be a starting point.

    The VR sensor creates an AC current between ~0.5-50v (not sure what its on a bike, google says that range, point is it fluctuates), a microcontroller like an arduino is digital and cant really create an AC sine wave so youd need some circuitry to trick the CDI. Shouldn't be hard, CDI is not very smart especially not in 1989. Then you just need to log when the cdi gives off a spark, how long after it recieved the "VR pulse" and maybe some physical measurements of the flywheel vs pickup coil angles etc. Run a simulated rev up to redline a few times. Once youve got the data, crunch the numbers and you should be able to get an ignition curve.
     
  5. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    I was messing with a VR sensor a few weeks ago - runs the motor -> rotation/RPM sensor for a treadmill motor, it has 5V going to it and it shut down, put the 5V to ground when a magnet was close - has me wondering if the bike VR sensors are the same and perhaps the signal is inverted to make the rotor triggers into bumps for the ignition timing?

    One way to test without an ECU is or other hardware is to spin a trigger wheel of some description in a drill, past the VR sensor and see what comes out
     
  6. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    Throw a oscilloscope on the pick up leads and crank the motor. That'll get you 75% of the way. Anyone got an oscilloscope and an fzr? @gyro gearloose I vaguely remember you having one?

    Sent from my SM-G991B using Tapatalk
     
  7. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    I've got both, well the FZR is in bits, but I can work out a way to spin the rotor easily enough
     
  8. DanoHosko

    DanoHosko Well-Known Member Premium Member

    Messages:
    240
    Likes Received:
    92
    Trophy Points:
    228
    Joined:
    Nov 26, 2019
    Gender:
    Male
    Location:
    Brisbane, Queensland
    My Bike:
    ZXR250-C
    Apologies for chiming in, you could maybe use the Arduino to produce a PWM that replicates the AC signal maybe?
     
  9. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    You're spot on the Ardu-stim will likely be able to sort that easily enough.

    Hurdles and barriers to entry that saw to injection on the 250/4's

    Potential complexities, crank trigger wheels reading, not reading, no spark, no injection, it won't start or run, a lot can be sorted out before putting any hardware onto the bike.
    Read a lot of thread where people lost time and motivation because they didn't have data to diagnose what was happening.

    Data logging is available in two places

    Cost, just nailing down the cost of the board I'm most interested in with required set of outputs, it's not expensive, over that the STM32F407 Arduino board is about $40.
    Version 0.5.4 is the one I am considering
    https://github.com/Tjeerdie/SPECTRE/issues/14

    Nothing is required over most of what's already there except throttle bodies, injectors a fuel pump (doesn't have to be in tank either, it can be inline) and a few sensors.

    Sequential ignition - 4 coils on plug - again it doesn't have to use that, the standard OEM wasted spark can be used just fine and is known to work.

    Injection at super high RPM's - check the Speeduino can do both sequential and staged - 2 sets of injectors per cylinder, throttle body for low RPM and spray for high RPM - note that it doesn't have to use dual injector setups, I'm just planning for that final goal.

    Ignition advance curve capture, this is a huge one and not something that you want to be guessing at
    First I can spin a rotor at speed and read the VR signal easily. - no running motor needed.
    There's a few options, the crank rotor signal should be stepped, 3 short and one long pulse - at least two options actually to see if I can capture then replicate it.

    First one is something called the arduino based Ardu-stim which simulates a running engine in both software and hardware.

    For that I need to either capture the crank rotor trigger signal then play it back to the TCI using Ardu-stim - it's a genius piece of hardware
    https://www.everythingfuelinjection.com/store/Engine-simulator-p260389763

    This video is worth watching, it's a big part of what got me over the line with Speeduino


    Other option is to spin the rotor, read the VR signal and capture that and play it back using a level shifter for a higher -> lower voltage signal using one of the 8 channel logic analysers which plug into a USB port that can be had ~$20 off of ebay.

    @neoncrypnid likely has other ideas for ignition advance curve capture also.

    What I've been doing for the past week or so is eliminating as many of the unknowns as possible.
    I'm yet to come up against a question or issue that doesn't have a solution already

    Sorry for the long post but I read briefly about Speeduino a few years ago but didn't look carefully enough at that time, having a WHOOPS missed it moment...
     
  10. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    Im hoping so. The pick up coil produces an ac source that dips into negative voltages, which the arduino can't do without adding more circuitry. Ideal scenario is a carefully timed PWM wave will trigger a spark but if the TCI needs that negative volts that arduino will need a digital-analogue converter (DAC) chip. But even that isn't too hard.

    Sent from my SM-G991B using Tapatalk
     
    • Informative Informative x 1
  11. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    I think you've nailed it, a level (voltage if necessary) shifter that inverts, I know I've come across such a board in my travels.
    Then we can trick any TCI unit into thinking that it's connected to a running engine and get the spark advance map.

    I'm in the middle of updating the Macbook OS so I can run the Kicad software to read the PCB files and all the other software, the USB oscilloscope, Ardi-stim etc.

    Bonus is that I think because Ardu-stim can emulate a cam signal also, that can be set to a two teeth trigger at TDC to signal once per revolution.
     
  12. Andych

    Andych Moderator Staff Member Premium Member Contributing Member Dirty Wheel Club

    Messages:
    4,300
    Likes Received:
    2,514
    Trophy Points:
    918
    Joined:
    Oct 6, 2016
    Gender:
    Male
    Location:
    Albury 2641
    My Bike:
    1987 Yamaha SRX250, Honda 1974 SL125 K1, 2022 Triumph Tiger Sport 660
    You guys are all talking gobbdy-gook again... my brain hurts just reading it..... sounds sgood though :)
    As your were.....
     
    • Agree Agree x 2
    • Funny Funny x 2
  13. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    This ticks the boxes. V0.5.4 is said to be untested and the only change is a resistor array vs insividual resistors. If PCBWay or JLCPCB has those parts in stock then absolutely but I dunno if its worth the hassle of sourcing them for no real benefit.

    The STM32F407 isn't really an arduino board at all, just a nice little processor that can be taught to read arduinos language, which is a modified variant of C++. A STM board is 16$ on everyones favourite ebay replacement, aliexpress. I'd say that board is a win then.

    My idea is really similar to this, just using an arduino to clone the signal. I'd love some data from the oscilloscope and a confirmed RPM of the rotor. Its possible to reverse engineer the theoretical voltages and pulses but I prefer just measuring the real thing.

    The one ignition value thats known on an FZR250 is 10°/1600rpm. My plan was to use that to calibrate the spark timing information
     
  14. gyro gearloose

    gyro gearloose Active Member

    Messages:
    100
    Likes Received:
    94
    Trophy Points:
    128
    Joined:
    Feb 27, 2023
    Gender:
    Male
    Location:
    sydney
    My Bike:
    variable
    why yes, yes i do...

    and now its time for me to butt in...
    biggest hurdle to throw EFI on one of these is the need for dual injectors. but there we have 8 channels, sequential and staged... so at least the software should support it?
    at 12000RPM you have 5mS per revolution, 10mS, all up, and can only inject for 85% of that. at 18,000, you have 3mS! 6mS for a full cycle and 85% of that is 4.8 milliseconds or so.
    at the other end of the spectrum, at idle, the injector cant be open for less than 1-1.5mS. if its delivering too much in that time, you run rich and cant fix it.
    you cant get the range, the bandwidth, from one injector.

    you HAVE to have dual injectors.

    thats a real challenge. and of course, they can be different sizes to make life fun.

    you dont have to even do that. measure it. bit of string, mark the tabs... its always going to be that pattern.

    cdi will trigger on rising edge, but is that positive or negative?

    i looked into the speeduino firmware to implement my own VR conditioning but yeah... i dont do C... so no idea how to get speeduino happy about it? other than external, something like a 555 punching out the same pulse train as a toothed wheel.

    or use a toothed wheel... cam sensor...
    cam. you cant detect which stroke its on without cam sensor or sampling the intake pulse at idle.

    but this doesnt deal with the EXUP, does it? an extra complication. the cdi is running a curve on that as well...

    thats the one you want the data logging on... whats the exup doing?
     
  15. neoncrypnid

    neoncrypnid Well-Known Member Premium Member

    Messages:
    170
    Likes Received:
    55
    Trophy Points:
    213
    Joined:
    Feb 23, 2020
    Gender:
    Male
    Location:
    Australia
    My Bike:
    FZR250 2KR
    At a glance, Tunerstudio takes care of most of this it seems. Plug in the primary and secondary injecotr flow rates and it does some math. Crossing fingers but seems easy enough. https://wiki.speeduino.com/en/configuration/Staged_Injection

    I think the go to is to use a conditioning chip that turns the wiggly waves into square waves. The arduino hardware cant really do this since it deals in ones and zeros, and no negative volts.


    EXUP, I have a few ideas. Since you can work out the opening amount by RPM, you could throw in another microcontroller to run the servo motor off the tacho signal. It might be possible to implement it with the main speeduino but if it isnt, its not the end of the world.
     
  16. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    Must have been years ago when I looked at Speeduino it didn't have staged injectors IIRC, looked again and VOILA - sequential and staged,unless I missed it previously

    They're little numbers aren't they - I think for the high RPM range low Z injectors are the go - lower latency and higher flow

    Throw Tunerstudio on a PC - load up the default Speeduino project file and default firmware and work with it offline - basically you can get all the way through menus to see what's what.

    One thing I noticed is that when staged injection is checked and you go deep into the injector menu it actually comes up with smaller and larger injectors for default sizes.

    This needs to be measured, whether or not it goes high to VCC (supply voltage) or to ground.
    ...and today I thought what could be used to spoof the OEM VR trigger if it's 5v or 12v -> ground on rising trigger - well DUH, one of the ignition coil triggers, they close to ground.

    https://www.everythingfuelinjection.com/store/Ignitor-X4-Ignition-module-p202026628

    Running that on a switched high output with a resistor for current control would yield 0V -> 5V/12V -> 0V

    VR conditioning is done in hardware either via the onboard VR/Hall conditioner(s) or via one of these
    https://www.everythingfuelinjection.com/store/Dual-VR-Conditioner-p149190174

    I'll take both please - that's the sequential ignition and injection right there - easy peasy

    There's a whole suite of motor controllers already implemented - both stepper and PWM because they've built in idle air contol (motor controlled valve), variable cam timing control for those solenoids

    Now, yes I've desperately wanted to know what is the EXUP doing at what RPM - spoof the running engine, watch and measure it directly - guesswork gone

    BTW there's a whole suite of other digital and analogue inputs available - I really want to know oil pressure approaching peak RPM.

    Data logging in on either or both the SD card on the STM32F or the Tuner Studio shadow dash on thte tablet device - that part pretty much completed the ecosystem.
     
  17. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    One thing that isn't mentioned is injector dead time or latency, but that can be measured accurately if detailed specs aren't available.

    Spot on - that's the VR conditioner - ~$25 board, there is one on the mainboard itself - second one for the cam signal.
    Cam signal can be as simple as a single tooth.

    There's already ample outputs for both PWM and steppers, they just need cards/modules for if you want over and above what's on the board already.

    That's the part I want to get right, putting those extra modules onto a single board with the ECU -> loom plug, whichever loom plug comes up as most suitable or available or both.
    That's essentially what a power commander does, inserts itself between the ECU and loom, in this instance it can be ignitor/igniter module(s), any necessary input signal conditioner(s) and PWM or stepper motor controllers.

    Fairly certain the EXUP motor controller is a simple DC motor with a potentiometer feedback for position/location - nothing more
     
  18. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    What I'm working towards is as close to a recipe for the information and bits & pieces to do fuel injection (on a budget), very much like a video game bouncing through the internet picking up prizes -> level up -> next challenge and so on.

    OEM Ignition timing advance (curve) is the first hurdle.

    If Speeduino can do a 250/4, which it will in it's current incarnation, which is the most demanding application IMO - then it will do pretty much any other bike, all inline fours, V4's, twins, V twins singles.
    I'm kinda surprised that there aren't more bike conversions on the Speeduino forums, there's a few but not 'many' - it's perfect for budget conscious EFI conversion of a bike IMO.

    I'm having to break it all down into bite size chunks for myself to chew on it.

    Next prize -> level up -> Huge one for the 250/4's - throttle bodies - this is clever, very clever and non-destructive, so not a permanent modification.

    https://roadstercycle.com/yamaha_vmax_fuel_injector_cv_car.htm.

    The injector location isn't ideal, but it's workable and of the other bike conversions I've read, the throttle body issue can be the stumbling block.

    This one is a an excellent example of overcoming that hurdle
    https://2fiftycc.com/index.php?threads/cbr250rr-mc22-efi-project-now-with-turbo.11151/
     
  19. Andych

    Andych Moderator Staff Member Premium Member Contributing Member Dirty Wheel Club

    Messages:
    4,300
    Likes Received:
    2,514
    Trophy Points:
    918
    Joined:
    Oct 6, 2016
    Gender:
    Male
    Location:
    Albury 2641
    My Bike:
    1987 Yamaha SRX250, Honda 1974 SL125 K1, 2022 Triumph Tiger Sport 660
    Ummm thanks, I think... way too much for my old brain to comprehend...
    These days I am less inclined to re-engineer than the younger more inquisitive me... I will continue to watch with interest but I have better use of my ever decreasing lifetime (oh, that sounds a bit morbid).
    Just out of interest... what real benefit will Fuel injection bring to these 40 year old 4 cylinder screamers? :) :)

    Just teasing mate... :)
     
    • Like Like x 1
    • Funny Funny x 1
  20. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,266
    Likes Received:
    1,435
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    :D Real benefit - "Carbs", as I grow older, wiser and wider a low "carb" diet is especially recommended with FZR250's, a no carb diet is such a good option...and the crowd roared with applause :prankster:
     
    • Like Like x 1
    • Funny Funny x 1

Share This Page