Showing posts with label Motor controller. Show all posts
Showing posts with label Motor controller. Show all posts

Updated motor controller

The re-designed motor controller

The motor controller has had the largest update of all the boards, however the general function of the board remains the same.

On the schematic the voltage regulator was removed as it is not required for the current generation of boards as they all run on a standard 5v TTL signal that is currently provided by the battery pack, the voltage regulator and the complimentary components also took up a large amount of room, which could have been used for other components or to provide more space the current parts.


A secondary trim-pot has been added, this allows for control over the speed of both wheels, so that it can be calibrated to go in a straight line, or if you reduce the speed of both wheels evenly, you could make the robot go slowly. Minor changes to the bottom and top silkscreens were made to help make the pin-outs and board labelling easier to understand, especially when viewing the board from the top.


The perimeter shape of the board has been altered to make better use of the paid-for area (You pay for a bounding box at OSH Park, so any cut-outs would be costly) This was also required for the second trim-pot as there would not have been enough room previously. I was also able to re-arrange various components to allow for more space between parts. Due to the extensive amount of redoing the tracks on the board, no vias were required, and there is a large amount of room between the majority of the tracks. 


The increase in spare space on the board enabled me to move the PCB switch location to a more suitable position, so that it would not be obscured by the shields that would be stacked on top. A secondary switch pin-out was put onto the board, in parallel to the first, this would allow you to add an external switch on the chassis (for example) and could provide the user with more elegant switch in order to turn the robot on.


A single 2-pin header was added to the board, which, when a shunt (shorter) is put on, it would short the VCC and the forward control pins of both motors, this would cause the robot to move forwards to allow the user to calibrate the trim-pots to make the robot move forwards in a straight line.


One aspect of the motor controller PCB that is yet to be updated is the layout of the mounting holes, so that it would be impossible for the motor controller, and therefore the shields with inputs/outputs, to be incorrectly orientated on the chassis.


The motor controller Eagle files discussed in this post (v0.5) can be downloaded from Dropbox.

What needs to be improved on the modular robot?

I have now had a working modular robot for a few days and I now know a few problems wioth the current design and had feedback from others. So this post is simply a list of potential improvements that could be implemented in later designs. Some parts of the robot require more work than others.

Edgebot potential improvements:

  • Remove the need for a jumper for when the Photovore shield is not used, this could be replaced by two transistors and act as a switch when the Photovore shield is added
  • Remove the two vias on the PCB

Photovore potential improvements:

  • Find another source of LDRs, so that the sensitivity is altered so that it can be used in lighter conditions
  • Convert the circuit to an Eagle schematic and produce a PCB

Motor controller potential improvements:

  • Remove the voltage regulator, as it is not needed for the current boards and takes up a large amount of space on the PCB
  • Add a second trim-pot, so that you can calibrate both wheels to ensure that it can go in a straight line
  • Re-arrange various components
  • Re-do all the tracks, in an attempt to get rid of vias
  • Move the switch so that it is not obscured by the shields and add pin spacing so taht you can have an external switch
  • Change the mounting hole layout, so you cannot attach it to the chassis in an incorrect orientation
  • Add PCB to where it is currently not, at the sides of the board, as it is a paid-for area, which is currently not used

Improvements that would affect all the boards:

  • Alter the stackable header format so that one of the 6 pin headers become an 8 pin header, this would cause less confusion when it comes to the orientation of the boards and it would also allow for more pins to transfer signals between boards
  • Change the pad size to be larger, as this would make for easier soldering for people who are less capable

Chassis potential improvements:

  • Make the chassis smaller, as there is currently a lot of wasted space, which is doing nothing apart from making the robot larger
  • Make a battery compartment, so that the battery does not rattle around when it is moving, but make sure that it can come out when you want to change the batteries
  • Change the motor mount design, so that the wheel can go on fully
  • Add an integrated bumper at the front of the chassis, this would trigger the touch sensor when it drives into an object
  • Alter the ball caster wheel design, so that the ping-pong ball is less loose
  • Change the design so that wires are not wrapped around the chassis
  • Rotate the LDR mounts to point slightly more outwards
  • Alter the design so that the robot has a more level base

It's alive!

The very first working modular robot

As I have previously posted, I have now finished the current versions of the Edgebot shield and motor controller board and they're working correctly together. I quickly designed a chassis for the robot that would act as a platform for the electronics to be attached to. The design includes and integrated caster roller that uses a common 40mm ping pong ball as the main pivot, this is inserted with a little force and a reassuring 'pop'. Once this current design can still be improved greatly, for example, the pin-pong is very loose and rattles a fair bit when not in use, etc.

The ping-pong roller ball, still to be finalised, but working.

The main section of the chassis is made up of 2 layers, the first of which is the base, this is what the gear motors are mounted to and the battery mounting rests upon, while the front section of this layer is slightly obstructed by the roller wheel fastenings, it does contain space to put other sensors or parts.

