7

Now I have these Arduino Pro Mini from Sparkfun. They are the latest version that I know (yeah, it's the one that have those horrible misaligned pins). Now they are designed around the ATmega328P and have a 16MHz crystal on them.

Now, my question is: Can I run an ATmega328 with a 16MHz crystal while supplying ONLY 3.3V.

The reason I'm doing this is because 5V / 16MHz Pro Minis from China are way cheaper then 3.3 / 8MHz.

Facts that I already know:

If I follow the datasheet to the the letter, this configuration should not work. BUT... After some test, it did work.

Also, I want an answers based on personal experience (NOT OPINIONS) and not datasheet and specs.


[EDIT] Including a way to use the internal clock (at 8MHz) of the ATmega328P would really help!

8
  • 6
    I doubt anyone here has personal experience testing all the peripherals and instructions of the chips, on hundreds of samples, over the full operating temperature range. That's why, when you care about reliability, you rely on the datasheet. If reliability is not an essential requirement of yours, you already know it works. Oct 19, 2016 at 15:37
  • 1
    The OLIMEXINO-32U4 can be jumpered for 5V or 3.3V and uses 16MHz. The manual has more info about this on page 14.
    – gone
    Oct 19, 2016 at 17:17
  • 1
    This is not an answer to the questin, more like a solution to the problem (why i comment), but there is lipo stepup modules that gives you 5 volt from a 3.3 battery, enough to run an arduino. Take a look at that. Oct 21, 2016 at 8:21
  • 1
    @Magic-Mouse, thanks but stepping up voltage is not really efficient for me. I'm using a couple of breakouts, all using 3.3V. Stepping up something to then regulate it down is somewhat stupid for my project. Thanks though.
    – Dat Ha
    Oct 21, 2016 at 11:36
  • 1
    @canadiancyborg the point was not to regulate it down, but you dont have to step up everything. Just the feed to the AT chip. Oct 21, 2016 at 11:41

7 Answers 7

9

Officially, no. Practically, often but not always.

If I follow the datasheet to the the letter, this configuration should not work. BUT... After some test, it did work.

The data sheet does not say that it "should not" work, it says that it is that the part is not qualified for operation at 16 MHz below some voltage higher than you want to use. That does not mean that a given chip cannot work there, it only means that a chip that fails to may not be considered "bad". Failure may be total and obvious or subtle.

In practice I have seen it work, both on small modified import boards and those with switchable power supply voltage. But I also recall seeing it fail to work.

Two factors that can make a theoretical difference are part-to-part manufacturing variation and operating temperature.

Note that with an ISP setup you can change the fuses to run the chip on what was sold as a 5v external crystal board, to operate from the internal 8 MHz oscillator instead, and you can do this even while leaving the crystal on the board. If you also change the brownout detector fuse, you can lower the voltage further, for example to operate without a regulator directly on two AA cells. Of course that applies to the ATmega itself - any other active components on the board would have to be qualified for the intended voltage too.

5

According to the datasheet you need 3.78V to run at 16 MHz, and 3.3V isn't that far off. I would be surprised, for example, if it stopped working at 3.77V, because that would mean that the operating at 3.78V was marginal.

I have operated these chips out of spec, for example under voltage, or with a 24 MHz crystal. They seem to work. However I would guess that Atmel's position would be: if you operate out of our specs, don't come crying to us if it is unreliable.

A few percent out of spec will probably work - and 3.3V is 87% of 3.78V. They write those specs to allow for fluctuations in the manufacturing process, and are confident that all their chips would meet them. Probably a lot of chips would be over spec.


Including a way to use the internal clock (at 8MHz) of the ATmega328P would really help!

Set the fuses appropriately. See Engbedded Atmel AVR® Fuse Calculator

For the Atmega328P making the low fuse be 0xE2 should do it.


The reason I'm doing this is because 5V / 16MHz Pro Minis from China are way cheaper then 3.3 / 8MHz.

Be cautious that cheap clone boards may be manufactured with manufacturers' "seconds".

1
  • Thanks. Just as a note that the cheap chinese board i have look EXACTLY like originals by sparkfun. all the trademarks are there, and even the oshw logo is there. i doupt they are fake and if they are, well they still did a lot of effort.
    – Dat Ha
    Oct 21, 2016 at 11:33
4

A little test, not very scientific, but shows it runs fine on 3.3V - https://www.youtube.com/watch?v=If0eOa0Uj5I.

Again, if you would like to stay withing the specification just use a "clock divider/2" and run your MCU at 8MHz if they have a 16MHz Crystal:

clock_prescale_set(clock_div_2)

http://www.nongnu.org/avr-libc/user-manual/group__avr__power.html

2
  • 1
    If you set this in software, it requires first booting at 16 MHz. If you want to use the clock divider this seems like a better proposal, though I can't say I've tried it: arduino.stackexchange.com/a/5413/612 Oct 20, 2016 at 5:33
  • Good point, the fuse sets thw clock prescaler to clock_div_8, you can bring it back to clock_div_2 on the first line of your code. Don't forget you'll need the bootloader with the correct speed if you plan to use code upload via usb/serial.
    – Talk2
    Oct 20, 2016 at 11:09
3

I've built a few 3.3v home-brew-duinos with 16Mhz crystals (because I have a bag of 50 xtals!) - they run fine in the conditions I've put them in so far (on my desk). Some of them may be closer to their margins than others, and might fail at at some otherwise in-spec temperature, for example. If these were intended to go outside (enclosed, of course), I'd have to test them against the conditions they might be subjected to. Or redesign them to keep them in spec in the first-place.

I think the only way to know is to try it on your board and see. I don't have or know of a test-suite for the chip; I've just uploaded known-working sketches to my experimental boards and had no obvious glitches. Yet.

1

I am running my atmega328p chip with 3.3 volts because I did not wanted to use a voltage divider when powering the NRF24L01 that is part of my circuit. Because I only have 16mhz crystals and I don't know how to lower the frequency to 8mhz I been running my project with 3.3v and it works great. I been running this code for over a year and I have had no problems.

The code works great even at 2.8v running at 16mhz. At 2.65v it stops working.

1

You can use the clock prescaler in conjunction with the CKDIV8 fuse to operate with an 8MHz clock but using a 16MHz crystal.

See the "CLKPR – Clock Prescale Register" details in the data sheet for details (Page 36 in my data sheet 07/2012).

Basically you set the CKDIV8 fuse so the processor runs at 2MHz after power-up. Then once up and running you set the division ratio to 2 which would give 8MHZ operation which is guaranteed at 3.3V.

1

Atmega48/168/328's datasheet graph (under "29.3: Speed Grades") presents maximum safe clock speed for given VDD voltage. It consists of three mathematical functions - 1 constant and 2 linear. I managed to calculate their formulas and sum them up:

formulas

where:

x is a VDD voltage [V] and y - max safe clock speed [MHz] you can achieve with the voltage. I've done it, because I've had a need to check, if 3.3V power supply is enought for a 12MHz crystal - and it is (around 13,3MHz max.).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.