0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« on: November 16, 2012, 04:45:06 pm » |
Hi,
I've posted here (and several other places) before about serial issues with a project I'm working on. Steadily, with the help of the arduino and coding community, I've eliminated problems with my project's serial connection.
First, I got rid of a generic 9ft USB extension cable and physically mounted the computer closer to the arduino. This greatly improved the reliability of the serial connection. Then I stopped using an off brand Arduino system (Diavolino) that used an external FTDI converter. I got an Arduino UNO.
The UNO worked well, and didn't have any serial crashing issues at all.. Until yesterday. Yesterday I noticed that the system would turn the servo to lock the door (locker() function). But when it called the unlocker() function, the servo would feebly twitch and then remain still. The arduino is powered off USB, and the servo is powered from an independent 5V source. Both circuits were grounded to the arduino. I could only get the servo to receive the correct signal from unlocker() by wiring the 5V servo power to the arduino as well. I'm sure that the servo is fine, it is a full-metal high-torque servo, and I can test it on a separate controller without any issues.
I find the whole situation extremely frustrating. I've replaced the cable, the arduino, changed methods of connecting to its serial port four times, and the problem doesn't seem to be fixed. I need a system that can work for weeks without intervention, and I just don't see how the Arduino platform provides that.
I've tried two serial libraries in C++, but am now just using PuTTY to connect to the arduino and send data from a card-reader.
I'd appreciate any ideas, or suggestions to debug the system.
Thanks, -BBX
|
|
|
|
« Last Edit: November 17, 2012, 04:13:36 pm by BBX »
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3629
@ssh0le
|
 |
« Reply #1 on: November 17, 2012, 01:47:54 am » |
how much current does your servo eat, and how much current can you supply
if your putting supplies in parallel to get things to work, I bet its not enough
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
0
Offline
Tesla Member
Karma: 51
Posts: 6592
Arduino rocks
|
 |
« Reply #2 on: November 17, 2012, 02:06:11 am » |
You have a high torque servo and a sketchy 5v power supply for it. Possible suspects. If it worked and then stopped, maybe you knocked some wiring lose. The arduinos seem to work reliably for hundreds of other people, so I'd imigine your issues are particular to your setup.
|
|
|
|
|
Logged
|
|
|
|
|
the land of sun+snow
Offline
Edison Member
Karma: 81
Posts: 2144
|
 |
« Reply #3 on: November 17, 2012, 03:25:27 am » |
Tomorrow something will work, and the clouds will part, and the sky will be blue .... for about an hour. Some people are just plain cursed, that's how life is, I'm not alone. Enough philosophy, so
What is the servo being used? What is the power supply for the servo? How long are the wires from the servo supply?
I would think things would work worse when using the same power source for both servo and Arduino, so ???
Running the Arduino off the power in the USB cable may be a problem with servo systems, I rarely do it.
For my part, I "always" use extra electrolytic [eg, 220 uF] and bypass [0.1 uF] caps on the servo power distribution point, to help filter servo motor noise.
|
|
|
|
|
Logged
|
Something different - Kitchen-Sink Arduino-compatible boards
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« Reply #4 on: November 17, 2012, 08:49:46 am » |
Hi, Thank you for the replies!
I'm not sure why I missed including the servo model the first time. It's a 1501MG 6V servo. I'm taking a 6V 500ma power supply and feeding it through a 7805 with two 22pF caps. The servo power supply is four feet from a gutted wall-wart to the 7805, and within another foot of wire from there to the servo..
oric_dan, I'm aware that I'll label my thread 'cursed' but it's just me not understanding something here xP You mention not using USB power. How would I accomplish that without losing the serial connection?
Thanks, -BBX
|
|
|
|
|
Logged
|
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 24
Posts: 2354
|
 |
