November 22, 2024, 07:39:44 AM

News:

Got VSA?  Want to use your Prop-SX?  Now you can!  See the VSA section of the Library forum for Prop-SX code that works with VSA.


Servo Data Reader Problem

Started by davisgraveyard, September 06, 2008, 09:52:46 AM

Previous topic - Next topic

davisgraveyard

I am using a variation of one of the servo data reader programs.    I am seeing this strange problem where after a specific number of reads the program resets itself and starts over for no apparent reason?  It always does it at a specific number of record reads.   I have checked the data but that isn't the problem.   The number of reads it stops on varies if you change the pause in the Servo_Refresh.  The shorter the PAUSE value the more data records it will read before it resets?  I have 425 DATA statements and when the PAUSE is set to 15 it reads 139 records before the program resets and if set the PAUSE to 5 then it reads 261 records before the reset?

If you look at the EEPROM Map there are 4 rows of unused space betweek the program data and the def data.

I am not sure what causes the program reset and what I can do about it?

Jeff



Read_Record:
pntr = record * REC_LEN
READ (Show + pntr), pos1, pos2, pos3, repeats

Refresh_Servos:
PULSOUT Servo1, pos1 * 5
PULSOUT Servo2, pos2 * 5
PULSOUT Servo3, pos3 * 5
PAUSE 15
RETURN


Show DATA 164,161,162,12
DATA 172,161,162,20
etc.....



livinlowe

I know on another thread we talked about the capability of your power supply, but just so we are sure, how big is your 12V wall wort? Stopping for no reason (Prop-2 resetting) can be power problems.
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

I agree with Sean, it sounds like power problem to me.  As you've noted, there's nothing wrong with your code. If it was code problem it would fail in the same place every time.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

I am using a 12VDC 1.5a Power supply.  Only running 3 servos and 2 LED's?   Shouldn't that be enough?   Why would the power supply be a problem after so many data reads? 

Jeff

livinlowe

The power supply wouldn't be a problem with the Prop running, but if your servos all move at once rapidly, drawing their max current, you power supply would "brown" out. But 1.5A should be beefy enough I would think. Maybe put a ampmeter inline and see how much your drawing?
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

Servos can be really tricky under load.  Andy Lindsey (who works at Parallax) showed that servos, especially near their middle positions and under heavy load can draw more than 0.5 amps each.  If it was a software problem it would be repeatable.  You can prove it by disconnecting the servos and letting the program (with you DEBUG statements active) -- I'm betting it goes through the entire table without a problem.

If this proves to be the case I suggest that you power all of your servos from an external supply so that you don't end up resetting the Prop-2.
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

You are correct.  THe program ends fine if the servos are unplugged.

So can you point me in the direction on info about using an external PS for the servos and the Prop-2?

Jeff


davisgraveyard

I found some posts on using an external power supply for your Seroves with the prop controller. 

Before I go hacking up my servo extension cables  I have a question.  I am using a 12v 1.5a power supply right now to run the Prop-2, 2 LED's, and 3 Servos.   If power is my problem will going to say a 3a power supply help?   Or is the load on the servos causing some threshold on the Prop-2 controller to reset so no matter how many amps I had it would still fail?  I'd rather beef up the power supply than add a separate one and hack up my cables.  But if that is the only way this is going to work then I will go that way.

Jeff

JonnyMac

No.  The problem is the load the servos are placing on the Prop-2 power supply which is limited to a little less than one amp.  By using an external supply you'll unburden the Prop-2's 5v regulator and get rid of the reset problems (there's a small chip on the board that protects the Prop-2 memory from a power sag -- what you don't want happening is the EEPROM and your program to get corrupted by bad power).
Jon McPhalen
EFX-TEK Hollywood Office

livinlowe

Ohhh, so now I get it! All his current is coming from the onboard regulator, so you could hook up a 7 amp power supply and it wouldn't matter because the onbaord regulator is only going to supply approx. 1 amp.

So the solution would be to have 12V 1 amp for the Prop-2, and a 12V 1.5 or 2 amp for the servos?
Shawn
Scaring someone with a prop you built -- priceless!

JonnyMac

Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

September 09, 2008, 02:43:59 PM #11 Last Edit: September 09, 2008, 05:19:11 PM by davisgraveyard
So I bit the bullet and cut my servo extension cables up and created an external power supply.  Which does solve the BS2  reset issues.  Now I have another problem.  The servo's are underpowered again.  I have a 6VDC 200ma power supply attached to the Cowlicious board for the jaw.  Which works great for the 1 jaw servo.  But running the other 3 head movement servos off that supply slows everything WAY down.  So I attached a 7.2VDC 1a power supply to the Cowlicious board and it was better but still not perfect.  ALso I notice that using the same supply for the jaw movement board affects its performance.  So it looks like I am going to need 3 power supplies.  1 12VDC 200ma for the Prop-2, 1 - 6VDC 200ma for the Jaw board, and 1 6VDC 2 to 5a for the 3 head movement servos?

Does anyone have any good links for 6VDC power supplies of various amps?  Preferably some 2-7amp ones?

Jeff


JonnyMac

This inexpensive supply for All Electronics claims to output 5v (good for servos) at 8 amps! -- that's a lot of servos.

http://www.allelectronics.com/make-a-store/item/PS-637/5V/8A-3.3V/4A-2.5V/2A-POWER-SUPPLY/-/1.html
Jon McPhalen
EFX-TEK Hollywood Office

davisgraveyard

I bought their 5VDC 3.7a switching power supply
http://www.allelectronics.com/make-a-store/item/PS-537/5VDC-3.7A-SWITCHING-POWER-SUPPLY/-/1.html

I didn't want to have to make an enclusure and this prop is outside.

I figure 3.7a should be more than enough for 3 servos!