8MHz REAL disadvantages discussed

I have successfully reprogrammed an ATMega328P from Duemilanove to Uno "down" to Pro or Pro Mini but 5v, 8MHz! My project is to control an array (1D/2D/3D? no matter) of stepper motors on a strict budget. Approximately 35 steppers where full steps are acceptable and preferable. My project is of littler concern, I would more or less like to have a straight answer on the disadvantages of 8MHz ATMega328 breadboard or custom PCB.
From my research and experimenting there is very little reason for the majority of projects to run 16MHz. All of the libraries appear to be working fine with 8MHz. I'm currently using an analog input mapped to control both a PWM hobby servo and a darlington paired IC stepper motor. Have not had any issues of missed steps. The code is even using the serial UART to output values at 9600 baud. I'm going to try and increase the baud rate and watch it on my oscilloscope but I'm feeling pretty good about this minimal build. I've even removed the pull-up resistor. Next steps in order: Test how many steppers can be controlled by a single ATMega328 using darlington pair IC, then testing a networking schemes. I'm envisioning the ability to control 5 steppers with some multiplexing and keep networking abilities without the need of extra support components. For around $2 a chip at bulk pricing I feel this is the right direction. No, my project doesn't need the steppers to be in "real-time" sync with each other. Just not detectable to the naked eye. Art project.
Please list any issues that 8MHz might pose. I've looked at other topics on this forum but they often push the user/creator to a "why NOT use external oscillator" without publishing REAL reasons. It frustrates me when I get lazy answers, I need numbers folks. Engineering isn't always about retooling the norm. Sometimes the norm needs to be adjusted backwards so progress can be made.
Thanks and a preemptive thank you for those of you that will respect my topic and keep this REAL by providing actual tested examples of when 8MHz hits a limitation.
Jon

needsnumbers:
I've even removed the pull-up resistor.

The one that's supposed to be on reset?

It will be much easier to control stepper motors with a "proper" stepper driver board such as a Pololu A4988. They only need 2 Arduino pins - step and direction - and the code will be simpler (i.e take less time to run) which might be a benefit if you are driving a large number of motors.

...R

Reasons to run at lower clock speeds: supply voltage requirements are lower.

