fried board???

i inadvertantly reversed the + and GND leads from telegraph key to a breadboard running a morse code program,
using genuine arduino uno r3.

it's funny but board diagnostics are ok and i can run simple programs like blink.
However , the morse program won't run......only showing the occasional morse letter in the serial monitor.
I have rechecked connections, ports, wires ,etc.

Any thoughts ??
can an uno be "half fried"?

thanks for your help

techbydesign:
board diagnostics are ok

What board diagnostics?

What other hardware was on your Arduino connected to? Maybe the problem is there.

Hi James c4s,

Did the loop test , usb connection good.
Blink test ok.
Don't know what else to try, only morse key connected when uno connected to Mac OS X .
Could it be a problem with the bootloader? How do I check?
Don't know why the board runs simple sketches but not anything else.
I suppose I could just discard it and buy a new one, but I'd like to learn how to assess the problem.

Thanks,
TBD

have you tried connecting a meter to the telegraph key's output to check if the key is making contact ?
I would also check the inputs of the Uno where the telegraphy key is connect with a tact switch
and use the ide example debounce.

I would suspect the code more than the Uno at this stage.

That said it is possible to part fry chips, as in burn small parts of the actual silicon and that will also reduce the over all life of the chip. I just doubt that is what has happened.

Also the bootloader must be good otherwise you could not load programs to it.

techbydesign:
Don't know what else to try, only morse key connected when uno connected to Mac OS X .
Could it be a problem with the bootloader? How do I check?

The bootloader is OK if you can upload simple sketches like 'Blink' using the bootloader.

techbydesign:
Don't know why the board runs simple sketches but not anything else.
I suppose I could just discard it and buy a new one, but I'd like to learn how to assess the problem.

If you connect wrong circuit to the Arduino board and/or create a short circuit with your programming, it is possible to burn just single port pins at the controller, so that some pins stop working while others are working OK.

If you need help you'd better tell something more about:

  • all circuits and connections you made ("schematics")
  • the program/sketch you'd like to run

techbydesign:
Don't know why the board runs simple sketches but not anything else.

You'll have to explain what you mean by "simple sketches." It is pretty unlikely you've done specific types of damage that prevent some code from not working. It is more likely, the code isn't working like you expect.

Post code (with code tags) of what you're trying.

techbydesign:
Don't know what else to try, only morse key connected when uno connected to Mac OS X .

What is a morse key?

Thanks all,
Ive checked the wiring and outputs of the morse key and all are good.

RajuFM... I'm truly not familiar with the debounce test at the pins where I hook my key to.
Could you walk me thru it please and tnx.

As you can tell , I'm new to the forums. Why was the post moved, so I know what not to do in the future.

I also have a pristine backup sketch which I used in my testing just in case the original coding was disrupted.

many thanks,
TBD

techbydesign:
As you can tell , I'm new to the forums. Why was the post moved, so I know what not to do in the future.

Because the description of Installation and Troubleshooting says: "For problems with Arduino itself, NOT your project".

whats the easiest way to check if the pins are functioning on the arduino?

After this, i’m getting a new board.

thanks to all who tried to help me

TBD

Why don't you just humor us and post the code you are using?

I would be happy to post the code, but I think I found part of the problem..

the morse code sketch will only run when the morse key is hooked to ground and pin 13.

when I change the pin connection (and in the sketch also) nothing happens in the serial monitor.

Any ideas??

TBD

a morse key is a telegraph key incorporating an i/o switch .

techbydesign:
the morse code sketch will only run when the morse key is hooked to ground and pin 13.

In this forum you are not asking questions to mind-readers.

What type of pull-resistor do you use with your morse key:

  • external pull-down resistor?
  • external pull-up resistor?
  • internal pull-up resistor of the controller, activated by software?

Post a detailed description of all circuit connections!
And post your code (within code-tags)!

when I change the pin connection (and in the sketch also) nothing happens in the serial monitor.

Any ideas??

Who knows? If it worked at one time, and not now, some type of hardware change/issue probably occurred. If you don't post code and accurate wiring diagrams of your project, you are pretty much on your own.

This is not my sketch…Full credit for it goes to Budd Churchward WB7FHC

since A0 didn’t work , I changed to pin 13, the only pin that would work, and only at certain sending speeds.

10k pulldown resistor between GND and 1 lead of telegraph key.

the key is connected to pin 13 and ground.

/* Barnacle Budd’s Morse Code Decoder v. 0.1
(c) 2011, Budd Churchward - WB7FHC

Hook a button or telegraph key up to your Arduino
and this program will copy your Morse Code and display
the characters in your Monitor window.

The program will automatically adjust to the speed of code that
you are sending. The first few characters may come out wrong.

The software tracks the speed of the sender’s dahs to make
its adjustments. The more dahs you send at the beginning
the sooner it locks into solid copy.

After a reset, the following text is very difficult to lock in on:
‘SHE IS HIS SISTER’ because there are only two dahs in the whole
phrase and they come near the end. However, if you reset and then
send ‘CALL ME WOODY’ it will match your speed quite quickly.
*/

int myKey=13; // We are borrowing (Analog Pin 0) and using it as digital…use 13
int speaker=11; // Speaker will be hooked between pin 11 and ground

int val=0; // A value for key up and down
int myTone=650; // Frequency of our tone
// 440 was original mytone
boolean ditOrDah=true; // We have a full dit or a full dah
int dit=100; // If we loop less than this with keydown it’s a dit else a dah
int averageDah=150; // Start with this value we will adjusted it each time he sends a dah

