Main Menu

Fried Moteino?

Started by Mr. Bubbles, July 09, 2014, 06:09:39 PM

Mr. Bubbles

Quick question about a moteino that I was trying to set up to drive a servo with PWM. I had the servo connected to +5V and GND from a separate power supply and the PWM out from digital pin 5 on the moteino.

I uploaded the following code:
#include <Servo.h>
#include <RFM69.h>
#include <SPI.h>
#include <SPIFlash.h>

#define NODEID        1    //unique for each node on same network
#define NETWORKID     100  //the same on all nodes that talk to each other
#define FREQUENCY     RF69_915MHZ
#define ENCRYPTKEY    "sampleEncryptKey" //exactly the same 16 characters/bytes on all nodes!
#define IS_RFM69HW    //uncomment only for RFM69HW! Leave out if you have RFM69W!
#define ACK_TIME      30 // max # of ms to wait for an ack
#define LED           9  // Moteinos have LEDs on D9
#define SERIAL_BAUD   115200

RFM69 radio;
  Servo servo1;
  
  
void setup()
{

  Serial.begin(SERIAL_BAUD);
  delay(10);
  servo1.attach(5);
 
}

void loop()
{
      Serial.println("Starting");
      
      servo1.write(100);
      delay(5000);
//      servo1.detach();
      servo1.write(90);
      Serial.println("Done");
      delay(3000);
}


The servo did not function, then I noticed the error: avrdude: stk500_getsync(): not in sync: resp=0x00. After a quick google search--it seems that this is not a good thing to see if the FTDI adapter is hooked up properly. Also, no LEDs on the moteino are coming on any more. I'm not sure what I could have done to fry the board--but maybe I could get some suggestions here?

Thanks

Felix

Moteinos are 3.3V and the max load on 1 pin is something like 20mA.
I assume the PWM input to the servo was only to drive it?

Mr. Bubbles

Yes, the power to the servo was not connected to the moteino at all.

Felix

Did they have a common GND?

Mr. Bubbles

No, the servo GND and +5v was connected to a separate wallwart plug, while the moteino was powered via FTDI USB.

Felix

Different GNDs means a potential ground loop, in which case it may very well be fried.
To check this theory you might want to check the difference in voltage between the 2 GNDs with a multimeter.

Mr. Bubbles

Ah, that's a bummer. I measured a maximum of about 50mV potential between the two grounds--I guess that is enough to do it?

If this is what happened, any idea what component of the board would be most likely to be fried? i.e. is it worth trying to fix?

Felix

50mV should not be an issue. Can you power the atmega from 2xAA batteries through the "3.3" pin and see if it starts reponding? If so then the regulator is fried. If not then the atmega is probably gone.

Mr. Bubbles

#8
No luck with the 3.3v and GND pins. I guess it's a lost cause:(

Off to the LPL store I go.