Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Pic Based Servo Controller and Free Control Software!

Status
Not open for further replies.

hvlabsdotcom

New Member
Hi all,

I'd just like to say, what a great site! Amazing what you can stumble upon within half an hour on the internet!

Now, I'm not new to electronics/robotics in general :rolleyes:, but I would like to share with you a project I recently finished doing.

A Serial Servo Controller based upon a PIC microcontroller that can currently control upto 8 hobby servos flawlessly. Also I have written a fairly complex VB application to control the servos from. The software allows you to control all 8 servos individually, also setting the reaction speed, trimming and direction. They can be controlled via sliders, joystick and soon to be a graphical "joystick". You are also able to record and playback complex servo movements. The software can also be run over a Remote desktop connection to allow remote operations from anywhere in the world! The software/circuit/partslist are all available free (for non commercial use) with lots of details on my website:

https://www.hvlabs.com

under the "Serial Servo Control" section.

Youtube video: https://uk.youtube.com/watch?v=d44iSRbINRE

I hope you might find this useful and Enjoy! :D

Comments, Wish list welcome...

Other videos on youtube by me: https://uk.youtube.com/profile_videos?user=hvlabsdotcom
 
what's your resolution for the servos?

im in the middle of building something which controls 2 servos with a 16us(64-step) resolution. it uses a pic16f628-04 clocked at 20mhz(hmmm, it MUST be a conspiracy)
 
Hi HVLabs,

Welcome. Do you intend to make the pic source code available for the servo controller?

@Leedude,
Did you see the discussion in this thread.

Mike.
 
Last edited:
Thankyou for all your kind greeting! :D

blueroomelectronics - He just kind of turned out like that after sticking bits on and putting leds here and there, honest! The short circuit films are now legendary to robotics enthusiasts now aren't they!

leedude - servo resolution of the SSC is 20us with a 254 step rotation over the 180 degrees. Although the update speed is lower than this due to serial communications (416us) and pic 4mhz clock speed, total around 20ms per loop. This is all running on a 627 or 628 at 4mhz and serves all 8 servos.

Pommie - Eventually I plan to make the source code available, just still working on the vb interface and wondering what to do with the final version! Stay tuned as they say...

I'll be releasing a new version of the software soon with a new feature, a "drawing pad" that can be used to control 2 axis with any number of servos configured to each axis, should be useful for quadroped/walking robot controls. Also, the screen area of the pad fits on a pocket pc screen size, so it can be run through remote desktop/wifi link to your main computer.
 
Is there a standard RS232 protocol for servo controllers?

I don't believe so, it's basically whatever a person decides to make use of. I've personally used hardware flow control RTS/CTS lines to take the pressure of the speed of the pic. The computer software simply stream down a channel id, followed by the servo position. All as 8 bit numbers.

In theory I should be able to have mulitple controller cards, connected to the same serial bus and assign different channel numbers to each servo, upto 254, but i'm still working on this!
 
Hi 'HV',

Nice job putting together a comprehensive and cohesive package of features.

I was wondering where you're controlling the "reaction speed" and "trim" functions, in the PC "front end" app' or in the PIC?

Also, did you perhaps mean your SSC has 254 steps at 4 usec resolution for the normal servo range of something like 1000..2000 msecs? 20 usecs doesn't sound quite right.

Mike
 
Last edited:
Hi 'HV',

Nice job putting together a comprehensive and cohesive package of features.

I was wondering where you're controlling the "reaction speed" and "trim" functions, in the PC "front end" app' or in the PIC?

Also, did you perhaps mean your SSC has 254 steps at 4 usec resolution for the normal servo range of something like 1000..2000 msecs? 20 usecs doesn't sound quite right.

Mike

Thanks for the coments mike, I'm trying to make a simple to use package for people that are intersted in robotics/control that is free (and will be open source), apart from a bit of construction for the controller. Any help, like yours is much appreciated!

OK, first question; the pc software is controlling the reaction speed of the servo channels by updating the pic at a user settable time interval (eg the drop down box "slow down by").

Second; The trim function actually sends a value from 0-254 to the pic via the serial connection using a different "operation" code. The pic then stores this value as it's center reference point for which to control the servo motions.

Lastly; Yes your quite right, I have made a mistake in what I said :rolleyes:
The SSC's update speed is 20ms (50hz pulse repetition for standard servos). This means that every channel connected to the SSC is updated every 20ms. The servo control timing is between 1 and 2ms in 254 points, or 4us per inc/dec of servo rotation.
-----
PS: Does anyone have any experience of using the RF650 transciever module from rfsolutions? As i'm thinking it would be incredibly easy for me to make this setup wireless!!! Anybody intersted? :D
 
Last edited:
Just to let everyone know, I have released a new version today, that fixes a small problem in where-by a screen size smaller than 1280x1024 does not allow the program to fit completely onscreen. The new display type can be activated from the menu and has been named "minimode". I have tested the app in this mode down to 1024x768.

other changes in v1.04:
- new graphical background
- updated help screen
- updated about screen
- fixed a minor problem with the playback of pre-recorded files, where the start playback button would become disabled.

