Hey guys, i think i fried my nano. Heres what happened:
I tried to control a servo with a push button
I was given code, and was told that i didnt need a resistor as the in-built one was enough (if that makes sense)
I tried the circuit on TinkerCad Circuits using a Uno and it worked great.
I then tried it IRL and it was working for about 10 seconds and then nothing worked. The arduino light wont turn on and i dont know what to do.
Heres the code:
#include <Servo.h>
const byte ServoPin = 3;
const byte ButtonPin = 4;
Servo servo;
// * When I start the process,
void setup()
{
// the servo starts at 0 degrees
servo.write(25);
servo.attach(ServoPin);
pinMode(ButtonPin, INPUT_PULLUP);
// NOTE: The internal pull-up resistor will keep the
// pin reading HIGH when not connected. The pin
// will read LOW when connected to Ground through
// a closed switch.
}
void loop()
{
// * When I press down the button (hold)
if (digitalRead(ButtonPin) == LOW)
{
// the servo moves from 0 to 180 degrees, not more
servo.write(125);
delay(5);
}
else if (digitalRead(ButtonPin) == HIGH)// * When I let go of the button,
{
// the servo moves from 180 degrees back to 0 degrees
servo.write(25);
delay(5);
}
}
Trying to drive a motor from a Nano probably isn't a great idea; we can get away with it with LEDs - but driving servo motors is definitely next-level.
Not sure what that servo draws - especially on startup; you might be able to mitigate things slightly by using a decoupling capacitor (or two) - but I'd recommend feeding it with an external supply (you can get some cheap ones that have pins that fit directly onto the breadboard that are powered by an external power brick).
I cannot figue how to copy a link from my mobile phone in this new forum.
Here is the text.
I have blown a couple diodes on NANO's. Since the smoke can come out sideways, and the USB chip is in the vicinity of the power supply on the board, some testing would be in order to see what is working and what is not. If there was no USB plugged in, the USB chip would have less places to short out.
Regardless of what actually happened, sadly, Sparkfun discontinued sales of the Magic Smoke Refil Kit
I did some research to see if I could replicate it. The crystalline structure of the silicon that makes up the chips seem to crystallize in a tetrahedron form. The Angular lattice of the silicone vaporizes, but the structure remains partially intact. By a rather complicated osmosis process, it might be able to be replenished. The best I could figure is that it would be a process of
I'm reminded of a classic debate over the use of automation in commercial aviation; one group says "all this automation is causing pilots to loose their hand flying skills" ... and they're right - they're absolutely right. Another group says "all this automation frees us up from stuff that we're not good at leaving us far more time to get better overall situational awareness" ... and they're absolutely right as well.
40+ years ago I'd have replaced that diode too - but 40+ years later in 2021 now that I'm in my 60's, I'd struggle to see to replace the diode (if I had to - but I'm not the OP of course) - and I'd probably have to wait about 6 to 8 weeks for it to arrive because it's not the kind of thing I'd be able to buy locally. And at my current professional charge out rate I'd only have to work for less than 6 minutes to cover the cost of a Nano ... whereas I could practially guarantee 10 times that time lost (or more) organising and trying to fit a diode for a device that may or may not work when I'm done.