Reasons to run at higher clock speeds: more processor cycles available (only matters if you ran out of processing power at the lower speed, or want to sleep the processor to save power while it's idle), maximum achievable output frequency higher and minimum detectable input pulse length is shorter.

Unless there is some advantage to running at the lower frequency in your application, I would run at the standard frequency to make maximum performance available, since it costs you nothing to do so.

I have yet to work on a project where 16MHz represented a real advantage over 8MHz. I've built several 8MHz projects using both the internal oscillator and external crystals. Serial comm is limited to 57600 baud at 8MHz. I've found 9600 baud serial comm to be very successful using the internal oscillator at 8MHz; there are no guarantees but the factory calibration has been quite close for the chips I've tried. Even if it's not, the oscillator can be calibrated close enough without too much trouble. I haven't found any libraries that don't work at 8MHz but I've probably only used a small subset.

Yes! The reset pin appears to have a pull-up resistor though I couldn’t confirm it in the datasheets I could see it on the oscilloscope as always staying high. This is with an FTDI cable using the CAP inline. Unplugging the cable reduces the intensity of noise but also introduces a lower frequency noise from the output switching loads to the d-pair IC and PWM servo.

Robin2:
It will be much easier to control stepper motors with a “proper” stepper driver board such as a Pololu A4988. They only need 2 Arduino pins - step and direction - and the code will be simpler (i.e take less time to run) which might be a benefit if you are driving a large number of motors.

…R

I’m not fully understanding why you suggest I purchase the Pololu’s for my project. How will this help me at the cost of 35x$7 = $245 ? Each uln2803a can control 2 steppers and cost < $1, so $18 worth of support ICs. Granted the controller reduces my pin count by half from 4 to 2 but at $2 per ATMega328 I would be using 5 more than with the Pololu which is only $10. You are now telling me that I will see what for spending and extra $217 ?

PeterH:
Reasons to run at lower clock speeds: supply voltage requirements are lower.

Reasons to run at higher clock speeds: more processor cycles available (only matters if you ran out of processing power at the lower speed, or want to sleep the processor to save power while it’s idle), maximum achievable output frequency higher and minimum detectable input pulse length is shorter.

Unless there is some advantage to running at the lower frequency in your application, I would run at the standard frequency to make maximum performance available, since it costs you nothing to do so.

There seems to be a disconnect. I felt like it was explicit when I said my project has 35 steppers and I’m not understanding how it “costs nothing to do so.” Oscillators cost something, so do pF caps, and resistors. They might seem trivial for a small single project but when you are making a lot it does add up. I am trying to work with bare bones here so that I can gift these final projects. I also don’t understand your comment about how running a higher clock speed would be used if I “want to sleep the processor to save power.” I think it would be the other way around, wouldn’t using the slower oscillator built in safe power? Not that this is a battery project but just saying… now if you’re right and you need an external 16MHz oscillator to enable a sleep mode I would greatly appreciate more advice. I think that would be good for this thread!

Thanks for confirming my gut feelings on this subject. I really believe that it only adds confusion when adding parts "just cause you might." Those answers are Internet Garbage and it gets tiresome sifting through it all. Smaller communities are easier to manage but they grow at a slower rate... it would just be nice if people knew a little more about their projects before ordering a gazillion unnecessary parts. Apple made it big because they took the KISS approach and then took away the clutter. Nobody is really screaming that their laptops have removed optical drives and reduced ports! The popularity is a little more restrictive but it gives a greater sense of understanding not having to look at a laptop and think that if one part was missing, the whole thing wouldn't work... not true. I hope this thread spurs more people to rethink their projects abilities. Maybe I'm onto the next step for Arduino... affordable time saving (assembly) macro networks.

needsnumbers:

[quote author=Coding Badly link=topic=198453.msg1464151#msg1464151 date=1384196262]

needsnumbers:
I’ve even removed the pull-up resistor.

The one that’s supposed to be on reset?

Yes![/quote]

You removed a part that Atmel specifically indicates should be included and costs less than 1¢? Why on Earth would you do that?

Did you also remove / not include the two 0.1 µF bypass capacitors?

I am trying very hard not to read into an attitude with your "Why on Earth" comment.
Where did you see that Atmel specifically indicates an external pull-up resistor should be included? According to page 47 of this official Atmel datasheet: Smart | Connected | Secure | Microchip Technology There is an internal pull-up resistor. In the same datasheet there is a min/max values of the Rrst Reset Pull-up resistor of 30k/60k. Arduino Uno uses 10k external and by no means is it disabling the internal pull-up. This is supplemental and as far as I'm concerned, unnecessary until proven necessary. Now I do believe it is good practice to use an external reset resistor but this thread is not about good practice, it's about REAL needs. I'm very open to proof that there needs to be a pull-up resistor. I will sacrifice one of my many Uno boards and unsolder the pull-up if it convinces others that it is not necessary.
Edit: Yes I did omit the bypass caps but there are decoupling caps for the rest of my circuit. As I said earlier, some noise on the reset line but not bad at all. I've been thrashing this setup for hours now without a single glitch. I'm turning it off now to go home but I will try and upload a video tomorrow showing the system working and the signal on the pins of concern.

needsnumbers:
I also don’t understand your comment about how running a higher clock speed would be used if I “want to sleep the processor to save power.” I think it would be the other way around, wouldn’t using the slower oscillator built in safe power?

The idea of running at lower voltages comes up from time to time with battery powered projects as a way to reduce power consumption and extend battery life. However, with a system that is sleeping most of the time you actually get more CPU cycles per Joule if you run at the higher voltage with a faster clock, since it means the CPU and peripherals spend less time awake.

If running at a lower frequency enables you to reduce the component count and the component cost is significant to you then that seems like ample motivation to run at the lower frequency.

PeterH:

needsnumbers:
I also don't understand your comment about how running a higher clock speed would be used if I "want to sleep the processor to save power." I think it would be the other way around, wouldn't using the slower oscillator built in safe power?

The idea of running at lower voltages comes up from time to time with battery powered projects as a way to reduce power consumption and extend battery life. However, with a system that is sleeping most of the time you actually get more CPU cycles per Joule if you run at the higher voltage with a faster clock, since it means the CPU and peripherals spend less time awake.

If running at a lower frequency enables you to reduce the component count and the component cost is significant to you then that seems like ample motivation to run at the lower frequency.

Excellent thought on the power savings! That did occur to me but because I'm controlling real-world devices that have much longer time constants I think it makes sense on power to run at the lowest speed possible so long as it's getting the job done. These units are being used as micro controllers, not a form of CPU with varied calculation loads.
Great point though to say that a faster processing CAN save power. Thumbs up.

needsnumbers:

[quote author=Coding Badly link=topic=198453.msg1464494#msg1464494 date=1384211949]
You removed a part that Atmel specifically indicates should be included and costs less than 1¢?

I am trying very hard not to read into an attitude with your "Why on Earth" comment.
[/quote]

Hm, 5-post newbie comes on here and already knows better than a 11,000 post veteran -- a moderator no less -- who knows probably more about Atmel AVRs than many Atmel employees. Good luck with that.

You can omit reset pullups and decoupling capacitors... sometimes. Then when your projects start spontaneously rebooting for no apparent reason and you have to go back and add pullups and caps to dozens of boards, don't blame us. :slight_smile:

That aside, I love 8MHz. I use it for all of my projects. It's plenty fast for my purposes and saves a little expense and a little soldering. The reason Arduinos run at 16MHz with a resonator/crystal is for reliable asynchronous serial communication -- something important for Arduino which uses a bootloader and TTL RS232 serial UART to download sketches.

I've been lucky enough to do serial at 38,400bps reliably at 8MHz with the internal RC oscillator (factory calibration only). Doesn't mean I'll always be lucky with every chip I pick up, but I'm satisfied with it so far.

If you don't care about serial comms (sketch downloads at low baud rates or using ISP), then 8MHz should work fine for you. Especially with the proper decoupling caps and reset pullup. :slight_smile:

Where did you see that Atmel specifically indicates an external pull-up resistor should be included?

Three seconds with Google took me to this...

tylernt:
…who knows probably more about Atmel AVRs than many Atmel employees.

Even if that is true my assertion that the external pull-up is important is based on the experiences of folks from this forum.

needsnumbers:
Now I do believe it is good practice to use an external reset resistor but this thread is not about good practice, it’s about REAL needs.

My assertion is based on the REAL experiences of folks from this forum.

I’m very open to proof that there needs to be a pull-up resistor.

You can find the proof by searching this forum.

However, it is not worth the effort given the fact that we are talking about a part that costs less than 1¢.

Shame is the only word...
My time soldering in a resistor when no soldering is necessary could be worth more than that resistor. You also don't know my space constraints, design profile, or any of the other necessary pieces to respectfully comment on the necessity of this resistor.
Assuming that because I am new to this forum that I don't know more than a post veteran should be made carefully. I have read all of these datasheets and likely more than this moderator ever has. I am in the business of teaching engineers low level programming that start with a MOS 6502 and go from there so please be very careful not to lump me into the group of less experienced. We can end this flame now or I can leave in disgust of typical immature admin/moderator bullying and favoritism but I think that unnecessary. You all have given me advice that I think will help future readers of this thread despite the choice criticism.

I'm not trolling but I must point out that this PDF you linked to has a title "design considerations." None of that is to be read as, necessary or as you put it, "supposed to be." It is recommended to add these features on commercial products. I think it is silly to use a blanket statement like the one you said about the reset resistor. Again, I'm not arguing the use of one, I am arguing the necessity. After searching this forum and the web, I do not see where putting an external pull-up has fixed anybody's problems. Please help me find these examples as I do want to see them, truly and not being sarcastic.

Perhaps you are familiar with the discussion of reset pull-up resistors in Section 2 of this application note?

Also, decoupling capacitors are discussed in section 1. The application of a small ceramic capacitor to every digital IC in a circuit is such a common and accepted practice that it should go without saying. It is not just some theoretical nicety, it addresses real needs. Ignorance of, or disregard for same will, sooner or later, cause embarrassing failures.

To their credit, semiconductor manufacturers usually manage to mention decoupling in datasheets. However, expecting any given datasheet to be a complete course in electrical engineering is bound to be disappointing.

"Doctors and lawyers bury their mistakes; an engineer's mistake lives forever as a monument to his stupidity." (One popular example.)

needsnumbers:
Shame is the only word...

I assume you meant that to read "shame on you". In which case...

Again, I'm not arguing the use of one, I am arguing the necessity. After searching this forum and the web, I do not see where putting an external pull-up has fixed anybody's problems. Please help me find these examples as I do want to see them,

...find it yourself. I have better things to do with my time.

...truly and not being sarcastic.

I have no doubt about your sincerity. But I also have no patience for your insults.

I take your point about the extra cost of A4988 stepper drivers - I had not realized the product you propose to use is so much cheaper.

You haven't told us what your overall application is - it can't be extraordinarily cheap if it includes the cost of 35 stepper motors.

In my personal experience it is a mistake to design a single project (or a very limited production run) to the absolute rock-bottom cost. Better to give the client the true cost of a well-constructed project (including proper payment for your time soldering components) and, if s/he can't afford that, then don't do it. The same applies perhaps to a greater extent) if you are planning to give the projects away for free. Your reputation is on the line.

Cost paring can be considered when the production runs into hundreds or thousands.

...R

needsnumbers:
After searching this forum and the web, I do not see where putting an external pull-up has fixed anybody's problems. Please help me find these examples as I do want to see them, truly and not being sarcastic.

It fixed mine! In my case I was doing a quick test on a breadboard with a minimal set up (8MHz, internal oscillator) so just didn't bother with the pull-up and the ATMega328 would randomly reset.

I have had many cases where the lack of pullup resistor, has led to strange results.
Just yesterday I spent an hour to find a flaw in my sketch.
It turned out that it was the lack of pull up resistor that caused the weird error (rapid autoreset).
Keep in mind that you may not see the error while your project sits on your table,
but if you move your project to a different environment that is more noisy it is an entirely different matter.