top of page

EEPROM - Do I need it?

What is that empty IC footprint on the breakout board for? Do I need it? EEPROM (Electrically Erasable Programable Read Only Memory) is a non-volatile memory chip that is used to save configuration setting so you don't have to reenter them each time you run your machine. grblHAL can use an EEPROM but a lot of supported microcontrollers don't have it built in. However, they all (most?) allow EEPROM emulation in Flash Memory. Using a "small" part of Flash Memory, they pretend to have EEPROM. So, the quick answer is no, you don't need to. But like many things in life, the devil is in the details.

The most obvious issue is Flash memory wears out! It will only last for a certain number of write cycles. This is specified by the manufacturer. The Flash Memory in the Teensy 4.1 is rated for 100,000 write cycles. While this may seem like a lot, writing to a Flash Memory location once every 5 minutes will reach the 100K limit in less than a year. Fortunately, grblHAL only writes to EEPROM when you make configuration changes. So, that is not so bad.

Another issue is that in the interest of supporting more than 100K write cycles, Flash emulation of EEPROM uses a lot of space. In the Teensy 4.1, 60K bytes of Flash Memory is used to emulate about 1K of EEPROM. It does wear leveling - using multiple locations to store the same piece of data. This gets you much longer lifespan of Flash emulated EEPROM. While 64K is a fairly large amount of memory, on a micro like the Teensy 4.1 that is relatively small.

So, for just Grbl settings, it is not a big issue and you can skip putting an EEPROM on your board. But, wait, we aren't done yet!

A new plug-in for grblHAL is coming. It will provide logging of machine use and you can use that data to guide your regular machine maintenance. The logging plug-in will give you hours of spindle run time, hours of stepper run time per axis and distance each axis has traveled in meters. Where do you think it saves that data? Yes, you guessed it - EEPROM. And, yes, it will be storing it fairly often. So, if you want to use that plug-in, maybe EEPROM emulation is not such a good idea. In fact, the logging plug-in will refuse to work with Flash memory. Typically. real EEPROMs are rated for millions of write cycles. So, yes, that is a lot better but it is still possible to see EEPROM wearing out under certain scenarios. So, hmmm, maybe this is not going to work.

Well, there is an answer. F-RAM - Ferroelectric Random Access Memory. It has a lot of advantages over EEPROM. It is simpler to use, writes are faster and, perhaps the most astounding, it has write endurance in the 100 TRILLION cycles. It also has super long data retention - typically rated at 151 years. And, it comes in the exact same footprint as the EEPROMs that grblHAL supports. Currently, we recommend the FM24CL16B-GTR. It is a 2K byte chip and sells for less than $2 USD. That is more than enough memory for both grblHAL settings and all the logging data. The photo to the left shows it soldered onto one of my test boards. I will be swapping it into my CNC CBeam router when the logging plug-in comes out.

Like many questions in life, the answer is "It depends". If you do not want to bother with logging then skip adding the EEPROM or F-RAM. But if you want to take advantage of grblHAL's logging to help you keep your machine in tip-top shape, then go for F-RAM. And by the way, future versions of my breakout board will probably have F-RAM already installed.


Featured Posts
Recent Posts
Search By Tags
No tags yet.
Follow Us
  • Facebook Classic
  • Twitter Classic
  • Google Classic
bottom of page