**broken link removed**

**broken link removed**

**broken link removed**

Enjoy!:D
 
Last edited:
v1.05 released

Hi all,
Just an update.

I have released version 1.05 of OSC (olly's servo controller).

changes:

-loop function for recorded servo motion playback added
-updated help page

Also recompiled firmware for the the following PIC support;
PIC16F627
PIC16F628
PIC16F628A
PIC16F84

All pics use the same schematic layout.
 
Last edited:
Well it's that time again! Happy Christmas and have an excellent new years!

Just an update, OSC (Olly's Servo Controller) has been updated to version 1.06 with a few fixes and improvements. Hope you like it!

1.07 will be released soon too and will contain among other things, speech output, joystick button to playback file assignments and more! So, sorry about the wait, but trust me, it'll be worth it!

Oliver
 
Osc v1.10

After a long time off, Olly's Servo Controller software has been updated to V1.10. For anyone wishing to use buttons to playback servo recorded movement files, now they can! A number of other improvements have been made to the way the time delays are controlled etc.

Give it a go and let me know how you get on!

Download here: HVLabs.com

Olly
 
Great Project!

Olly,

Thanks for the great servo controller. This was my first time etching a PCB, and I am pleased with how it turned out.

I didn't realize until after I already etched the PCB that the pinouts on my 7805 regulators have the ground in the middle, so I had to cut some tracks and add jumper wires.

Also, the image on your website has the pinouts mirrored for the D-sub connector, or at least what I can get in the USA: DRB-09SM - PCB DB9 Female Right Angle .380 Connector 50 Pack. It would work for puting the D-sub connector on the BOTTOM of the board, but not on the top. I cut all the tracks and wired directly to the Max232. (Did I do something wrong?)

I have a modified image (hope you don't mind) and I posted it below, that has the correct configuration for D-sub 9 PCB mount, along with the standard 7805 (common in the middle) pinouts.

with a 12 Volt 2.2 amp transformer, I am controlling 2-3 servos with no problems, and not much heat. I think I'll need more amps for much more than that, but the 7805's I got are only rated at 1 amp each, so I probably won't push it.

I am getting used to Olly's controller program, and I think it is great. Can the servo movement save files be edited in notepad?

My first project is going to be a variant of this guy:

http://www.milinst.com/robotics/5_756s.jpg

Thanks again!

(Here is a video link to the finished product)

http://www.youtube.com/watch?v=iAe3jtnwnd0
 

Attachments

  • IMG_0187[1].jpg
    IMG_0187[1].jpg
    42.8 KB · Views: 774
  • SSCboard600dpiupdated.jpg
    SSCboard600dpiupdated.jpg
    794.1 KB · Views: 803
Last edited:
First project with Olly's servo controller.

I made my own version of Alex the talking head, and with an Xbox controller, becomes a fun toy for kids.

YouTube - Serial Servo Controlled Fred the Talking Head

I get continual servo glitches across all channels. I'm not sure where the extra noise if coming from.

Also, even with a robots power supply (12 volts at about 17 amps) all servo output shuts down after several movements. I have to disable all channels and enable them all to get control back.

Any suggestions?
 
Last edited:
I separated the power, so that one voltage regulator feeds the PIC and MAX232 and another feeds only the servos, and this seems to have fixed all twictching and resetting of the PIC.

It appears that having two separate regulators works better than having them in parallel, and up to 4 servos can be run with only a 1.5 amp supply.

My next goal is to find a way to supply the serial inputs without a computer, perhaps using a basic stamp or EEPROM.
 
Servo's are noisy creatures, large power supply bypass caps are always a good idea, and completely separating power from control electronics is a good idea as well.
 
Olly hasn't been responding, and I hope he doesn't mind, but this is the PCB design I am using now with the modifications made to use standard pinouts for 7805's, the correct pinouts for the d-sub 9, and separates the voltage regulators so that one only feeds the servos. There are 3 extra jumper wires on it then the original, so at some point it will probably need to be completely redesigned in Eagle.

Working like a charm!
 

Attachments

  • SSCboard600dpiupdated.jpg
    SSCboard600dpiupdated.jpg
    803.6 KB · Views: 899
Hi. I hope someone out there is still reading this thread. I have built the SCC board but I just can't seem to get it to work. Can anyone please help me I have emailed Olly direct but get no reply. The board powers up and I have all the voltages correct with power LED on. I too had to do some jiggery pokery to get the board right. I can pulse with a logic pulser on the control lines of the servo and sure enough they move. Im pretty sure all of the electrics are ok. The ting im not sure about is the wiring for the RS232/ MAX232. Can anyone tell me which pins go where. At present I have :

RS232 MAX232
1 --------------------- Linked
2 --------- 14
3 --------- 13
4 --------------------- Linked
5 --------------------- Ground
6 --------------------- Linked
7 ---------- 8
8 ---------- 7
9 --------------------- Not Used

Is this correct? - The software runs very slowly which I think is because there is no communication to the board.

Can anyone please help?

Regards - Paul
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top