« Reply #5 on: November 17, 2012, 08:57:15 am » |
I'm taking a 6V 500ma power supply and feeding it through a 7805 That doesn't sound good - your servo wants 6 volts and you're reducing it from 6 via a voltage regulator. I suspect you're not even getting 5V. Your wallwart can provide 500mA, the general rule of thumb I've seen here recommends an amp per servo. In short therefore, your issue is likely power related - see if you can scavenge up a more hefty supply.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« Reply #6 on: November 17, 2012, 09:14:19 am » |
Awesome, I found a 20V 3A laptop PSU lying around, I'll try wiring it in.
Thanks wildbill!
-BBX
|
|
|
|
|
Logged
|
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 24
Posts: 2354
|
 |
« Reply #7 on: November 17, 2012, 09:19:06 am » |
That might be a bit too hefty - if your 7805 survives, it'll need a lot of cooling. Perhaps see what you get if you wire the 6V supply to the servo without the voltage regulator at all. You'll still be underpowered, but somewhat better off.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« Reply #8 on: November 17, 2012, 09:44:33 am » |
I think you're right. I tested the (19V 3A) setup with a multimeter and got 5.01V, which is encouraging. The 7805 has a small heatsink attached to it, and I can feel that it got pretty warm.
I'm loathe to try the 6V without the 7805 because I don't think it's regulated, and I can't afford to lose the servo (while there are several 7805s lying around).
Thanks, -BBX
|
|
|
|
|
Logged
|
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 24
Posts: 2354
|
 |
« Reply #9 on: November 17, 2012, 10:12:03 am » |
Well in that case, it looks like a 7806 or three would be a useful addition to your parts box. Since you have spare '05s though, perhaps it's worth trying with the laptop power. I'd be more inclined to find another wallwart - if you're anything like me, you'll have a plethora of them from long defunct devices. Alternatively, do you have any 7812s or similar to do a cooler two stage stepdown?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« Reply #10 on: November 17, 2012, 10:25:39 am » |
Ah, I actually do have some 7812s somewhere... Unfortunately, I moved from my nice basement into what I can best describe as a 'people kennel' at my university. So I had to leave behind all of my wonderful odds and ends  Would I want to wire the two 7805s in parallel? I heard that's a bad idea from an earlier thread.. Thanks, -BBX
|
|
|
|
|
Logged
|
|
|
|
|
New Jersey
Offline
Edison Member
Karma: 24
Posts: 2354
|
 |
« Reply #11 on: November 17, 2012, 10:29:04 am » |
No, I simply meant that if you have spare parts, you could see if one of the 7805s can do the job with the 20V input. If it overheats & fails, at least you have a replacement available & for that one you will know that better cooling and/or lower input voltage is required.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Jr. Member
Karma: 0
Posts: 52
No time to learn
|
 |
« Reply #12 on: November 17, 2012, 10:35:17 am » |
Right, gotcha. Exactly, I'd much rather burn out a spare 7805 than an Arduino or servo!
I found a 7812. I like the idea of stepping down 20V to 12V, and then taking the 12V down to 5V in two steps. Are there any foreseeable problems with doing that?
Edit I stand corrected. My circuit uses two 10uF capacitors on the 7805. /Edit
Thanks, -BBX
|
|
|
|
« Last Edit: November 17, 2012, 11:08:17 am by BBX »
|
Logged
|
|
|
|
|
SE USA
Offline
Faraday Member
Karma: 33
Posts: 3629
@ssh0le
|
 |
« Reply #13 on: November 17, 2012, 12:12:05 pm » |
Are there any foreseeable problems with doing that?
nope
|
|
|
|
|
Logged
|
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL
|
|
|
|
0
Offline
Tesla Member
Karma: 51
Posts: 6592
Arduino rocks
|
 |
« Reply #14 on: November 17, 2012, 12:37:11 pm » |
You can add a small diode to the 7805 ground like below to up the 7805 output voltage to ~5.7v for better servo performance. 
|
|
|
|
|
Logged
|
|
|
|
|
|