RC Decay
Earl Foster
Posts: 185
I have been troubleshooting an RC Decay problem I experiencing without success. I designed a servo controller board that will allow me to adjust 3 servos normal and active positions using a standard RC Decay circuit and code. It works perfect on my breadboard each and every time. However, on my PCB I get spikes and the servos shake constantly while trying to calibrate them so I don't know if they are positioned correctly. The servos work smoothly during operation so I have ruled out power supply issues.
Since it works on the breadboard I have to assume it has something to do with my pcb layout. I have reviewed my schematic and pcb layout many times and everything seems to be in order. I also tried connecting the RC Decay circuit on the breadboard to an unused pin on the pcb with the same jerky results.
I am looking for ideas of what could be the problem and possible next steps in troubleshooting.
Thanks
-earl
Per standard help protocol I have uploaded everything (Code, schematic, pcb layout, printout of normal and jerky decay). I use ExpressPCB/SCH if anybody wants to look over them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
Since it works on the breadboard I have to assume it has something to do with my pcb layout. I have reviewed my schematic and pcb layout many times and everything seems to be in order. I also tried connecting the RC Decay circuit on the breadboard to an unused pin on the pcb with the same jerky results.
I am looking for ideas of what could be the problem and possible next steps in troubleshooting.
Thanks
-earl
Per standard help protocol I have uploaded everything (Code, schematic, pcb layout, printout of normal and jerky decay). I use ExpressPCB/SCH if anybody wants to look over them.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
Comments
if you have an oscilloscope it would be useful to add screenshots of the scope how the spikes look like
best regards
Stefan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
Your RC value is _absolutely_ dependent on a clean, stable earth. I'm not sure that is what you are giving it. What is your track size?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman
Umm.. what is 0.20 ?
You won't measure a problem with your multi-meter. You won't see a problem until you have a nice current flowing, when you will start to see some voltage drop in the lines.
Grab some nice fat wire and tack *individual* earths in a star from your regulator to the Prop (both earth pins), the gnd of the RC circuit and the GND's of your servos. Leave all the existing tracks connected. I'll wager it won't solve the problem, but I'll sure bet that the amplitude of the variation is reduced significantly. It might also help to put some good, low impedance caps directly across the power pins of the servos.
If that helps at all, then it points to the layout as being the problem.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
.2 of a mm ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
If you always do what you always did, you always get what you always got.
From the scale of the image, it's inches.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
Chat in real time with other Propellerheads on IRC #propeller @ freenode.net
Safety Tip: Life is as good as YOU think it is!
That's actually tying it to pin #12, and pin #8 of the eeprom? (3.3V?)
Also I presume the batteries are >7V when almost flat, ie at least 7 cells? Or is it powered by a wall wart?
With shaking servos I'd be very suspicious of a non stable power supply.
For years I persisted with trying to debug mysterious faults like this. Then I went and bought a $110 CRO. It makes things so much easier. You can see the RC waveform on a screen. You can put it on a power supply and quickly click through all the timebase settings to look for waveforms at different frequences (eg 60Hz and megahertz instabilities). And you can look at the waveform going into the servos and see if it is a clean square wave. Can you get access to a CRO?
Post Edit - I was looking at the circuit again and wondering why you even need a 5V regulator as everything is powered by 3V. Then I noticed the 5V is actually powering the servos. That is going to get very difficult. Even 22uF on the 5V supply isn't going to be nearly enough. You might need to run the 3V reg directly off the battery rather than via the 5V reg. And you might want to have the earth wires from the servos going to the 5V reg and then straight to the battery -ve. Ditto the earth from the board, so the earths are a 'star' that comes from the battery. Even then you might not get it stable enough. I've pulled to bits many radio controlled cars etc and many use seperate supplies, eg a 9V battery to do the electronics, and 4 nicads to do the servos. With the prop running at 3V you could do things a bit differently, eg use 4 small nicads and a low(ish) dropout 3V reg. And power the servos directly off 4 AA nicads without even needing to regulate that supply.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.smarthome.viviti.com/build
Post Edited (Dr_Acula) : 11/5/2009 12:14:46 AM GMT
As to solving your currently problem, other than some PCB design problems, and the lack of power planes, I think you might just need more capacitors as others have stated. When in doubt decouple the ICs, and for power (on either side of the regulators) err on the side of larger capacitors (electrolytic: generally larger capacity means less ESR), and smaller ceramic caps as high frequency low pass filters.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't make strings the bane of the Propeller, bend them to your will!
I attached a before and after comparision of the rc decay.
Thanks for the suggestions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman