View Full Version : Discussion Another 8-Channel USB PIC Servo Controller
xorcise
Jul 04, 2006, 12:36 PM
Here's an 8-Channel USB Servo Controller using an 18F2550. 0 to 255 resolution on 8 independent channels. Includes a PC program to demostrate the connection. All mikroBASIC PIC source code, hex file, and VB program. :cool:
Another 8-Channel USB PIC Servo Controller (http://www.circuit-ed.com/forums/viewtopic.php?t=52)
Malc C
Jul 04, 2006, 02:31 PM
Any chance of a schematic, just to be on the safe side ;)
The PC demo program looks cool, but how easy would it be to produce something a bit more advanced. How about a check box against each servo and a box where you can enter the value for each servo and then a send button, so that all the servos that have been checked move at once (or so quick in sequence that they appear to move at the same time). Or the ability to have a box where you can enter a set of commands in a "program" or from a time line like the one available from http://www.brookshiresoftware.com/vsa_overview.htm
I have a few 18F2550's in my hobby box... and some servos... just might have a go at this :)
xorcise
Jul 04, 2006, 03:10 PM
Thanks Malc. I'll add those features. All suggestions will be gladly considered for the application. It's mostly a demo right now and I was anxious to show it off... ;)
Malc C
Jul 04, 2006, 03:57 PM
and I was anxious to show it off... ;)
:) I know what you mean ;)
Thanks for sharing this with us, looking forward to seeing the full schematic (although I can guess the USB side as its probably identical to the USB transmitter interface I got involved in - see sticky above). I'm off to get some plasticard and make myself a robot arm... should be a good little project with your USB SSC :)
xorcise
Jul 04, 2006, 04:34 PM
It was your project that got me thinking about this one. I had already written a straightforward servo library, so it was off to the races with my mikroBasic and assembler and get the USB working. mE has a great HID library and ready-to-go examples which helped facilitate some of the coding.
Now that the ideas are running in my head, I am considering adding a full sequencer to the project. This way a user can bench test a robot and also be able to store the sequence in flash memory and/or EEPROM which means the PIC can stay in the project with the sequence that works. The 18F2550 has a ton of flash and my program only uses 1800 words as it stands now, leaving plenty of room for more features.
By the way, your little 18F2550 boards should work fine with this program. It only utilizes PORTB as outputs and RC4 and RC5 for the USB connections. All connections are of the standard type electrically. The EasyPIC3 board I use for prototyping and programming has the USB connector built into the board which connects directly for all the 28 & 40 pin USB PIC's.
Malc C
Jul 04, 2006, 05:04 PM
Wow ! - chuffed to bits to think it was our little project that kick started yours :)
All these ideas sound great. I used to have a simple walking robot
http://www.magenta2000.co.uk/images/brainiborg-sml.jpg
This came with a simple comms lead and software that allowed you to "write" a program by clicking on a graphic of the robot. You then sent the code (bit like basic - sort of like FR40, RR-40,pause 10, BR20, BL-55 where FR is front right etc) - unpluging the robot and press the run button and off it went looping through the code !
When I first wanted to build a robotic arm similar to the Lynx ones
http://www.lynxmotion.com/images/jpg/l5arm3.jpg
It was really hard to find free software to accompany any of the SSC that were found on several websites. If you can come up with the software to compliment the USB SSC for these sort of projects, then it would be really fantastic.
xorcise
Jul 04, 2006, 07:17 PM
Wow ! - chuffed to bits to think it was our little project that kick started yours :)
Stateside, "chuffed" is an new one for me, and New Yorkers are pretty good with those UK nuances.. :)
It was really hard to find free software to accompany any of the SSC that were found on several websites. If you can come up with the software to compliment the USB SSC for these sort of projects, then it would be really fantastic.
Maybe we can do something about that.
Malc C
Jul 04, 2006, 07:33 PM
Sorry - I hope I didn't suggest something else.. :) - Chuffed means "thrilled", "pleased" etc
Maybe we can do something about that.
Can't wait to see what tomorrow brings :)
Well its 12:30 am so I'm logging off and gonna get some sleep..
xorcise
Jul 04, 2006, 11:23 PM
The VB Program has been updated with some new features:
1. Added "Set All Servo's" Buttons at top of form.
2. Added ability to change the value of a servo above each horizontal scrollbar. Enter your new value in the textbox (don't be fooled...it's a textbox) and then double-click the textbox to change the servo value.
Ability to link any number and combination of servo's is coming!
DOWNLOAD PC PROGRAM HERE (http://blazedamic.com/pic_servo8.exe)
PIC18F2550 HEX FILE (http://blazedamic.com/pic_servo8.hex)
LINK TO mikroBASIC Source Code (http://www.circuit-ed.com/forums/viewforum.php?f=8)
Malc C
Jul 05, 2006, 07:53 AM
Looks good, but if you un-check any of the boxes, you can't then re-check them again ?? unless I'm doing something wrong
xorcise
Jul 05, 2006, 02:30 PM
Malc,
I was too tired to finish the coding behind the servo linking last night and left the checkboxes dead. Maybe I will finish that part later today.
It's progressing quite nicely I think. Any more ideas and suggestions are welcome.
xorcise
Jul 05, 2006, 09:18 PM
Looks good, but if you un-check any of the boxes, you can't then re-check them again ?? unless I'm doing something wrongAll working now!
The PC Program now has added functions:
***Added SERVO LINKING capability. You can now link any or all of the 8 servos....so be careful :D
xorcise
Jul 06, 2006, 11:20 PM
The latest little tweak to the PC program....for what it's worth:
***Added "Clear All Links" button
Any suggestions for changes/features to this project will be considered seriously.
Cheers :)
dev|ant
Jul 07, 2006, 05:42 AM
A network interface, so other hosts / programs can control things? :cool:
xorcise
Jul 07, 2006, 06:09 AM
A network interface, so other hosts / programs can control things? :cool:Tall order. I barely got USB under my belt. I'm actually interested in adding more functional features to the USB/PIC/Servo interface.
Malc C
Jul 07, 2006, 06:20 AM
For me, I would just like to have the function of a time line, like that featured in the software I mentioned in post 2 of this thread. Entering values for each servo at certain points along the time line, and then as you "play" the time line and it finds a value its sent to the servo..
xorcise
Jul 07, 2006, 02:51 PM
I like that idea too. I'll see what I can come up with.
vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.