Jump to content
 

Servo controller board using Picaxe


unravelled

Recommended Posts

  • RMweb Gold
Some time ago I wrote up my circuit for driving Fulgurex/Lemarco  point motors. I haven't given up on these, but needed something more compact for a small space. As a result I've been looking at servos. My initial thought was to use a picaxe microcontroller, something  I had played with some time before. However looking at other options I liked the look of the Megapoints controller, which I thought  would provide a saving in time and effort. Which they would have done apart from a couple of problems I had. I have to  say that these are not problems with the Megapoints board, just with me and to a lesser extent, the setup I wanted to control. Specifically I don't get on with push button programming, and the points I was trying to control were on a run of about 12 feet. To make matters worse  the cheap servo extension leads I bought were proving unreliable. So I looked back to picaxe.
 

One of the things I was looking for was a solution which would allow a small cluster of points to be controlled economically. So the 21 servo Picaxe board was out of the running. In the end I settled on the 20m2 chip for its neat layout, with the 4 programming/power pins at the top, 8 inputs one side and 8 outpiuts the other. There is an 08m2 chip which could be used to drive just two outputs, but I don't know if it will be worth writing the slightly different code it needs. I think that the advantages of a single standard 8 servo board means it  can occasionally be underused without undue waste.

 

To begin I bought a 20M2 starter kit, which provided me with most of the bits I needed to run some initial tests. I found the programming easy to relearn, and got servos running easily. The next step was to build a stripboard version of the circuit, missing out the programming socket, as all chip  programming can  be done on the development board. I've made my usual mistake with this  prototype in making it too small. I'll make the production ones larger to allow fixing holes and space for feet.

 

post-6902-0-21891700-1449425211_thumb.jpg

 

I've used resistor arrays to keep the build compact, but there's no reason why separate resistors couldn't be used, though a bigger board might be needed. The dil input connector on the left is just for testing, it only needs to be a single row for practical use. The board uses separate supplies for electronics and servo power.

 

I'll update with a finished circuit board soom, but if anyone wants more info or circuit/program details, please ask.

 

Thanks

 

Dave

 

Link to post
Share on other sites

  • RMweb Gold

Hi Dave

 

Where did you get the starter kit from? And you mentioned the 21 servo Picaxe board (£27.59 http://www.picaxe.com/Hardware/Add-on-Modules/21-Channel-Servo-Controller/)being uneconomical, what sort of costs are you looking at?

 

I would be very interested with your progress please keep us posted, circuit/program details.

 

Best regards

Ian

I  got the picaxe bits from http://www.picaxe.com/Hardware/Starter-Packs/PICAXE-20-Starter-Pack/   I've used them, (Revolution education as they were), since about 2001. It was worthwhile as I needed the usb lead, although it does add to the cost of the project. Ignoring the starter kit I can build the boards as shown  at under £1 a port.

There are two reasons for me dismissing the 21 servo board. One is that I didn't want all the servo leads having to run back to one board as this would mean runs of up to 12 feet. Also it only really does outputs and I'd have to devise a connection to the control panel. My board just connects directly to inputs and outputs.

Another aspect of the design is that  while in its current form it uses direct switch input,  it could be driven by another layer of computer or logic control at a later date.

 

Thanks

 

Dave

Link to post
Share on other sites

  • 6 months later...
  • RMweb Gold

I have all the boards built and tested. I was worried for a while until I found that a wire link was missing, easily corrected. 00 work has been delayed while I get the gauge 1  wired and running on the lower level. But I have all the servos, and the mounts are lasercut and waiting for assembly.

 

Thanks

 

Dave

Link to post
Share on other sites

Hi Dave,

 

I had a read about your gauge 1 project, and the photographs of your childhood, looks very interesting, good luck with it!

 

When you start back on servos and Picaxe do keeps us up dated.

 

Best

Ian

Link to post
Share on other sites

  • 2 weeks later...
  • RMweb Gold

Time for a catch up. The finalised board looks like this.

 

post-6902-0-39902100-1466692752_thumb.jpg

 

Servo outputs nearest the camera. It is easy to make a version to accommodate the 8 pin chip if just two outputs are sufficient. I decided to make the board a bit bigger, to allow for some sort of fixings. I may have to alter the power connection when installed.

 

Some detail of the servo mount. This is designed for above board mounting in my storage sidings, and drives the pin on the Peco tiebar directly, using the full motion of the servo. A separate cam operates a microswitch for frog polarity. These images show the cam at either end of rotation.

 

post-6902-0-80488500-1466693337_thumb.jpg

 

post-6902-0-98365100-1466693391_thumb.jpg

 

The mount has been designed for the SG92R servos, I don't know why I chose these over the 90s, but they will be my standard for now.

 

Several angles on the mounting, and my stockpile.

 

post-6902-0-78264300-1466693608_thumb.jpg

 

post-6902-0-18701100-1466693628_thumb.jpg

 

The kit of parts can be assembled as a mirror image, iif space requires it.

 

Fitted with servo and microswitch.

 

post-6902-0-79760700-1466693805_thumb.jpg

 

The cam took some working out. The reason for it rotating past the pin in each direction is to keep it from fouling the stock. Earlier, bigger cams derailed some of the test stock. The cam is made of four components.

 

post-6902-0-72258400-1466694369_thumb.jpg

 

The two on the left create a slot to operate the tiebar. The two little support pieces at the ends of the slot are removed after the cam nas been glued up. The next piece is set at an angle to the other two to operate the microswitch, with the last piece just to thicken it up. The keyhole shapes are to locate a cut down servo horn. I did try a direct connection to the servo, but the perspex is too hard to be a good fit on the servo shaft and early efforts slipped, or took too much force to locate.

 

A finished cam.

 

post-6902-0-17571000-1466694889_thumb.jpg

 

Note that the slotted part of the cam can be glued on either way up, allowing low/high servo pulse transition to switch e the points in the required way.

 

Any questions?

 

Thanks

 

Dave

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...