The top layer currently only accommodates the stackable PCBs, the motor controller is fastened to the acrylic using four M3 bolts and some nuts. Then other layers are stacked on top of that to provide other behaviours to the robot, such as light seeking and object avoiding, whilst the motor connections could be attached to the motor controller permanently, the other behaviour modules' inputs are interfaced by right-angle headers pointing outwards from the board. You can then plug in the sensors as they are required.



The files for the chassis design featured in this post  (v0.1) can be downloaded from Dropbox.

Two steps forward, one step back, another forward and then one back...


Can you see the error?

I'll start with the good news, I have now received all of the required components to build all the modules and have been constructing them when I have spare time.


I began to solder the Edgebot boards as soon as the parts started to arrived, and that process was completed without any hiccups, moreover when the quick build was finished I was able to test it using a few LEDs on the outputs, a switch acting as an the input and a small power supply, this enabled me to thoroughly test the Edgebot circuit and it appeared to function correctly.

When the components finished arriving I was also able to finish the Photovore, again without a problem, however I was then naive and reasoned that because it had few components and that I have worked with simple comparators before, that that board would work, more on that later.

Before I soldered each board I quickly looked over the tracks and layout again (having also done so when receiving them) and this time I noticed a fault with the motor controller;



Can you see it now? It is the short connecting all the pins.

This could be resolved relatively quickly using a lot a light, some magnification glasses, a scalpel and a steady hand. I made a shallow incision into the connecting track and then I was able to carefully peel back the track and sever it at the next pad, this completely removed the connection, this is easily seen with the track leading to the centre pin of the voltage regulator in the following image;


It isn't neat, but it gets the job done

I have since been able to solder the motor controller board completely and thoroughly test it both with and without motors, it seems that my worries about the L293D were unnecessary; it functions fine with a 6 volt input voltage (4x AA) and it also produces less heat than anticipated thus meaning there is no need for a heat-sink or other cooling method. Here are images of the (working) boards;


The fully soldered Edgebot module
The motor controller, without the confusion of the voltage regulator

Once the first chassis design has been finalised, a video of the robot shall be posted, this should be shortly. 

Arrival of modular robotics boards


The three boards as seen from the top

This is just a quick post to say that the modular robots boards have arrived. I used OSH Park for these boards and although this is my third order with them, I am still highly impressed by the quality of the PCBs, I only ordered three of each board as they are the first physical version that I have and mistakes are relatively expensive. Here are some more photos of the boards;



The three boards as seen from the bottom



Motor controller

The layout for the motor controller PCB was, again, fairly straightforward as there was already had a board layout ready, also the board composes of little more than a single H-Bridge, a voltage regulator and some side connectors. On the other hand, finding components which worked together was a little more challenging.

Ever since starting to designing the modular robots, I was constantly thinking of shield boards that could be developed to allow for more complex behaviour and an Arduino/Atmel shield seemed to be an obvious option for a programmable control structure. The main Atmel chips are typically powered off 3.3v or 5v power supplies, also, 5v is a standard supply voltage for logic chips. However, no battery supplies 5v, therefore a voltage regulator would have to be used, the most common 5v voltage regulator appeared to be the LM7805, but it requires a minimum input voltage of 7.5v to function properly and my intended battery array is not that high (I was thinking of using AA batteries, as they are widely available, cheap, and have a large capacity. So 3 or 4 in series would be good; 4.5v/6v respectively) This lead me to consider a 3.3v voltage regulator such as the LM1117, I had a look and found it requires a minimum input voltage of 4.5v, which is perfect.


Another component which required some research was the H-bridge, I originally intended to use the SN754410 which is sold by Sparkfun (or more accurately, resold by Hobbytronics) so it could be sourced easily. Unfortunately, the SN754410 requires a regulated logic supple voltage of 5v, which, as was just mentioned, I am unable to provide with the current battery amount. I then found a few more H-bridges, but they all provided me with the same problem, I finally stumbled upon the L293D, which operates down to 4.5v also. A common issue with motor controllers of all types that they can become hot when operating, but I found a few suitable DIP heatsinks on UK Farnell, such as this and this. The maximum current output of the L293D is 600ma with a 1.2A peak, both of which are way above the current use of the motor/s I have been looking at, more on that at a later date though.


Although there are two revisions of the board, the only difference between the two is the presence of mounting holes in the second, the width and height between the centre of the holes is 1400 and 1500 mils respectively, the mils measurement is a standard PCB measurement, but almost useless anywhere else, so those dimensions in metric are (annoyingly) 35.56mm and 38.1mm and the diameter of the holes is 3mm.


The schematic, you can see that it is basically two circuits; the H-bridge and the voltage regulator

The PCB


The top side of the PCB as seen in the OSH Park preview/checker

The latest motor controller PCB design files (v0.2) can be downloaded from Dropbox.