EDIT – TL;DR clarifications:  We’re still using the same 328p processor that we’ve used from the beginning, but now in a standalone configuration.  The processor hasn’t changed. The speed increase is due to new faster 20Mhz crystal.

EDIT 2: Nope, it’s not overclocked.  We’re utilizing the 328p’s full capabilities as intended by the manufacturer.

Edit 3: Question: “Why did you run 16Mhz before?” Short answer: Arduino IDE limitations. For the long answer, see below.

The Standalone 20Mhz Board (v0.1.7)

Assembled and tested

Hardware has just a few loose ends left to polish off, but finally works as intended.  No more jumpering to breadboard circuits to work around issues.  I imagine that v0.1.8 will be the “final” pre-alpha version before rolling over to the “0.2” designation in the alpha stage.

v0.1 Development

Hardware 99%
Firmware 80%

Version 0.1.7


Firmware slowdown: The Arduino breakup

NanoEFI is currently moving away from the Arduino IDE. If you’ve worked with Arduino before, then you know that the platform is outstanding for beginners and great for quickly hashing out early development.  However, once you pass a certain point some of the platform limitations begin to present design problems.

For example, Arduino boards are limited to 16mhz, even though the processor is capable higher speeds.  In our case, the 328p processor can run up to 20mhz. 

Also, the Arduino libraries aren’t optimized for speed.  The Arduino system’s ease of use (and super compatibility) come at a cost to speed and timing accuracy.  This isn’t a bug though. It’s just a necessary part of what makes Arduino great for the uses that the developers intended.

We’re going to need the full 20mhz for recent features.  This will also raise the maximum engine speed supported.  And hopefully help overcome the lack of hardware timers for possible 2 and 3 cylinder support. The decision was made to switch to a standalone board-mounted processor setup.

Transitioning the hardware circuitry in v0.1.7 was straight forward.  Studying the datasheet is absolutely critical, as usual.

However, Arduino core libraries aren’t natively compatible with 20mhz operation.  And not easily converted. The core can be modified, but real world implementations appear unproven. Forcing the Arduino system to perform so differently than designed will likely produce undesirable results.

Instead, I’m spending this time re-implementing the firmware in the comparatively leaner Atmel IDE.  Although not as simple to code, this allows for design flexibility without hacks, and full native access to the processor’s resources.

In true divorce fashion, only half of my original code from the Arduino was usable in the transition. Oh well. I needed to restructure recent developments anyway, so this isn’t really a loss.

Hello Atmel Studio!

This only affects the NanoEFI core, not the Developer IDE concept or extensions!

Familiar Arduino functions will be supported in the NanoEFI IDE.  So you will still be able write your code in “Arduino” style C/C++ if you prefer.

See the core values update for more info about custom extensions.

Like updates?

We're on Facebook!If you want more updates, be sure to like, share and comment on the NanoEFI Facebook page.

With a bigger audience, I can prioritize communicating more often.  Help get the word out, and share this project with your friends! 😀


15 thoughts on “May 2017 Update: Standalone 20mhz ATMEGA 328P. Switch to Atmel Studio!

  1. Thanks for the update! I’m down to help if at all possible. I’m in the design/development stages of a completely unique scooter utilizing a 150cc GY6 engine. I’d like to avoid putting a regular ole carburetor on it altogether if possible….because, like you I want to ride thing, not tune it all the time.

  2. Understandably much work is going into the circuitary etc. with this project, but has any focus been placed on the crucial hardware elements like throttle body, fuel pump and regulator? Any sources and part numbers in mind? Pricing and functionality of these parts all have an impact on the project as a whole.

    1. thats a simple google search to find your parts, I already sorced my parts for when the nanoefi comes out. The simple answer is to find your carbs model, then a bike that uses the same model and also has a fuel injection model. Also simple google search will give you relatively good results. Honda, Yamaha, and plenty of other small 125,150 etc have fuel injection throttle bodies to select from. My fave is alibaba. Pull of your carb and get a pair of calibers measure and search in millimeters. One more thing While your working on it polish the inside with a dremel for best performance, I already port and polished my head for carb so going up in grit with sand paper should be very easy then hitting it with the buffing wheel will give you great results

    2. Most of the supporting components are sourced now and ready in bulk. That includes the fuel pump, regulator, TPS and MAP sensors, external CDI ignition unit and coil, etc. Wiring harness assemblies are also ready, the initial test batch has been produced for the first models that will be officially supported with a full retrofit kit.

      An update on the compatibility strategy is coming soon, where we’ll dive more into the details. Thanks guys.

  3. I think you are losing sight of your original goals and the effect is extended development time. There’s never an end to the new chips or new software coming down the pipe and you’ll not finish if you keep jumping from one to another. Please, just publish a basic system and let your team work it over.

    1. The ATMEGA 328P is the original processor that we’ve worked with since the beginning.

      It’s true that a 16Mhz clock source could have been used in order to temporarily put off the IDE change. But upgrading to 20Mhz would have to have to happen sooner or later as features and compatibility become more complex.

      Making the transition now was the right decision. Releasing an early 16mhz version would have locked early adopters into less capable hardware with limited firmware update support long term. We’d save some development time now, but the people who have been patiently waiting since the beginning would be forced to buy twice in order to stay updated.

  4. I was wanting something like this for a garden tractor/ riding lawnmower just for reliability.

  5. What is the hardware weight of the initial system?
    I am interested for an ultralight aircraft engine. I would be interested in an alpha system depending on weight.

    1. The current system weighs in at 4.3lbs. The throttle body, harness, and regulator are areas with the easiest potential for weight reduction.

      • 0.2lb ECU and enclosure
      • 1.9lb Throttle body, injector, and cable assembly
      • 0.6lb Fuel pump
      • 0.5lb Fuel regulator
      • 1.1lb Complete wiring harness, CDI Ignition components, and sensors
  6. This is exciting! I was just looking into single injector controllers for an additional injector, MAP-based DIY setup but I like where this is headed.

  7. Hi, what will be the injector pulse width resolution with this new processor?
    Do you thing the project will finish this year?

    1. At this point I expect to be finished before end of the year. Development since this article has been moving along steadily. The switch to Atmel Studio turned out great. 10/10 would recommend AS7 to Arduino users ready for more advanced usage and flexibility in their projects.

      Pulse width resolution is untested currently. Once confirmed, I’ll update you here in this thread. Thanks!

  8. I got all excited when I saw this site for the first time as I am looking at 16 units for our fleet of Yamaha (Linhai 260) powered buggys and we NEED to switch to EFi as at the moment we get through 20+ 30mm cv carbs a year, (quicker and cheaper to throw one away than spend hours trying to clean and reset one, which is not too bad at $30 a shot but breakdowns with clients aboard is very annoying and a refund of $100 hurts.
    The thought of fitting Ecotrons at $700 each is a no no. so when are you looking at a ready to ship date?

  9. I am interesting in converting some current EFI 250cc UTV’s to your system for the adjust-ability standpoint. I would love to talk some more about this as I am interested in perhaps a large order when available.

Leave a Reply