Shop OBEX P1 Docs P2 Docs Learn Events
Odd Demo Board Resets — Parallax Forums

Odd Demo Board Resets

crgwbrcrgwbr Posts: 614
edited 2007-02-16 12:30 in Propeller 1
I am using the demo board·to control·a servo.· The demo board is being powered by 4 AA batteries (producing around 5.5v).· For some reason servo starts to move, then the demo board resets and starts the process over again.· Any Idea why this could be happening; the 470 ohm resistor is in place and I am supplying the servo with power directly off the demo board.

This is the code I'm using:

Con
· _clkmode = xtal1 + pll16x
· _xinfreq = 5_000_000


ObJ
· BS2 : "BS2_Functions"

Pub Main
· BS2.Start(31,30)
· BS2.Freqout(6, 3000, 2000)

· repeat
··· BS2.Pulsout(7, 750)
··· BS2.Pause(20)


I'm thinkign that it's probable an interference problem from the motor in the servo.· Forgot to mention, it's a Parallax Standard Servo.

Thanks,
crgwbr

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life

Comments

  • asterickasterick Posts: 158
    edited 2007-02-13 22:47
    You might be throwing the brownout sensor.
  • rokickirokicki Posts: 1,000
    edited 2007-02-13 23:01
    Right. To debug this, if you have an oscilloscope, just scope the power supply. If you don't have a scope, then
    try powering the servo separately; see if that fixes it.

    Note that powering the demo board with only 5.5v is probably marginal; I'd start with slightly higher than this.
    You're not giving that first voltage regulator much headroom.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-13 23:02
    That's exactly whats occuring, the extra current draw from the servos are dropping the voltage seen by the 5 V regulator to below it's minimum voltage (5V + dropout voltage), since the 3.3V regulator gets its input from the output of the 5V and the Propeller gets it's voltage from the output of the 3.3V there is a cascade effect that is causing the Propeller to brown out and reset.

    If you are using alkalines, it's time to replace them. If you are using rechargables, youll need to use more in series. An alternative is to use a large capacitor on the input and hope it will float your voltage across the glitch.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 2/13/2007 11:07:16 PM GMT
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-14 12:42
    Thanks Guys, that did the trick.

    crgwbr

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • RegorRegor Posts: 19
    edited 2007-02-15 06:32
    I was hitting this problem too and it was the· BS2.Start(31,30) being called when the USB cable wasn't attached to the demo board. I changed to to be some other unused pins BS2.Start(1,2) and the reset stopped happening.

    My guess is when the cable isn't attached either the dira[noparse][[/noparse]debug_Pin]~~ or outa[noparse][[/noparse]debug_Pin]~~ call in the Start method causes the·DTR pin state on the FT232 chip to change resulting in the Reset. I don't have an oscope to verify.
  • simonlsimonl Posts: 866
    edited 2007-02-15 14:33
    Hey, I've been having same problem. What size capacitor do you recommend Paul?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-15 18:13
    Simon, so you are having problems powering servos with the board, what are you using to power the board?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-15 21:38
    Strange thing this problem is.· When I posted and said everything had been fixed, I didn't have my demo board with me, just my PE kit.· I tested your suggestions of the PE breadboard, and as I said it all worked fine.· Just today I got around to putting the servos back on the demo board (this time powered by a 7.5v 1A wall wort).· I load the exact same program used by the PE kit; the servos do nothing but jiggle a little bit while the demo board constantly resets.· It has me stumped; the circuit on the breadboard should be an exact replication of the demo board minus all the video, mouse and keyboard stuff.· I attached the code I was using, I decided to get rid of the BS2 functions.· Anyway, I wrote my own versian of Pulsout.

    Stumped as can be,
    crgwbr

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-02-15 21:45
    Sorry guys, for some reason I was stuck on the idea you guys are using ProtoBoards which I specifically designed and tested the servo circuit. The demo board was never designed specifically to run servos (doesn't mean you can't, you just have to take extra steps). You either need to provide a seperate supply for the servos, or run a 1000uF cap between 5V and Gnd.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • crgwbrcrgwbr Posts: 614
    edited 2007-02-16 12:30
    Thanks Paul

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    NerdMaster
    For
    Life
Sign In or Register to comment.