G+_Chris Kurtz Posted September 3, 2017 Share Posted September 3, 2017 I'm writing/adapting some fairly complex code on an Arduino Uno (an Elegoo Uno R3 clone) and noticed the LEDs I'm controlling (via an I2C SX1509 extender) are really slow compared to what it should be. The person I got the code from was using a Nano instead, so I grabbed a convenient one of those are the code runs fine. So I grabbed another Uno (also a clone, but from a different manufacturer) from another project...and the code runs fine on that. I tested the board using the ShowInfo sketch (https://playground.arduino.cc/Main/ShowInfo) and it does indeed show F_CPU at 16Mhz as is proper. I reflashed the bootloader on the slow Uno to no effect...any suggestions on what the issue is? Could the 328P be faulty? Here is a video showing the difference. The first half is the slow Uno, the second is a normal Uno. Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 3, 2017 Share Posted September 3, 2017 Frequency of the osolator(crystal) not at spec. Is my first guess. Many knock-offs use cheaper components. Link to comment Share on other sites More sharing options...
G+_Chris Kurtz Posted September 4, 2017 Author Share Posted September 4, 2017 Black Merc Would there be any way to tell (without an oscilloscope, which I don't have, yet...) -- or is the fact it's slow the test? Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 4, 2017 Share Posted September 4, 2017 Chris Kurtz I'd say yes. Even if you did identical blinking LED circuits, they should not function much different from each other. Link to comment Share on other sites More sharing options...
G+_Chris Kurtz Posted September 4, 2017 Author Share Posted September 4, 2017 Hmm, I ran this code (https://forum.arduino.cc/index.php?topic=345862.0) and get the expected (16Mhz) results...so I'm back to Square One. forum.arduino.cc - [sOLVED] determine CPU speed in software ? Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 4, 2017 Share Posted September 4, 2017 Is the main chip the same? Are their more/less components on the board? Does the connections look solid? Any one of a number of things the maker did not do or do right could result in a bad product. Link to comment Share on other sites More sharing options...
G+_Chris Kurtz Posted September 4, 2017 Author Share Posted September 4, 2017 Yes, DIP Atmega 328P. All the components seem good quality, although the brand was cheap. Oh well, I'll avoid the brand (Elegoo) in the future. Link to comment Share on other sites More sharing options...
G+_David Peach Posted September 4, 2017 Share Posted September 4, 2017 I have had similar issues with generic. Sometimes changing from pin 4 to 5 (or any other) solves the problem. Sometimes waving my hand over the board temporarily fixes it. Some kind of capacitance build up. Link to comment Share on other sites More sharing options...
G+_Jared Messervy Posted September 6, 2017 Share Posted September 6, 2017 It's also good to remember that a lot of out of spec chips are "washed" and relabled in a grey market distribution. It can be difficult or impossible to tell from the outside, or without extensive testing. We have had a lot of issues in the military supply chain with grey market alerts. Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 6, 2017 Share Posted September 6, 2017 Jared Messervy and mil-spec equipment is supposed to be state-of-the-art, high quality, hardened like a Timex or Swiss Watch. If the military is getting junk parts, are we getting the leftovers? Link to comment Share on other sites More sharing options...
G+_Jared Messervy Posted September 6, 2017 Share Posted September 6, 2017 No, some subcontractors occasionally purchased from non approved sources. That's part of the reason why components are so expensive. They have to go through lots of verification tests. Link to comment Share on other sites More sharing options...
G+_Black Merc Posted September 6, 2017 Share Posted September 6, 2017 Jared Messervy you forget, all the paperwork and manuals they have to produce. The manuals alone are thick enough to kill someone with. Link to comment Share on other sites More sharing options...
G+_Jared Messervy Posted September 6, 2017 Share Posted September 6, 2017 I agree! I have to reference several mil-specs every day! Link to comment Share on other sites More sharing options...
Recommended Posts