Spin-Juke_Bot
msiriwardena
Posts: 301
in Robotics
I have assembled Spin-Juke- bot using .Actvity Bot with Parallax 360 servos hoping it would work as the activity
board is very similer and uses the same pins for 1. The servos
2.sound
3.SD card
I changed the pins for the XBee - the two XBees receive and transit Data - no issue.
The Activity-Bot moves very erratically - Not compatible with the 360 servos
The sound does not play at all - SD card, and VHO speaker connected to the identical pins.I downloaded some
wav files using "audacity" to the micro-SD card and they play well.
This project was put together by Andy Lindsey and posted in the parallax spin tutorials.
I have also attached the files that I have modified for my activity bot.
I would like some help to achieve my goal of working and singing bot.
I hope some body would help me with this.
Siri
board is very similer and uses the same pins for 1. The servos
2.sound
3.SD card
I changed the pins for the XBee - the two XBees receive and transit Data - no issue.
The Activity-Bot moves very erratically - Not compatible with the 360 servos
The sound does not play at all - SD card, and VHO speaker connected to the identical pins.I downloaded some
wav files using "audacity" to the micro-SD card and they play well.
This project was put together by Andy Lindsey and posted in the parallax spin tutorials.
I have also attached the files that I have modified for my activity bot.
I would like some help to achieve my goal of working and singing bot.
I hope some body would help me with this.
Siri
zip
104K
Comments
I hope Andyt Lindsey will chime.
Siri
Erratic servo behavior is usually caused by weak batteries so check your battery voltages.
Tom Crawford developed a spin driver for the 360 servos. At the end he had a driver that worked for driving a robot. (I used his spin examples and his PASM driver to make SimpleIDE C functions to drive my activitybot with the 360 servos. His work starts here and goes through page 7 of that thread.
https://forums.parallax.com/discussion/comment/1422301/#Comment_1422301
It should be possible to take Tom's Spin + PASM code and replace the regular continuous servo spin object.
Hope this helps
Tom M.
https://www.parallax.com/sites/default/files/downloads/900-00360-Feedback-360-HS-Servo-v1.2.pdf
Also note that under specifications the servo needs 1200 mA or 1.2 Amps when stalled.
That is when using the SimpleIDE C libraries. There are 2 primary library folders for the ABOTs: ActivityBot and ActivityBot360. Within the libraries the function names are the same so the only thing that needs to be changed when programming for either is to "include" the correct .h library. For example:
However, the OP is using Spin, and I have not been able to find any servo360 objects except for Tom Crawford's which worked when I tried it.
Tom
working on it.
@Genrtix - I am using spin. Thanks for the response.
Thanks for the Help
Siri
You were right it was a call for a method and I got confused with a call for an Object.
I will play with the driver and see how it goes.
Thanks for your help.
Siri
Glad to help however I can, if you need any explanation of how to use the driver methods.
I am working with your 360 servo driver, I ran your Demo and it runs a while and then it stops and will not complete
the whole Demo.
I have attached a screen shot to show you exactly stops and would not continue any further.
It would be great help if you would fix the Demo.
Thank you
Siri
The program will definitely hang if it attempts to program a servo that isn't there.
I only have 2 servos and I have and I think I have CPx and FPx correct.
I have attached the complete program for your review.
Thank you for your prompt reply.
Siri
Here is where the program gets stuck:
To prove you are getting stuck where I think you are, insert a command to print something while it is waiting for the command to complete. Should get a string of ******* If that IS the problem, you can adjust DeltaMin(decrease increase) and/or MaxError (increase).
Saturday night here in California, I'll look tomorrow morning for feedback. I'm pretty sure we can get this working. :-)
Sunday morning in California.
I think you are getting caught in the dead zone (the feedback servo doesn't actually do anything until the pulse width gets a good distance from 1500 microseconds). Here is how to fix that:
1. Make absolutely certain your activity board is jumped so that the servos are powered from Vin, not 5V. Running the servos from 5V makes the dead zone much worse.
2. Increase DeltaMin, say to 30 or 35. This code is right at the top of the demo.
Let me know.
I changed the power to vin from 5V and did the changes as you advised.
Now the Demo works well
Thank you
Siri
I am trying to set 2 servos to drive a bot forward/backward at a constant velocity.
I have tried the SetVelocity method they hardly move so I placed a wait time then it works for the specified time.
But I would like the wheels go forward/backwared indefinitely until directed to do
something else, like turn right etc.
Attached is ( spin file) what I have been my attempts.Make any changes and Delete
redundant code etc.
I would like some help.
Thank you.
Siri
Looks like a good test program. But you need to end it with something that keeps the "master" cog alive. Say . Otherwise spin will terminate that cog which in turn terminates the code I have running in that cog. Honestly, I don't know in detail what that would do, but it can't be good.
Now, that added, the program should drive the robot forward forever. "Uncomment" the waitcnt and the Backward and it should drive forward for 5 seconds and then backward forever. And so on.
Let me know.
It worked as you expected.
Thanks you
Siri
If I may ask, where are you? I am in northern California, in the foothills of Sierra Nevada.
Tom, I am in Trinity Florida about 15 miles north of Tampa.
Electronics is my hobby.
Thanks for all your Help.
Siri