boolean characterDone=true; // A full character has been sent
int myBounce=2; // Handles normal keybounce but we needed to do more later
int downTime=0; // We are going to count the cycles we loop while key is down

long FullWait=6000; // This value will be set by the sender’s speed - the gap between letters
long WaitWait=FullWait; // WaitWait is for the gap between dits and dahs
long newWord=0; // For the gap between words

int nearLineEnd=60; // How far do you want to type across your monitor window?
int letterCount=0; // To keep track of how many characters have been printed on the line

int myNum=0; // We will turn the dits and dahs into a data stream and parse
// a value that we will store here

// The place a letter appears here matches the value we parse out of the code
char mySet ="##TEMNAIOGKDWRUS##QZYCXBJP#L#FVH09#8###7#######61#######2###3#45";

void setup() {
pinMode(myKey, INPUT);
pinMode(speaker,OUTPUT);
// initialize the serial communication:
Serial.begin(9600);
}

void loop() {
val=digitalRead(myKey); // Is it up or is it down?
if (val) keyIsDown(); // Any value here means it is down
if (!val) keyIsUp(); // Should be 0 when it is up.
}

void keyIsDown() {
tone(speaker,myTone); // Turn on the sound
WaitWait=FullWait; // Reset our Key Up countdown
downTime++; //Count how long the key is down

if (myNum==0) { // myNum will equal zero at the beginning of a character
myNum=1; // This is our start bit - it only does this once per letter
}

characterDone=false; // we aren’t finished with the character yet, there could be more
ditOrDah=false; // we don’t know what it is yet - key is still down
delay(myBounce); // short delay to keep the real world in synch with Arduino
}

void keyIsUp() {
noTone(speaker); // Turn off the sound
if (newWord>0) newWord–; // Counting down to spot gap between words
if (newWord==1) printSpace(); // Found the gap, print a space but only once next time it will be 0

if (!ditOrDah) { // We don’t know if it was a dit or a dah yet, so …
shiftBits(); // let’s go find out! And do our Magic with the bits
}

if (!characterDone) {
WaitWait–; // We are counting down
if (WaitWait==0) { // Bingo, keyUp just timed out! A full letter has been sent
WaitWait=FullWait; // Reset our keyUp counter
printCharacter(); // Go figure out what character it was and print it

characterDone=true; // We got him, we’re done here
myNum=0; // This sets us up for getting the next start bit
}
downTime=0; // Reset our keyDown counter
}
}

void printSpace() {
letterCount++; // we’re counting the number of characters on the line
if (letterCount>nearLineEnd) { // when we get past our threshold we do this:
Serial.println(); // jump down to a new line
letterCount=0; // reset our character counter
return; // Go back to loop(), we’re done here.
}
Serial.print(’ '); // print a space on the monitor window
}

void printCharacter() {
FullWait=averageDah100; // the keyUp counter gets reset based on sender’s speed
newWord=FullWait
5; // word gap counter is also adjusted by sender’s speed
letterCount++; // we’re counting the number of characters on the line
if (myNum>63) {
printPunctuation(); // The value we parsed is bigger than our character array
// It is probably a punctuation mark so go figure it out.

return; // Go back to the main loop(), we’re done here.
}

Serial.print(mySet[myNum]); // Print the letter that is in this spot in our character set
}

void printPunctuation() {
byte pMark=’#’; // Just in case nothing matches
if (myNum==71) pMark=’:’;
if (myNum==76) pMark=’,’;
if (myNum==84) pMark=’!’;
if (myNum==94) pMark=’-’;
if (myNum==101) pMark=’@’;
if (myNum==106) pMark=’.’;
if (myNum==115) pMark=’?’;
Serial.print(pMark); // print the punctuation mark
}

void shiftBits() {
ditOrDah=true; // we will know which one in two lines
if (downTime<dit/3) return; // ignore my keybounce
if (downTime<dit) {
// We got a dit
myNum = myNum << 1; // shift bits left
myNum++; // add one because it is a dit
}
else {
// We got a dah
myNum = myNum << 1; // shift bits left

// The next three lines handle the automatic speed adjustment:
averageDah=(downTime+averageDah)/2; // running average of dahs
dit=averageDah/3; // normal dit would be this
dit=dit*2; // double it to get the threshold between dits and dahs
}
}

Why did you not read #7 below? Suggested you modify your posted code to use code boxes. That being said, pin 13 has an LED attached, which may make the electronics/code not work as you expect. Perhaps you should try another pin.

http://forum.arduino.cc/index.php/topic,148850.0.html

On an Uno: pin 13 is connected to the input of an op amp, which is then connected to an LED (L).
That is not going to impact any digital connections.
2uA load vs 1uA maybe?

techbydesign:
10k pulldown resistor between GND and 1 lead of telegraph key.

the key is connected to pin 13 and ground.

Please look up button schematics here:

Pulldown resistor is connected between GND and data pin.
Your button ("morse key") is connected between data pin and 5V.

Please double check that, or otherwise it cannot work.

Thanks to all for your help!

Thank you jurs for the schematic that makes it much clearer.

I will double check everything from the beginning.

I may have gotten in over my head with this project.

Maybe I should stick with the 'blink' project . LOL nice and simple

I must say this is really a great community, people taking the time to help.

Ciao,
TBD