Jump to content
 

Arduino cutting out


MartynJPearson
 Share

Recommended Posts

My Arduino has me baffled and I wonder if anyone might be able to shed any light on it please...!

 

I have an Arduino Nano (clone) with a sketch that controls a servo; on startup it sets the servo to a known position before waiting for further commands sent via an IR receiver. It also has a 16x2 LCD display connected via the I2C connections. Powering it through the USB port, connected to the laptop it behaves perfectly. On startup it shows the display correctly, moves the servo and waits. However, when I power it via the VIN pin it starts to move the servo, cuts out, restarts (evidenced by the display "rebooting") and repeats. If I disconnect the servo, I get no issues whatsoever which lead me to think it was a power issue.

 

The power supply was a 12v DC output from a MERG PMP 12v power supply (itself taking 16vac); in order to isolate that I tried a different MERG supply and saw the same issues. I also tried a commercial 12V 1A power adapter and again saw the same issue. Given that the MERG supply should comfortably supply 1A (and there was no overheating that might suggest the VR was overloaded) and USB would only be about half that, I was surprised that there would be an issue with the power. I've tried with an alternate (identical) Nano with the same results.

 

 

Any hints at what to try to resolve this would be most appreciated!  

Edited by MartynJPearson
Added more detail
Link to post
Share on other sites

Adding a 5v voltage regulator to my rectifier output, using that as the source for the servos (ensuring the 0v lines are tied) and that seems to have helped. I'm powering both the 12v VR which powers the Arduino and the 5v VR powering the servo, display and IR receiver from the same rectifier which I think might also be overloading it as the IR receiver seems to keep resetting.

 

So might have a slight rethink and separate the power completely.

 

But, looks like I'm making steps in the right direction and certainly learning! Thanks for your help!

Link to post
Share on other sites

Vin can work with 12v but the internal regulator will get a bit hot - I've had it move a servo but not also trying to run a display.

 

taking your 12v and having your own 5v regulated supply is not a bad idea into the arduino, it may also be worth adding a capacitor near the servo supply lines across power and ground to help decouple it when the servo is moving, something like a 10uF to 100uF could help - a lot of servo driver boards do this to smooth the power required out.

 

something like a 7805 regulator should be able to do this though, I've done similar (Arduino, LCD, Servo and in my case a touch panel) via the USB input and if that can manage it a 1A 12 supply should be fine

Link to post
Share on other sites

  • RMweb Premium
1 hour ago, aleopardstail said:

 

something like a 7805 regulator should be able to do this though, I've done similar (Arduino, LCD, Servo and in my case a touch panel) via the USB input and if that can manage it a 1A 12 supply should be fine

My recommendation would be a buck convertor. They are fairly cheap and with a 95% or better efficiency don't get warm under normal conditions.

I have DC supply derived from 16v AC powering a stepper motor running at 5v supply via a buck convertor.

 

https://www.ebay.co.uk/sch/i.html?_nkw=buck convertor&ssPageName=GSTL

 

I used these:

https://www.ebay.co.uk/itm/5PCS-Mini-Buck-Converter-DC-DC-12-24V-To-5V-3A-Step-Down-Adjustable-Power-Module/201986971015?hash=item2f075c9587:g:ykQAAOSwOMlaxKlw

 

( I bought mine via AliExpress)

Edited by melmerby
Link to post
Share on other sites

I've used that sort of converter before, I would suggest a slight word of caution, take the suggested performance with a pinch of salt, I had some 15v to 5v ones that functioned wonderfully as light and heat generators, briefly, fine at 12v though

 

and some of the ones you link to, they do work and seem to work well, but can be a royal sod to set up as the trim potentiometer needs tiny adjustments (fine once working though) - they also tend not to cope with current spikes very well, leading to a loss of magic smoke - should be fine with a suitable cutout though

 

I only suggested the 7805 as they make nice heaters and will shut down instead of blowing up if overloaded

Link to post
Share on other sites

Thanks for all the advice. I've now got a separate MERG 12v supply made into a 5v supply with a 7805 providing power for the servos and it is working perfectly.

 

I did hit a small hitch when I added more servos despite having logic to only make one servo move at a time. The issue was a servo that I was hinging a magnet with to uncouple Kadees; it looks like the servo lacks the oomph to move the magnet so was constantly seeking to the right position but not being able to make it. Disconnected that and everything works fine, so will have to go back to the drawing board on activating the Kadee magnet. Maybe poking it into position with a stick.... :)

 

Thanks again for the help! 

Link to post
Share on other sites

  • RMweb Premium
33 minutes ago, aleopardstail said:

I've used that sort of converter before, I would suggest a slight word of caution, take the suggested performance with a pinch of salt, I had some 15v to 5v ones that functioned wonderfully as light and heat generators, briefly, fine at 12v though

 

and some of the ones you link to, they do work and seem to work well, but can be a royal sod to set up as the trim potentiometer needs tiny adjustments (fine once working though) - they also tend not to cope with current spikes very well, leading to a loss of magic smoke - should be fine with a suitable cutout though

 

I only suggested the 7805 as they make nice heaters and will shut down instead of blowing up if overloaded

78XX do fail sometimes and going s/cct will immediately cook what's on the output.

 

The bucks I linked to that I bought from AliExpress work fine dropping my rectified 16v AC supply (20v + dc?) to 5v for a stepper motor and they have fixed taps so accuracy is pretty good.

As yet I haven't had a failure and AIUI complete destruction will leave them O/C.

Edited by melmerby
Link to post
Share on other sites

for the size of the things they are amazing for getting the low current sources for driving micro controllers, and a servo is hardly "high current" unless you load it and move a lot in one go so they should be fine - to get near rated current output really just needs some extra cooling (especially in a hot loft) but can be managed normally by the method of not putting them in a small box and letting a draft go past them - can be fiddly to set up but its a one time job.

 

have a bag of the things here for 3.3v 5v and variable outputs

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...