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. 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
    Murphy's Law- sort of. If it can be done, someone eventually will be crazy enough to try

    Sent from my SM-G991B using Tapatalk
     
    • Like Like x 1
    • Funny Funny x 1
  2. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,276
    Likes Received:
    1,436
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    I resemble that comment - challenge accepted
     
    • Like Like x 1
  3. 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
    some digging. erm. "speeduino base tune .msq"

    so, here...
    <page number="3" size="128">
    <constant digits="0" name="TrigAng" units="Deg">0.0</constant>
    <constant digits="0" name="FixAng" units="Deg">0.0</constant>
    <constant digits="0" name="CrankAng" units="Deg">5.0</constant>
    <constant digits="0" name="TrigAngMul">0.0</constant>
    <constant name="TrigEdge">"RISING"</constant>
    <constant name="TrigSpeed">"Crank Speed"</constant>
    <constant name="IgInv">"Going Low"</constant>
    <constant name="TrigPattern">"Dual Wheel"</constant>
    <constant name="TrigEdgeSec">"RISING"</constant>
    <constant name="fuelPumpPin">"Board Default"</constant>
    <constant name="useResync">"No"</constant>
    <constant digits="1" name="sparkDur" units="ms">1.0</constant>
    <constant name="trigPatternSec">"Single tooth cam"</constant>
    <constant name="PollLevelPol">"Low"</constant>


    thats what i wanna see. something referencing crank signals. and cam sensor there...

    and a bit further down...

    <constant digits="0" name="stagedInjSizePri" units="cc/min">200.0</constant>
    <constant digits="0" name="stagedInjSizeSec" units="cc/min">600.0</constant>


    so theres the staged injectors...

    so thats just calibration data for a megasquirt, or using megasquirt syntax, at least...

    not the firmware...

    digging through, say, arduino.h...

    //injector3StartAngle = calculateInjector3StartAngle(PWdivTimerPerDegree);
    injector3StartAngle = calculateInjectorStartAngle(PWdivTimerPerDegree, channel3InjDegrees);

    injector4StartAngle = injector3StartAngle + (CRANK_ANGLE_MAX_INJ / 2); //Phase this either 180 or 360 degrees out from inj3 (In reality this will always be 180 as you can't have sequential and staged currently)


    interesting...

    ooo, found it... "decoders.h"
    //All of the below are the 6 required functions for each decoder / pattern
    void triggerSetup_missingTooth();
    void triggerPri_missingTooth();
    void triggerSec_missingTooth();
    void triggerThird_missingTooth();
    uint16_t getRPM_missingTooth();
    int getCrankAngle_missingTooth();
    extern void triggerSetEndTeeth_missingTooth();

    void triggerSetup_DualWheel();
    void triggerPri_DualWheel();
    void and so forth ad nauseum...


    now how to play around a bit? i wanna use my VR conditioner...

    you know what? need someone that can actually write C...

    so many files. so many voids... void? i only know that that means my $2 scratchie is no good!
     
    • Like Like x 2
  4. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,276
    Likes Received:
    1,436
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    Hey @gyro gearloose - I have created a fork of what I consider the best starting point board - the Spectre board on github

    https://github.com/ruckusman/SPECTRE-4CYL-MBIKE

    The original by Tjeerdie is very thorough with all necessary files to edit schematics, board layouts and push that through to PCBWay or JLCPCB to order boards - they are not expensive.

    First task is to investigate changing the connector on the board schematic/schematic for the required number of output pins.

    I'm using the GSXR -> 2007/2008 onwards as the basis for the number of pins on the connectors - they are 2 x 36 pin JAE MX23a connectors.

    k8pinout.jpg

    Other ECU's from the period and later use ECU's and plugs/sockets with a similar number of pins, though different plugs/sockets.

    The plug choice isn't set in stone, I'm just emulating the wiring looms that I already have for convenience and the required number of pins
     
  5. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,276
    Likes Received:
    1,436
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    Here's my Tuner Studio project based upon the Spectre board

    https://github.com/ruckusman/SPECTRE-4CYL-MBIKE/tree/master/FZR250-Speeduino

    I've just been going through the various menus and some settings - I've got some queries for the the guys on the speeduino forums about fuel calculations for sequential AND staged injectors.
    There's some elements which don't quite add up

    For reference I'm paying attention to injection times at the top end, so 3.3ms at 18K RPM which is one engine revolution, hoping that a working and reasonable/available injection equates time with the cycle time, give or take.

    I've been researching and 50cc injectors are available at a price which doesn't break the bank, for the low RPM injectors.

    For the higher RPM injectors I've worked towards 125cc injectors, also available at a price which doesn't break the bank.
     
  6. 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
    i spoke to ali, he tells me he has plenty of small injectors in stock... 30g/min to.. whatever. about $15.
    pretty generic, only real data for deadtime is on ecotrons site. not really critical, can tune that bit. about 0.6mS.

    remember! 85% of 3.3mS! unless batch then its 85% of 6.6mS...

    can save a set of drivers with batch... 1+4,2+3... find an injector small enough to deal with idle despite opening on every revolution. no need for cam signal either then.
    then the other injector should be at least 3X larger. if it can deal with say, 8K... then with 3X the flow, you have 4X the flow in total, and at twice the RPM, half the time, so half the delivery. for 2X the fuel in total.

    at the speeds these are spinning at and making power, methinks the issue of injection timing/angles becomes a rather moot point. the slight loss of performance at 5K or so is irrelevant?



    plugs, about all that matters is pin count and possibly waterproofing. ecotrons (single cylinder) was using a plain old 20 pin PC PSU/ATX type plug...
    i always take the approach that less is better... whatevers cheapest, available, and works. and isnt fiddly!

    things i dont like about arduino...

    header pins and boards. may work on printers, not so good in engine bays with heat, vibration, water... this goes for everything from sensors to jumper pins to the main processor board. the very modularity that makes arduino "user friendly" is what kills it in this application. arduino was intended to get newbs into programming and digital circuits. forget circuit design, just plug bits in and write some void ifndef define printf...
    not inherently bad but also destined to cause certain issues in certain applications.

    spectre board looks nice, but first thing i see is the super thin spider web traces... always taken the approach of leaving as much copper on the board as possible, not as little! i know theres 'ground planes" to a degree, but yeah. theres no advantage to a 0.25mm trace when 2.5mm will do...
    i also see absolutely no optocouplers or isolation... maybe its on his ARM 32 board, but yeah... we got noise, we got inductive loads, we got all sorts of electrical gremlins going on... i just see a few poxy SMD diodes here and there. not a fan of SMD, either!

    always get the idea that the guys designing most of these are uni grads with little real world experience and looking for a project... get carried away with "optimised routing schemes" and "vias" on "four layer boards"..."visual impact"...
    its always targeted for cars. "nanoefi" was a bit different but last i looked went all bloated and never did anything much after some sort of beta test...

    anyway. maybe re-inventing the wheel but im more of the opinion of designing a new board and figuring out firmware to suit... we have different requirements to the car! bike specific. more importantly, high RPM specific...

    and really really SMALL. thats always been the main issue. most of these things are at least as big as the CDI unit already. space?

    i got that R15 pump that may be worth firing up.. test its flow rate at pressure.

    tempted to dig through some boxes and make something... arduino on some perfboard and strap on a few injector drivers. really, slapping a board up is a nights task... i know i got a few kicking around... no headers! all soldered!

    then back to firmware and start pruning... 90% of it is superfluous bloat. narrow it down to whats needed, and only whats needed.

    lol. but i have no EFI bike setup, nor am i about to, lol! a 4-600 would be nice to play with?

    anyone?

    *crickets*

    can always sacrifice a set of carbs as TBs? bit of JB weld, she'll be fine :D

    PCBs arent terribly hard. been a while since i used eagleCAD admittedly... or etched a PCB.

    ideally? screw logging with external devices.
    throwing LCD displays on these arent terribly hard. billion and one forum posts on producing graphs, displays, and communicating with oleds and blah blah... its dealing with data usually being the challenge. modding code to suits ones needs.

    if you aint got enough chip eeprom to do it, then strap on an external storage for datalogs. how many hours you want?

    dash display with relevant data, wideband O2, ECT, IAT, etc... self tuning, along with a way to tweak it there and then...

    use speeduino as the base to work from. hack off the useless branches and keep the main ones.
    just that with all its extras, i cant make much sense of it... yet.

    adding an output with DAC/PWM curves for servomotors aint a big deal, either.

    i get the feeling that having relevant data on a dash, and full access on the spot, one could tune that exup in a bit better than 1980s "approximated curves".


    lol. stop it! still twiddling thumbs over my own one!

    i think ive tried writing the same code about twenty times now... keep getting halfway through then realise it wont work and start all over again... seems so simple. get crank signal. get MAP sample. start timer. throw injector on. set timer. another MAP sample. interrupts are killing me, flag bits, etc... arrrgh!

    lol, though i reckon i could flip most of what ive learned to another chip with a few more pins and get it running.

    though im more inclined to ditch my project once working and start hacking speeduino instead...

    back to what EFI is there for... is it for performance, or because of EPA mandates? the more i learn the more i know its about EPA...

    though in the case of the FZR... to try and eliminate one constant source of headaches!

    when carbs work... ive never had issues.
    when carbs dont want to work?

    got a box full of dead carbs.



    final one... years ago i made a pretty basic dyno. brass disc and some neo magnets. never really finished it, was for the motorised pushies and guess what got banned here? really havent done doodly-squat since then now i think about it! was making pipes, porting cylinders...

    meh. it proved the principle worked. eddy currents. same as truck retarders but using permanent magnets. and yeah, this time... i might spin the magnets, not the disc! the thing got smoking hot after a minute or two on just a few HP of a 50cc...

    poking around, saved this stuff on purpose over the years... either a mini chopper rear wheel or a scooter rear wheel... nice rolling surface.
    lump of I-beam.
    bag of neo magnets.
    soft iron backing plate from a speaker. to mount magnets on. (or order a bag of the round magnets i originally used and use the disc i already have rusting on a shelf?)
    i had some heavy copper plate, cant find it. whatever. scrapyard if it doesnt show up.
    copper pipe soldered to plate for water cooling... 35+ KW is a lot of heat!
    vary the gap between the magnets and the copper, measure the torque on the copper plate, and yeah... got a dyno.
    alternators and motors have issues when used as dynos...


    sigh. too much other crap to ever do anything at all...:oops:
     
  7. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,276
    Likes Received:
    1,436
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    WHOAH big message, brain ripping along quickly I see...

    I've run some numbers here
    https://www.rbracing-rsr.com/calcinjpulse.html
    At the very bottom end @1600 RPM 50cc injectors will get through, so I've pitched for some ~$16 each alibaba
    Then I used tuner studio to get an idea of the top end, decided to go with 120cc injectors from alibaba also

    If I'd known you could get them here for that price I would have gone with local, SHEEEEET...anyway

    Cam signal isn't difficult and sequential and staged is just a checkbox in the software anyway, plus one squirt per engine cycle will make it easier to fuel accurately at the low end.

    I opened ECU Editor and checked the staged injection maps for the GSXR's - they start tapering/transferring at ~5600RPM from the port injectors to the spray injectors, but they never swap totally across - keeping 20% of the port injectors at peak RPM, so fuelling at peak RPM shouldn't be an issue with a potential combined capacity of 170cc's

    The processor board is 50/50, it allows anyone to design the carrier/breakout board any which way, given that pin assignments can be configured almost whichever way anyone wants with a few exceptions for timer and interrupt pins so grouping components is easily achieved.

    There are all in one boards out there, RusEFI has come along in leaps and bounds, but the boards aren't 'cheap' although they're very impressive in many respects.

    It doesn't have the brain board or components on there, it's essentially a motherboard - I'm going to use that as a basis for a board - I have decided to go for the GSXR ECU plugs, as much because that's what I've got on the looms - so I'll be rearranging a few components and tracks.

    I'm very much in the crawl/walk/run position, studying and learning from others work is my way forwards with the PCB design software - I've opted for Kicad, one because it's free and secondly most of the project and other files are in that format.
    https://www.kicad.org/

    By the looks of some projects many have started with eagle for the PCB's and migrated to Kicad.


    If you did consider going that route and designing a breakout/'motherboard' from scratch - take a look at these two
    Both are compatible with both Speeduino and RusEFI if produced with an STM32F407VGT6 chip

    https://speeduino.com/forum/viewtopic.php?t=2065
    https://github.com/ruzki/Kim-Kong

    https://speeduino.com/forum/viewtopic.php?t=2527
    https://github.com/pazi88/speeduino

    I've just gone for an STM23F407VET6 from aliexpress so I can get a move along ~$20 an yes a breadboard can suffice for testing.


    I've got a YZF600 lined up for conversion already - perfect candidate IMO

    Either PCBWay or JLCPCB fab the board in short timeframes for cheap prices and can do all of the SMD work on one side, plus all of the necessary production files are in those github repositories already to go

    Speeduino has logging to the SDCard on the brain board sorted now.

    Realdash on a Raspberry Pi is doable and a perfect solution.

    I've got plans for another stepper in mind.

    It would be nice to see what's what with that EXUP and change in whilst on the road for testing.
    One solution is a Raspberry Pi with a small HDMI screen running Ubuntu with Tuner Studio, connect it and tune, then keep riding

    Take a look at the blitzbox - tiny and has what you need for the single cylinder engine

     
  8. ruckusman

    ruckusman White Mans Magic Master Premium Member Dirty Wheel Club

    Messages:
    3,276
    Likes Received:
    1,436
    Trophy Points:
    918
    Joined:
    Oct 1, 2013
    Gender:
    Male
    Location:
    Narrabeen, NSW Australia
    My Bike:
    Yamaha FZR250 3LN1
    For anyone that's interested in making a contribution - there's a neat little program called Ardu-stim and board; Arduino Nano which costs about ~$10

    I've already created a fork here and commenced changes
    https://github.com/ruckusman/Ardu-Stim/

    It's used to simulate a running engine emulating crank rotor trigger wheel signals.

    This animated GIF gives an example of what the triggers wheels look like to the software which generates the trigger signal for the ignition box.
    The first selection is kinda sorta close to an FZR250 trigger wheel, a long bump and several smaller bumps so it's a good example - ignore the cam wheel, not relevant for now.

    demo.gif

    The use case for me an potentially others is, by emulating the crank rotor trigger you can firstly check spark output from an ignition box if there's an electrical problem - not running, without having to crank the motor over.

    It can all be done on "the bench" essentially and you could have the bike battery hooked up to the ignition box - > coils -> plugs -> ground to actually visually check for spark and spark quality, whilst changing the RPM!

    Past that I'm going to use it to capture the ignition advance curve -v- RPM and map the EXUP opening -v- RPM map for the FRZ250 3LN.

    Now as far as contributions go, I only need a relatively accurate map of the ignition rotor bumps on a stator.

    How I I get that you say, well easy peasy IMO.

    Start with a degree wheel, print it and tape it to the stator/rotor.
    Several available via the links below

    http://www.tavia.com/free_degree_wheel.html
    http://www.tavia.com/free_degree_wheel.jpg

    https://garage.grumpysperformance.com/index.php?threads/printable-degree-wheel.974/
    https://www.laverdafinland.org/cape/kuvat/Degree Wheel.jpg

    https://www.blocklayer.com/degree-wheeleng - this one is especially useful as you can enter your cam/valve timing to print a wheel with that displayed on the degree wheel - anyway another topic for another time.

    With the degree wheel on the crank rotor/stator, just check the bumps at a fixed point in the engine case and write them down for me and I'll program them into Ardu-stim which can then hopefully make it into a release.

    Past that, my project progression is to firstly get Speeduino running ignition only on the FZR using the stock rotor trigger before migrating to a higher tooth trigger for accuracy.

    So if anyone wants me to include the trigger for their bike for Adru-stim, hit me up with some measurements of your trigger/stator and I'll add them to the program
     

Share This Page