Showing posts with label PCB. Show all posts
Showing posts with label PCB. 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.

Updated Edgebot shield

The updated Edgebot shield

I made a small update to the modular Edgebot shield schematic, all that was involved was the re-placing of one of the stackable headers from a 6-pin to an 8-pin header, along with this, a few components required re-naming.

As for the PCB board side of the development, little changed as the stackable header had to be replaced and therefore a few local components had to re-located or moved slightly. Minor changed to the silkscreens were made to make the pin-outs easier to understand. There was also a minor amount of track rework to remove the two vias on the PCB.

The latest Edgebot shield (v0.7) can be downloaded from Dropbox.

Updated Photovore shield



The updated PCB board design

I have finally got round to re-designing the Photovore modular shield and as the previous circuit did not work at all, it required a complete re-work of all aspects the the board.

To draw the circuit schematic I performed continuity tests on all the pins in order to figure out where the various connections on the breadboard were, this then translated directly into the Eagle where I connected the components exactly as they were on the quick prototype.

I then moved the schematic across into Eagle’s board designer and produced a PCB from the schematic, as there were few components, it did not require much work and no vias were needed.

The new schematic, it is an incredibly simple circuit

This version of the Photovore shield (v0.3) can be downloaded from Dropbox, along with all the other Photovore Eagle files.

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

Revised Photovore shield



IMG_1585.JPG (800×600)
The perfboard Photovore with diagnostic wires to figure the input/output wiring

As the Photovore shield failed, I had a look at the various components on it which could have failed, due to the little amount of parts on the modular Photovore PCB, it indicated that either the dual comparator was blown, or I had implemented the comparator chip into circuit incorrectly.


I started by simply swapping the comparator chip out and replacing it with another, completely new chip and the result? No difference in result. This caused me to presume that I had made an error when designing the PCB of the Photovore, so I made a mock-up of the circuit on a solderless breadboard which again, did not work, even when I attempted multiple circuits found online and within the simulation software.


Now without a Photovore shield, I needed another circuit that would perform similarly; I looked back through my notes on various original circuit design concepts and found a suitably simple circuit which I decided not to use previously as it required only 2 inverters and inverters are only packaged as a large hex NOT gate, therefore I would be using a large chip which could be replaced with a smaller DIP chip.


This new circuit is simple, it sets two LDRs up as a voltage divider, and the first inverter takes the split signal and turns it into a clean, digital signal, this is then fed to one of the motors, while that signal is inverted again for the other motor.

I quickly wired it up on a solderless breadboard to test the circuit, then continued to transfer it onto a perfboard shield. As you can see in the images, the perfboard shield is similar size, and no moderation to the headers was required to make them slot together correctly, due to the layout of the PCB.


The original Photovore PCB next to the freshly cut perfboard
The perfboard shield with the stackable headers in place
IMG_1742.JPG (800×600)
The finished DIY Photovore
The new Photovore shield on the chassis
As of the time of writing, it is fairly bright and it is hard to follow a light in bright light, as the difference between the two LDRs' resistance is minimal, so I will post a video when I have chance to.

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. 

Stacking modular PCBs

The three boards stacked one upon another

This is another relatively quick post to show how to modular robotic boards are to come together to form a robot with modular behaviour. I have received packages in the post containing headers and some other various parts, but the main order has a back-ordered component, so it will take longer. 


As you can see from the first picture, the top two boards (the Edgebot and the Photovore) have a pair of Arduino 6-pin stackable headers, which are incredibly useful if you want multiple PCBs to have the ability to stack on top of each other, but unfortunately they are only sold in lengths of 6, 8 or 10 pins, so I had to design the boards around one of those sizes. These pairs of headers have two uses on these boards, the preliminary function is the transfer of electrical logic signals between various boards, the other purpose of the headers is to hold and stabilise the boards mounted on top and using a pair of headers is a lot more stable than a single row.


You can also see the right angle pins facing outwards from the upper boards, these are to attach various inputs/outputs to, such as touch switches, light sensors, logic outputs etc.


Here are some more images of the boards with a few components;



The three boards unstacked


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



Drawdio

A finished Drawdio without a printed mount

Since even before I started the designs for the modular robots, I was greatly interested by the original Drawdio circuit concept, that you could use a simple circuit to interact with the surrounding world and for the world to, in turn manipulate the outputs of the circuit.


In this instance, it  the Drawdio is a basic electronic circuit which utilises the use of a 555 timer chip to produce an astable output frequency. The speaker frequency depends upon the resistance of the input circuit, which comprises of the graphite pencil and your body. As the line that you draw gets longer, the input resistance increases, therefore different tones can be heard.




