|
|_Simple but functional . . .
|
|_I get involved and then forget that I missed lunch . . . oops . . .
|
|_Sorry the quality is lousy . . . no Oscar for me, eh? . . . (ha) . . .
|
|
|_This is all I can do today - but, it's a beginning
|
|_I'll steal some more time from my schedule later this week so I can continue
|
|_I'd like to have Phoamy trotting around by the end of the week
|
|_He's already house trained . . . . . .
|
Does anyone know if my Boe-Bot is capable of handling 8 servos?
I have figured out how to get them all working but is running all 8 of them going to overload my beloved BB? I'm using 4 HS-55's, & 4 HS-81's. I will get a Propeller Servo Controller USB if it's necessary for this project but I wanted to see how I could make this thing operational while utilizing the least amount of capital resources. The final quadrapod should be using 8 HS-55's or near quality clones, if there is such a thing.
Don't forget a servo for the tail. That's going to be some serious
tail wagging action with that big tail!!! I wouldn't want to be
in the way! [noparse]:)[/noparse]
And, if getting a Propeller Servo Controller USB is required, I think it would be better for me to just go ahead and spend $60 more and get the Propeller Robot Control Board.
It seems to me that weight is going to be your biggest enemy. I’ve listed some things to think about from my experience of working with the two boards you mentioned.
Propeller Robot Controller Board
1. Needs 6.5v min to run board and if you have 8 servos you will need a least a 7.2v (RC type) battery
2. Will need to program in new language like Spin, PASM,(free from Parallax) PropBASIC, Catalina C (both free on Propeller forum) I really like PropBASIC.
3. Has 64k memory and 8 cogs (processors) to work with.
4. Mounting holes and size of Propeller board same as Board of Education (BOE)
Prop Servo Controller Board
1. Requires external power source
2. Doesn't require the learning of another language
3. Does off load a lot of servo overhead and allows BS2 to do other things, but for a walker won’t you have to constantly be sending new servo commands? One cog of the Propeller chip could do this. Have you considered using the Spin Stamp on your BOE? (would require purchase of Prop Clip, which means more money)
4. Does require communication using SEROUT command which can use up BS2 memory pretty quick if many are used. This can be overcome by the use of DATA blocks. In other words store walking movements in DATA tables and pass through a minimum number of SEROUT commands.
5. Small in size
As for over loading the BOE running eight servos?· I would think you'd be OK since you shouldn't be running them all at the same time will you?· But wait, they will all need to hold their postions.· Even though the servos are small they may just surpass the 1amp limit of the BOE.
Hope this helps because I like your robot idea and your ingenious use of foam. I look forward to watching your progress.
I have a robot that has seven servos on it and I have one servo that seems to always pick up some stray signal and jerks back and forth every once in a while. If I touch or move the servo wire it stops. I think I need to reroute it.
Testing new ideas and working through the problems all the while trying to learn to be a better programmer is what I call the JOY OF ROBOTICS. And that's why I do it!
I don't think the Boe-Bot is the optimum platform for my future projects so I just ordered the Propeller Robot Controller Board (PRCB) and the new Propeller book, which is currently on sale at the Parallax store.
For weight, it looks as though the PRCB will allow me to use very small 2 or 3 cell lipo's - I have some that may just do the trick. No, Phoamy won't run around for hours but . . . he's just a prototype anyway. I plan on making a much more robust version, larger than the puppy. I also need to obtain more servos - I counted 26 for the next version - don't wanna give away any surprises, but the future Phoamy may be programed to react to fire hydrants.
Now, I need to brush up on how to program the Propeller, so, I guess this project is officially "on hold" until I play with and become barely proficient with the new hardware & so forth. I will enjoy building a larger dog and fortunately, I'm off for four days next weekend. Woo hoo!
__I finished installing all the servos
__Part #28230 arrived today (Propeller Robot Controller Board). I was surprised this controller didn't come with a book so I also ordered and received the new Propeller book
__Now I have to decide to work on replacing the tranny in my Baja (avatar), or work on stuff for my day job, or study for a certification exam, or finish Phoamy. Tough choices.
|__
|__Ok - I'm back on track . . . w/the Propeller Robot Control Board . . . (finally) . . .
|__
|__The preliminary tests controlling the position of the servos is slow but going well. This is quite different from programming the Stamp 2 - more challenging than I'd anticipated.
|__
|__I should have everything connected and final testing of Step 2 in an hour or so . . . video will follow . . .
|__
|__I plan on having the dog trot, sit up on back legs, whine for a biscuit, roll over & play dead . . . blah, blah, blah . . .
|__
|__Ultimately, I'll create a team of GPS guided, sled robotic dogs and make my way to work one day (I'll have the lawn mower in neutral)
|__
|__AI may include recognition of fire hydrants & trees . . . we'll see . . .
|__
|
|__Progress is slow but I'm getting there
|
|__I'm having a heckuvva time trying to get rid of servo chatter - after the program finishes
|
|__Also, I'm trying to figure out the difference between hitting F10 & F11, the latter does something w/EEPROM, or something like that
|
|__Time to whip out the book
|
|__Now the difficult part begins . . . yipes . . . . . .
|
Scope said...
|
|__Progress is slow but I'm getting there
|
|__I'm having a heckuvva time trying to get rid of servo chatter - after the program finishes
I'm guessing that the problem is you really don't want the program to "finish". It probably needs to stay in a loop, ultimately waiting for commands, but for now, just to keep the signals going to the servos. If your program really "ends", then there is nothing left sending signals to the servos, kind of like when you turn off the transmitter on your buggy with the receiver still on...
If the "chatter" you're talking about is just a "buzz" or "whine", this may be normal.
Scope said...
|__Also, I'm trying to figure out the difference between hitting F10 & F11, the latter does something w/EEPROM, or something like that
|
F10 compiles the code, and sends it to the RAM on the Prop, but not the EEPROM. This means that if you kill the power to the prop, it will "forget" the program you sent. This is normally what you'd use for "testing".
F11 compiles the code and sends to the EEPROM, where it is "saved". This way, when you kill the power to the prop, and fire it back up, it will load the code and start running. This is normally used when you're "done" (or relatively done), or need to see what a "reset" does to things.
|
|__Phoamy is more of a concept - one of my first "bots from scratch" - he is nearing termination phase
|
|__My youngest son (who's 21) suggested a (fake) fur or cloth covering - I thought that was a great idea
|
|__Thanks for asking - I'll update when something new happens - sorry progress is very slow [noparse]:([/noparse]
|
|__Phoamy II will be much more robust, capable of fetching the paper and handing it to me folded neatly with the the daily Sudoku puzzle on front, putting slippers on my feet, and then lighting my pipe
|
After the program terminates, some of the servos "jerk" as if they were going from 1500 to 1750 without pausing. I believe this could be due to a low power input &/or lousy programming. And, I really don't like the idea of smoking a pipe but I'll do anything to help advance technology.
Here's an example of what I'm talking about - somewhat frustrating. I still can't figure out yet what's going on. For example, when I rewrite the code and send it to the Propeller, sometimes I still see the same, older program running.
And, I'd like to know how to "wipe clean" both areas of RAM - is this simple to accomplish?
Here is Phoamy - lying on his back.
Three sequences of movement occur in this video - only during the final sequence does one see the actual code I wrote for the servos.
Between sequence of movements, one can see the "servo jerk" I was mentioning previously.
First, to clear RAM and ROM, you can make a file called something like "DoNothing.spin". Put the following single line in the file:
PUB Main
Then do an F11. This will clear the EEPROM and Propeller RAM.
As far as whats happening with your code, there's only one way we can help with that. You'll need to post the code. This can be, but should not be, a little scary. The world is going to see your code, and you may be nervous about mistakes, or that folks will tear it apart. My experience is that in these forums, that is not the case, and you'll get lots of help. People here are anxious to see others succeed, and those more advanced have "been there" and are more than happy to help, and see you trying.
You can either post the code as an attachment to a file, or wrap it in the "code" tags. (Push the "CODE" button, paste the code, and then push the "CODE" button again.)
Give us a peek, and let's see if we can help with what's happening.
Ok - here's the code. I am spreading out the servo connectors on the board because it's easier to grab them.
Please keep in mind I just grabbed a Spin servo object and tortured it to make it do a test run - I have no idea what I'm doing.
Also, normally, I'd create variables like "speed", "MaxCW", "MaxCCW" and so forth to control speed and position - and of course, I'd provide loops &/or call subroutines for repetitive stuff . . . blah, blah, blah . . .
Yeah, this is really embarrassing . . . . . . I could win the prize for "Worst New Spin Newb" . . . . . .
{{
*****************************************
* Author: Scope (sort of)
* FILE MODIFIED & RENAMED:
* bw_06__test servos.spin
* 0
* 1 1 top
* 2
* 3 1 bottom
* 4
* 5 2 top
* 6
* 7 2 bottom
* ------------
* 8 3 top
* 9
* 10 3 bottom
* 11
* 12
* 13 4 top
* 14
* 15 4 bottom
* ------------
* 16
* 17
* 18
* 19
* 20
* 21
* 22
* 23
*****************************************
}}
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000 'Clock Speed on Propeller board
ServoCh1T = 1 'Assign servo, leg #1, top servo
ServoCh1B = 3 'Assign servo, leg #1, bottom servo
ServoCh2T = 5 'Assign servo, leg #2, top servo
ServoCh2B = 7 'Assign servo, leg #2, bottom servo
ServoCh3T = 8 'Assign servo, leg #3, top servo
ServoCh3B = 10 'Assign servo, leg #3, bottom servo
ServoCh4T = 13 'Assign servo, leg #4, top servo
ServoCh4B = 15 'Assign servo, leg #4, bottom servo
VAR
byte speed
OBJ
SERVO : "Servo32v5.spin"
PUB Servo32_DEMO | temp
SERVO.Start 'Start Servo handler
SERVO.Ramp '<-OPTIONAL 'Start Background Ramping
SERVO.Set(ServoCh1T,1500) 'Position servo horn in center
SERVO.Set(ServoCh1B,1500) 'Position servo horn in center
SERVO.Set(ServoCh2T,1500) 'Position servo horn in center
SERVO.Set(ServoCh2B,1500) 'Position servo horn in center
SERVO.Set(ServoCh3T,1500) 'Position servo horn in center
SERVO.Set(ServoCh3B,1500) 'Position servo horn in center
SERVO.Set(ServoCh4T,1500) 'Position servo horn in center
SERVO.Set(ServoCh4B,1500) 'Position servo horn in center
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move top of all legs out (forward or backward)
SERVO.SetRamp(ServoCh2T,2000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh1T,1000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4T,2000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3T,1000,200) 'Pan Servo horn to a CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move bottom of all legs out
SERVO.SetRamp(ServoCh1B,1000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh2B,2000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3B,1000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4B,2000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
SERVO.SetRamp(ServoCh1T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh2T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh3T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh4T,1500,200) 'Pan Servo horn to center position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
SERVO.SetRamp(ServoCh1B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh2B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh3B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh4B,1500,200) 'Pan Servo horn to center position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move top of all legs in (backward or foreward)
SERVO.SetRamp(ServoCh2T,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh1T,2000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4T,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3T,2000,200) 'Pan Servo horn to a CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move bottom of all legs in out position
SERVO.SetRamp(ServoCh1B,2000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh2B,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3B,2000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4B,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move bottom of all legs in out position
SERVO.SetRamp(ServoCh1B,500,150) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh2B,2400,150) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3B,550,150) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4B,2400,150) 'Pan Servo horn to a COUNTER CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
' --> Move bottom of all legs in out position
SERVO.SetRamp(ServoCh1B,2000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh2B,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
SERVO.SetRamp(ServoCh3B,2000,200) 'Pan Servo horn to a CLOCKWISE position
SERVO.SetRamp(ServoCh4B,1000,200) 'Pan Servo horn to a COUNTER CLOCKWISE position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
SERVO.SetRamp(ServoCh1T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh1B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh2T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh2B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh3T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh3B,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh4T,1500,200) 'Pan Servo horn to center position
SERVO.SetRamp(ServoCh4B,1500,200) 'Pan Servo horn to center position
waitcnt(clkfreq*1+cnt) 'wait for ? seconds --> guess
SERVO.Set(ServoCh1T,1500) 'Position servo horn in center
SERVO.Set(ServoCh1B,1500) 'Position servo horn in center
SERVO.Set(ServoCh2T,1500) 'Position servo horn in center
SERVO.Set(ServoCh2B,1500) 'Position servo horn in center
SERVO.Set(ServoCh3T,1500) 'Position servo horn in center
SERVO.Set(ServoCh3B,1500) 'Position servo horn in center
SERVO.Set(ServoCh4T,1500) 'Position servo horn in center
SERVO.Set(ServoCh4B,1500) 'Position servo horn in center
waitcnt(clkfreq*2+cnt) 'wait for ? seconds --> guess
reboot
What's not working? This seems to be what's happening in the video.
What are you using for a power supply for both the prop and the servos? Driving 8 servos is quite a few for some of the "wall warts", and this may explain some of the jitters.
You code is just fine, nothing to be embarrassed about.
Yes, the waitcnt(clkfreq*1+cnt) will wait for 1 second. No guessing there. (the last one will wait for 2 seconds).
Instead of the reboot at the end, you could also do something like this:
PUB Servo32_DEMO | temp
SERVO.Start 'Start Servo handler
SERVO.Ramp '<-OPTIONAL 'Start Background Ramping
Repeat
SERVO.Set(ServoCh1T,1500) 'Position servo horn in center
SERVO.Set(ServoCh1B,1500) 'Position servo horn in center
SERVO.Set(ServoCh2T,1500) 'Position servo horn in center
....
And then leave the "reboot" off at the bottom. This will do the SERVO.Start and .Ramp, and then go into an endless loop of exercising the legs. (Remember to pet the belly while this is happening for maximum effect.)
The advantage of this is that you only need to start the SERVO object once, and more significantly, there won't be any type of "pause" (other than what you program) while the Prop reboots.
The reboot may also be what's causing some of the "mystery" code to run. When you execute the reboot command, it's just like pressing the reset button. The Prop powers down, and goes through the normal boot, including loading whatever program is in the EEPROM. This means that if you used F10 to load the newest code, that code would run once, and then what ever the last code loaded into the EEPROM (F11) would run the 2nd and all subsequent times.
I'm using the Parallax ac/dc converter I got for my Boe-Bot. I am quite convinced I have another one rated at higher amps among the plethora of ac/dc converters in my large box in the garage. I could try to find that Wednesday evening - or - I could fabricate a connector, toss in a two cell lipo - I have 4000 mAh 7.2 lipo's that might provide enough umph. It'd be nice to write an object to monitor the lipo voltage - maybe a beep when nearing the cutoff voltage (3V/cell, I believe).
I'll also make the code recommendations you suggested.
Down the road I'd like to have each leg controlled with a different cog - not that it's necessary, it just seems fun to do it that way. I am also quite anxious to begin building a more robust model - one that will actually walk, of course. Now that I've gotten this far, I have momentum and more important, I have some confidence that I can make this a great project. In time. I have so much to learn - it's all good. The Parallax resources are really great - I just have to roll up my sleeves and get to pluggin-n-chuggin - that's the only way to really learn this stuff, of course.
Comments
Make it happen, Cap'n!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
|_Simple but functional . . .
|
|_I get involved and then forget that I missed lunch . . . oops . . .
|
|_Sorry the quality is lousy . . . no Oscar for me, eh? . . . (ha) . . .
|
|_Added another degree of freedom . . . maybe this will work after all . . . hmmm . . .
|
|_This is all I can do today - but, it's a beginning
|
|_I'll steal some more time from my schedule later this week so I can continue
|
|_I'd like to have Phoamy trotting around by the end of the week
|
|_He's already house trained . . . . . .
|
Does anyone know if my Boe-Bot is capable of handling 8 servos?
I have figured out how to get them all working but is running all 8 of them going to overload my beloved BB? I'm using 4 HS-55's, & 4 HS-81's. I will get a Propeller Servo Controller USB if it's necessary for this project but I wanted to see how I could make this thing operational while utilizing the least amount of capital resources. The final quadrapod should be using 8 HS-55's or near quality clones, if there is such a thing.
Thanks
tail wagging action with that big tail!!! I wouldn't want to be
in the way! [noparse]:)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
humanoido
*Stamp SEED Supercomputer *Basic Stamp Supercomputer *TriCore Stamp Supercomputer
*Minuscule Stamp Supercomputer *Tiny Stamp Supercomputer *Penguin with 12 Brains
*BASIC Stamp Supercomputing Book *Three Dimensional Computer *StampOne News!
*Penguin Tech *Penguin Robot Society *Toddler Humanoid Robot Project
*Ultimate List Prop Languages *Prop-a-Lot *Prop SC Computer - coming soon!
*Prop IB Hypercomputer - under development *Robotic Space Program
And, if getting a Propeller Servo Controller USB is required, I think it would be better for me to just go ahead and spend $60 more and get the Propeller Robot Control Board.
Yes?
Propeller Robot Controller Board
1. Needs 6.5v min to run board and if you have 8 servos you will need a least a 7.2v (RC type) battery
2. Will need to program in new language like Spin, PASM,(free from Parallax) PropBASIC, Catalina C (both free on Propeller forum) I really like PropBASIC.
3. Has 64k memory and 8 cogs (processors) to work with.
4. Mounting holes and size of Propeller board same as Board of Education (BOE)
Prop Servo Controller Board
1. Requires external power source
2. Doesn't require the learning of another language
3. Does off load a lot of servo overhead and allows BS2 to do other things, but for a walker won’t you have to constantly be sending new servo commands? One cog of the Propeller chip could do this. Have you considered using the Spin Stamp on your BOE? (would require purchase of Prop Clip, which means more money)
4. Does require communication using SEROUT command which can use up BS2 memory pretty quick if many are used. This can be overcome by the use of DATA blocks. In other words store walking movements in DATA tables and pass through a minimum number of SEROUT commands.
5. Small in size
As for over loading the BOE running eight servos?· I would think you'd be OK since you shouldn't be running them all at the same time will you?· But wait, they will all need to hold their postions.· Even though the servos are small they may just surpass the 1amp limit of the BOE.
Hope this helps because I like your robot idea and your ingenious use of foam. I look forward to watching your progress.
Tony
Post Edited (Tony B.) : 3/11/2010 11:10:08 AM GMT
I have experienced irregular "servo glitch" - not sure why.
This robot dog thing isn't as easy as I thought but it's fascinating and very fun - one challenge popping up after another.
I make, I discover, I think, I solve . . . then it breaks again and the cycle continues.
Testing new ideas and working through the problems all the while trying to learn to be a better programmer is what I call the JOY OF ROBOTICS. And that's why I do it!
Tony
I have a total of 3 Vin sockets but I need 4 in order to follow the instructions in the book.
Thanks
For weight, it looks as though the PRCB will allow me to use very small 2 or 3 cell lipo's - I have some that may just do the trick. No, Phoamy won't run around for hours but . . . he's just a prototype anyway. I plan on making a much more robust version, larger than the puppy. I also need to obtain more servos - I counted 26 for the next version - don't wanna give away any surprises, but the future Phoamy may be programed to react to fire hydrants.
Now, I need to brush up on how to program the Propeller, so, I guess this project is officially "on hold" until I play with and become barely proficient with the new hardware & so forth. I will enjoy building a larger dog and fortunately, I'm off for four days next weekend. Woo hoo!
Thanks
Keep up posted !
__I finished installing all the servos
__Part #28230 arrived today (Propeller Robot Controller Board). I was surprised this controller didn't come with a book so I also ordered and received the new Propeller book
__Now I have to decide to work on replacing the tranny in my Baja (avatar), or work on stuff for my day job, or study for a certification exam, or finish Phoamy. Tough choices.
|__Ok - I'm back on track . . . w/the Propeller Robot Control Board . . . (finally) . . .
|__
|__The preliminary tests controlling the position of the servos is slow but going well. This is quite different from programming the Stamp 2 - more challenging than I'd anticipated.
|__
|__I should have everything connected and final testing of Step 2 in an hour or so . . . video will follow . . .
|__
|__I plan on having the dog trot, sit up on back legs, whine for a biscuit, roll over & play dead . . . blah, blah, blah . . .
|__
|__Ultimately, I'll create a team of GPS guided, sled robotic dogs and make my way to work one day (I'll have the lawn mower in neutral)
|__
|__AI may include recognition of fire hydrants & trees . . . we'll see . . .
|__
|__Progress is slow but I'm getting there
|
|__I'm having a heckuvva time trying to get rid of servo chatter - after the program finishes
|
|__Also, I'm trying to figure out the difference between hitting F10 & F11, the latter does something w/EEPROM, or something like that
|
|__Time to whip out the book
|
|__Now the difficult part begins . . . yipes . . . . . .
|
I'm guessing that the problem is you really don't want the program to "finish". It probably needs to stay in a loop, ultimately waiting for commands, but for now, just to keep the signals going to the servos. If your program really "ends", then there is nothing left sending signals to the servos, kind of like when you turn off the transmitter on your buggy with the receiver still on...
If the "chatter" you're talking about is just a "buzz" or "whine", this may be normal.
F10 compiles the code, and sends it to the RAM on the Prop, but not the EEPROM. This means that if you kill the power to the prop, it will "forget" the program you sent. This is normally what you'd use for "testing".
F11 compiles the code and sends to the EEPROM, where it is "saved". This way, when you kill the power to the prop, and fire it back up, it will load the code and start running. This is normally used when you're "done" (or relatively done), or need to see what a "reset" does to things.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
Is he house broke yet?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
|__Phoamy is more of a concept - one of my first "bots from scratch" - he is nearing termination phase
|
|__My youngest son (who's 21) suggested a (fake) fur or cloth covering - I thought that was a great idea
|
|__Thanks for asking - I'll update when something new happens - sorry progress is very slow [noparse]:([/noparse]
|
|__Phoamy II will be much more robust, capable of fetching the paper and handing it to me folded neatly with the the daily Sudoku puzzle on front, putting slippers on my feet, and then lighting my pipe
|
After the program terminates, some of the servos "jerk" as if they were going from 1500 to 1750 without pausing. I believe this could be due to a low power input &/or lousy programming. And, I really don't like the idea of smoking a pipe but I'll do anything to help advance technology.
And, I'd like to know how to "wipe clean" both areas of RAM - is this simple to accomplish?
Here is Phoamy - lying on his back.
Three sequences of movement occur in this video - only during the final sequence does one see the actual code I wrote for the servos.
Between sequence of movements, one can see the "servo jerk" I was mentioning previously.
Any comments or suggestions are most appreciated.
First, to clear RAM and ROM, you can make a file called something like "DoNothing.spin". Put the following single line in the file:
Then do an F11. This will clear the EEPROM and Propeller RAM.
As far as whats happening with your code, there's only one way we can help with that. You'll need to post the code. This can be, but should not be, a little scary. The world is going to see your code, and you may be nervous about mistakes, or that folks will tear it apart. My experience is that in these forums, that is not the case, and you'll get lots of help. People here are anxious to see others succeed, and those more advanced have "been there" and are more than happy to help, and see you trying.
You can either post the code as an attachment to a file, or wrap it in the "code" tags. (Push the "CODE" button, paste the code, and then push the "CODE" button again.)
Give us a peek, and let's see if we can help with what's happening.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
Please keep in mind I just grabbed a Spin servo object and tortured it to make it do a test run - I have no idea what I'm doing.
Also, normally, I'd create variables like "speed", "MaxCW", "MaxCCW" and so forth to control speed and position - and of course, I'd provide loops &/or call subroutines for repetitive stuff . . . blah, blah, blah . . .
Yeah, this is really embarrassing . . . . . . I could win the prize for "Worst New Spin Newb" . . . . . .
What are you using for a power supply for both the prop and the servos? Driving 8 servos is quite a few for some of the "wall warts", and this may explain some of the jitters.
You code is just fine, nothing to be embarrassed about.
Yes, the waitcnt(clkfreq*1+cnt) will wait for 1 second. No guessing there. (the last one will wait for 2 seconds).
Instead of the reboot at the end, you could also do something like this:
And then leave the "reboot" off at the bottom. This will do the SERVO.Start and .Ramp, and then go into an endless loop of exercising the legs. (Remember to pet the belly while this is happening for maximum effect.)
The advantage of this is that you only need to start the SERVO object once, and more significantly, there won't be any type of "pause" (other than what you program) while the Prop reboots.
The reboot may also be what's causing some of the "mystery" code to run. When you execute the reboot command, it's just like pressing the reset button. The Prop powers down, and goes through the normal boot, including loading whatever program is in the EEPROM. This means that if you used F10 to load the newest code, that code would run once, and then what ever the last code loaded into the EEPROM (F11) would run the 2nd and all subsequent times.
Hope this helps!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John R.
Click here to see my Nomad Build Log
I'm using the Parallax ac/dc converter I got for my Boe-Bot. I am quite convinced I have another one rated at higher amps among the plethora of ac/dc converters in my large box in the garage. I could try to find that Wednesday evening - or - I could fabricate a connector, toss in a two cell lipo - I have 4000 mAh 7.2 lipo's that might provide enough umph. It'd be nice to write an object to monitor the lipo voltage - maybe a beep when nearing the cutoff voltage (3V/cell, I believe).
I'll also make the code recommendations you suggested.
Down the road I'd like to have each leg controlled with a different cog - not that it's necessary, it just seems fun to do it that way. I am also quite anxious to begin building a more robust model - one that will actually walk, of course. Now that I've gotten this far, I have momentum and more important, I have some confidence that I can make this a great project. In time. I have so much to learn - it's all good. The Parallax resources are really great - I just have to roll up my sleeves and get to pluggin-n-chuggin - that's the only way to really learn this stuff, of course.
Thanks very much again,
Scope