Show Posts
Pages: [1]
1  Community / Bar Sport / Genius behind resistors stripe code and electrolytic cap wire length? [rant] on: November 18, 2012, 02:30:16 pm
I have two rants behind these electronic component 'conventions'.

First are resistors and their stripe coding. The bain of my existence. You get one mixed pile of resistors and you are gonna waste your time looking for the one you want especially if you have to de-code the stripes or individually measure the reading. Isnt it more logical to print the numbers of their resistance on them instead of some coded stripe (like they do for say capacitors). Even if you are a seasoned veteran in resistor stripe reading, its still a pain. And you are likely to forget the coding convention if you dont read resistors on a daily basis also. Its unnatural for new and even moderately seasoned folks who have to refer to the chart. Otherwise, for those just picking and reading off the resistance off a multimeter, its downright a PITA.

Its just so unnatural. Why dont they make the convention of printing the number on the resistors or at least have the numerical value along with the stripes? So what is the genius reasoning behind the stripe coding convention?

Second are electrolytic caps. LEDs have one longer arm than the other. Makes sense; its polar and its hard to tell which one is which so make one length longer. OK. Schottky diodes also have polarity, but they mark the polarity on the packaging while the lead length remains the same on both ends. Makes sense. Now, electrolytic caps. These have both marks to tell you the polarity, as well as having one lead longer than the other. Why? Is it not overkill? What is the genius behind this convention?

Please enlighten me.
2  Using Arduino / Microcontrollers / Re: Robustness and long term reliability of Arduino boards and AVR chips on: November 11, 2012, 04:45:03 pm
How long can the arduino or those AVR/PIC chips run continuously? Say blinking LEDs on Pin 1. How long can it last until it skips a beat or stops working properly or downright fails?

For example, if you make an RFID door to unlock it for a home automation application, you'd want the ensure your controller is quite reliable lol.

Yeah thats interesting too. I always wondered what chips industrial PLCs use. Do they use commercial ones manufactured by large fab houses or do they program their own controllers with FPGAs, ASICs, etc?
3  Using Arduino / Microcontrollers / Robustness and long term reliability of Arduino boards and AVR chips on: November 11, 2012, 03:56:00 pm
If you created some application with the arduino boards or using AVR or PIC chips, how good is their long term reliability and robustness?

For example, PLCs are engineered specially to take a beating, long continuous cycle times, electrical circuit protection, and good mechanical protection against shock etc. So ultimately PLCs tend to be workhorses and great for automation applications because they are reliable for long term continuous use and are very robust.

Are arduino boards and AVR and PIC chips as good in terms of long term continuous operation? How reliable are they? Provided of course you are supplying power constantly and it wont be in a situation where it will get knocked around. For example, will the internal circuit inside the microcontroller or on the PCB reach end-of-life or premature failure after being cycled for a long time? What does your experience tell you? How long can you run them continuously before you get 'bugs' or hickups or even total failure?
4  Using Arduino / Programming Questions / Re: Highest PWM frequency output for the Uno/Nano on: November 03, 2012, 02:38:46 am
Sorry didnt mean to ignore the advice. I just tried it for the sake of it. Actually the reason is I intend to be able to modulate the frequency so maybe Id want it in the loop instead.
5  Using Arduino / Microcontrollers / Re: How many times can the arduino(s) be reprogrammed? on: October 22, 2012, 03:10:41 am
But there is no wear leveling like SSDs so if you keep writing small programs I guess some parts of the flash wear more than others?
6  Using Arduino / Programming Questions / Re: Highest PWM frequency output for the Uno/Nano on: October 22, 2012, 03:08:24 am
Hi I think I just tired this:


Code:
#include <TimerHelpers.h>

// Timer 0

// output    OC0A   pin 12  (D6)

const byte timer0OutputA = 6;
 
void setup() {
   pinMode (timer0OutputA, OUTPUT);
}  // end of setup

void loop() {

   TIMSK0 = 0;  // no interrupts
   Timer0::setMode (2, Timer0::PRESCALE_1, Timer0::TOGGLE_A_ON_COMPARE);
   OCR0A = 1;  // count to 2
}

Also I tried it with the nano recently. I noticed that the uno produces better square waves than the nano. Are the pulses generated by the microcontroller (which are the same for the uno and nano)? Or the crystal?

I was wondering if there is any documentation on how to use the TimeHelper header file?
7  Using Arduino / Programming Questions / Re: Highest PWM frequency output for the Uno/Nano on: October 20, 2012, 11:14:53 pm
Thanks. I got it to work. The restart seemed to do it.

I also measure 4MHz square wave now too! Cheers!A few noob question:

Does it still source the maximum 50mA current?
Does this code also work for the nano?
Does the code work for all digital pins?

I just tried to move part of the code over to loop and the signal is no longer steady and 50% dutycycle i guess because there is some time lag with the restarting the loop? So this method only works under void setup()?
8  Using Arduino / Programming Questions / Re: Highest PWM frequency output for the Uno/Nano on: October 20, 2012, 10:54:50 pm
I am using an Uno right now too. Yeah I saw the link from the site you linked to earlier.

It says Timer0 is not declared?
9  Using Arduino / Programming Questions / Re: Highest PWM frequency output for the Uno/Nano on: October 20, 2012, 10:37:37 pm
Thanks. Looks like the default digitalWrite() has too much overhead. I just tried measuring the uno with the OP code and I topped at 116kHz. The nano that I measured before topped at 70kHz. But seeing there are many different timers I guess it depends on which pin too?

For the sample code you supplied using the TimersHelpers.h library, I downloaded it and tried the sample code. There was an error on debug saying TImer0 is not defined?

If I want to create 50% duty cycle signals at the highest frequency possible (essentially just a normal periodic square wave). Can that be done up to 4MHz (you mentioned 4MHz can only choose between 33% or 66% duty)?
10  Using Arduino / Programming Questions / Highest PWM frequency output for the Uno/Nano on: October 20, 2012, 09:16:38 pm
What is the highest PWM frequency that can be output by the Uno or Nano?

I cant remember exactly right now but I remember measuring around 70kHz output using an oscilloscope with the following program:

Code:
void loop ()
{
  digitalWrite(outPin, HIGH);
  digitalWrite(outPin, LOW);
}

That program above is essentially the fastest that it can generate a PWM pulse right? So is it capped at 70kHz then?

How do you get higher frequencies straight out of the digital I/O?
11  Using Arduino / Microcontrollers / How many times can the arduino(s) be reprogrammed? on: October 20, 2012, 01:48:51 pm
Flash memory often have limited write-erase cycles.

How many times can the arduino(s) (Uno, Nano etc) be reprogrammed?
Pages: [1]