The Drawdio was my very first circuit that I designed in Eagle, previously, I had used the very basic but easy to learn package called Fritzing, however, this provided very few components and little flexibility when it came to board layout. After attending a couple Cambridge PCB Makers sessions (Forum found here, Saar's blog here) I had a much greater (not yet great, just greater) understanding of PCB design software and decided to give Eagle a go. I then designed a derivative of the Drawdio circuit, but it functions the same.


The Schematic

There is no difference between PCB versions 0.1 and 0.2, except the fact that v0.2 had a general track layout clear-up as I got rid of the vias and added two ground planes.

The PCB

I also designed and developed a custom 3D printed mount for the Drawdio circuit board, it was designed in Solidworks and printed with transparent resin on a FORM 1. As you can tell from the following pictures, it took many revisions to achieve the correct tolerances on items such as the PCB and speaker, as they are designed to "clip in". I have not yet completely finished the mount however, as I intend to design a clip mechanism to allow for the CR2032 battery to be easily replaced when it runs out - it currently lasts ~500 hours with a TLC551 timer, (which works down to 1v for a coin battery to be used) so this action would be infrequent.


Top, left to right: PCB mounts v0.1, v0.2, v0.3, v0.4 and v0.5
Bottom, left to right: Speaker mounts v0.1 and v0.2

The bottom mount is the first "final" print, while the top is a more compact version

NOTE: I do not claim any credit for the original Drawdio circuit and the MIT project website can be found here. I did, however design the mount.

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

The Drawdio 3D design files (v0.5) can be downloaded from Dropbox - (STL and Solidworks file types)

Shield template

As previously mentioned, I have used a shield template as a starter board for both the Photovore and motor controller, this ensures that all the board headers line up and connect correctly. I generated the template from the Edgebot board.

The shields are composed of two six pin headers, one with 3 power connections; battery voltage (Typically between 5.6v and 6.4v), a ground connection - this connects to all required grounds on all levels, and a regulated 3.3v output, which is provided by the motor controller main module and can deliver up to 800ma. All other the header pins, nine in total, are used for signal transfers between boards, such as the upper left pins being used for logic interfacing with the Edgebot from the Photovore.


The headers are standard, 6-pin Arduino stackable headers therefore they are breadboard friendly with pin spacing of 0.1". Likewise, I have positioned the headers to be exactly 0.9" apart, thus meaning that you can plug the boards into a breadboard if you desired.



The template schematic connections

The bare template PCB

The latest shield template (v0.1 - works with all current shields) can be downloaded from Dropbox.

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.

Photovore

As I have stated previously, the Photovore circuit is simple in comparision to the Edgebot, therefore it has less components and required no work to make all the parts fit onto the board. Also, I could simply copy the board template over from the Edgebot files, thus causing the two boards to be identical shapes, the same header positioning and ensuring that the two boards would slot together and carry out the modular features, this also provided a starter board to use for future modules.

As you could see from the Photovore circuit in a previous post, it uses a single comparator and a inverter, however, inverters typically come in 14 pin DIP packages as the chips contain six inverters, plus power connections. Therefore I used a dual comparator and used the spare comparator as a signal inverter, thus reducing the parts to a single 8 pin DIP package.


The second revision had a simple layout change and I swapped the LDRs around, as I realised that I (for some reason) had used the principle that the higher the light intensity, the higher the resistance of the LDR, this is, however, false. So by simply swapping the LDRs around it now drives away from the darker LDR and 'into the light'.



The schematic

The PCB

The latest Photovore design files (v0.2) can be downloaded from Dropbox.

Edgebot

I have now finalised the design for the Edgebot schematic and Eagle PCB board, I went through a total of 5 revisions of the board, changing multiple things each time; board size, components, component layout, routing, all to reduce costs of fabrication and increase the ease of building and using the board.

 The main problem that I encountered with the development of the PCB was being able to allow for another board to slot on top, while retaining the current functionality and adding more with the extra board. My first design incorporated a set of headers for the transfer of signals and to stabilise the upper board and a single, two pin male header for power transfer. From my second design onwards I proposed to use a pair of 6 pin Arduino stackable headers, this meant that I could plug multiple boards directly on top of each other (e.g. Photovore, Edgebot, H-bridge) As only 4 pins are used for the Photovore-Edgebot signals (Excluding the two/three power pins) It leaves 5 pins for other signal transfers of future boards.


Another dilemma I faced was how to keep the feature of modularity when it came to inputs/outputs, the first through to fourth designs used screw terminals to connect the external switch input pins and the motor outputs. However, this meant that you could have to use a screwdriver every time you added or took off a board, which would both time consuming and tiresome, especially if you do not have a fine screwdriver to hand. Screw terminals  are relatively large, therefore taking up unnecessary space on the PCB and thus increasing the cost. So I replaced them with right angle headers so that you can simply slot the sensors in and out, if you wanted a more permanent solution, you could also solder the sensor directly into the header PCB holes.


The latest version of the board also uses a trim-pot so that you can change the reverse time delay of one of the motors, the capacitor values were changed accordingly.


The schematic

The PCB

The latest Edgebot design files (v0.5) can be downloaded from Dropbox.

A little background infomation

Over the last few months, I have been developing a series of simple modular electronics kits, with the aim that they could be assembled and then they could simply plug together to form different responses to sensory inputs.

The first two modules that I am creating are originated from BEAM type circuits and they include an Edgebot, a simple robot which reverses and turns when it touches an object, and a Photovore (Literally means “Light-eater”) like logic system, which drives in the direction of the brightest light source.


The Edgebot circuit comprises of a single touch sensor, two RC timers and a small amount of logic. The touch sensor is to be mounted at the front of the robot with an extended arm, the RC circuits are time delays for how long the motors reverse for (One reverses longer than the other in order to turn) and the logic is to process the RC circuits for forward/reverse motions and to allow for the logic expansion brought by the Photovore board.


The Photovore circuit is simple in comparison; it uses a comparator to compare the signals of two LDRs and the output dictates whether or not the right motor should go forward in order to face the more light (The signal for the left motor is inverted)


The final board that is to be designed will a motor controller that is a simple H-Bridge that allows for basic forward/reverse movement of two motors. It is likely that it will also contain a 3.3v voltage regulator to accommodate future expansion boards. (An AVR processor would seem to be a likely candidate)


I hope to send the boards to OSH Park to be fabricated and then (hopefully) have some working prototypes. I will publish images as they become available as well as the all the Eagle schematics, PCB designs and circuit simulation files as the boards become finalised.