Hacked MEGA2560 and my "Super Esplora"

Hi all,

You may (or may not) be interested to know that the Arduino MEGA2560 runs just fine at speeds higher than 16 MHz. In fact, I've found them to be stable up to around 30 MHz whereupon they START to get finicky.

Another thing is that all the newer Arduinos use a ceramic resonator for the CPU clock (WHY??). The ceramic resonator is relatively inaccurate, drifts with temperature and, in general, stinks.

So, I upgraded all of my Arduino boards by replacing the resonators with SMD crystals, and I use 22.1184 MHz crystals. This frequency is WELL within the ability of the AVR CPU to run 100% stable and it's an integer multiple of standard serial baud rates. Therefore, "115200 baud" is exactly 115200 baud (unlike what you get with the stock 16 MHz clock which is 117647 baud (2.12% high). Granted, only 2% error is no big deal, but as a pedantic engineer, things like that BUG ME, so I fixed it.

Here's a closeup of the oscillator soldered onto the MEGA board (I did a lousy job of cleaning off the flux - gotta fix that!).

(click the thumbs for full size images)

Here's a shot of my "Esplora"... a little platform that I use for testing and development. You can't see it, but underneath is a TO-220 LM7805 on a heatsink which powers the whole thing (including the Arduino) because various tests can draw hundreds of milliamps to an amp or more and of course the little regulator on the MEGA would go up in flames. (If you look carefully at the pic, you'll see that the 5V regulator has been removed from the MEGA board).

Here's a key to the parts on the "esplora":

  • A: Voltmeter for +5 supply
  • B: Noritake GU128X64E VFD display (KS-0108 compatible)
  • C: Noritake CU16025 VFD display (HD44780 LCD compatible)
  • D: +5 power supply on binding posts
  • E: Sets graphics VFD to SPI or Parallel mode for testing
  • F: Two optical rotary encoders with detents and N/O pushbutton
  • G: Grounding stud for oscilloscope
  • H: +5 and GND power bus for experiments
  • I: Return to center SPDT switch for "UP/DOWN" input tests
  • J: 12 volt supply, optionally current limited via 8 ohm, 20 watt resistor
  • K: High impedance input to turn on a LED (to check logic levels) (LED is still marked "HOT") :grinning:
  • L: Arduino MEGA2560 R3 with 22.1184 crystal oscillator mod
  • M: Sparkfun "Dead-on" DS-3234 real time clock module

My "esplora" evolved over time. At first, it was just the MEGA and the 128X64 VFD to use when writing my VFD library. When I released the magic smoke from the MEGA's 5V regulator, I added the 7085 and heatsink (as well as an "overheat" detector to light the "HOT" led if the heatsink got too hot (it never did) but the "HOT" led remained in there, re-purposed as a logic level detector with a MOSFET input to drive the LED (so the input wouldn't load the circuit). I never bothered to (== forgot to) remove the old paint pen label.

Interestingly, the 5V regulator tried to escape it's torments before it died. It got so hot that it was only connected by LIQUID solder! Why it died in the first place is beyond me. Usually 3 terminal regulators just shut down when they get too hot. Oh well, I should have figured out the power it would have to dissipate when also powering the VFD BEFORE I connected it all up. BAD engineer. BAD!

Later I added the 16 x 2 VFD (which is 100% "LCD compatible") to work on improving the LiquidCrystal library (as well as adding "brightness" and "powersave" commands to it to support VFD's).

Then other things got tacked on here and there wherever they fit. It's not pretty, but it's really useful.

I've also got a really nice "hacked" Arduino IDE (based on the 1.0.6 version) which adds a lot of useful options (such as setting various compiler flags, turning on or off floating point support, a "build then monitor" all in one button function, etc..) if anyone is interested PM me.

Thought you all might be interested. If not, well.... sorry!

-- Roger

I find it especially curious that the regulator continued to function if it got to the point of melting solder...

Good work otherwise!

EDIT: Question, on the MEGA board on the first photo, the VIN and 5V pins are colored. Why did you do this?

legonick22:
I find it especially curious that the regulator continued to function if it got to the point of melting solder...

Good work otherwise!

EDIT: Question, on the MEGA board on the first photo, the VIN and 5V pins are colored. Why did you do this?

So I know where those two are without having to look carefully. If I plugged a 5V thing into the Vin pin by mistake, the magic smoke might escape and then........

Plus, I know that the two grounds are between the power pins, so I'm all set.

BTW, I use the old hard drive power cable color code... red for 5V and yellow for 12V :grin:

(edit to add): When looking at the connector, unless I look straight down, the pin number may not line up with the hole in the connector due to parallax caused by the viewing angle. I didn't want to mistake one pin for another. That's why they are color coded.