Let's Make Robots!

The Picaxe Support Chips - What are they for?


There are various different chips which are commonly used with the Picaxe chip. Here I attempt to explain what each one does, where it goes and why you might care.

Most of this has already been mentioned, but I thought I would collect the information together here and add a little more detail where I can. I apologise in advance for the wikipedia scholarship that follows, so please let me know what I got wrong and I'll try and update this page to match.

It seems almost obligatory to preface every post offering advice, with the statement 'I am no expert but...' and to put this in perspective, I've never even touched the chips I'm about to describe (you can read why here). What I have done, is spent a little time reading up about what they are and what they do.


The Darlington Driver

chip_darlington.png

What does it do?

When you but the Pixace starter kit you get one of these for free. This chip allows the small output signal of a chip to switch on and off a large current. This allows the small output from the chip to control large devices such as a motor.

How does it do it?

A Darlington Driver is an arrangement of two transistors that allows a small signal strength current to switch a larger current. This is already what transistors basically do, but in this arrangement the effect is amplified. Transistors have three legs and operate a lot like a switch which you can turn on or off by sending a high or low signal to the 'base' leg. When there is sufficient current to this base leg then the transistor opens and allows current to flow from the 'collector' leg to the 'emitter' leg. In this way a transistor can use a smaller current to allow a larger one to flow.

In a Darlington Driver this effect is used twice by taking the output (from the emitter leg) of the first transistor and connecting it to the signal listening leg (the base leg) of another. That way a small input current is changed into a medium input current for the second transistor, which allows it to switch a large current through itself.

Although you could create this circuit for yourself using transistors, a conveniently packaged chip is a lot simpler, and can also provide extra features such as protection for feedback from the device. A much more thorough discussion with diagrams can be found here.

How does it integrate with the project board?

If you look at the chip you will notice that it has 9 legs on each side to drive 8 channels. Looking at Fritsl's excellent guide to the board you'll notice that the bottom right leg of this chip is connected to the V2 voltage on the board. This is the higher power that we are switching with the driver and theoretically could be much larger than the 5V input V1.


L293D - Motor Driver

chip_L293D.png

What does it do?

The motor driver circuit allows you to change two signal lines into control for a single motor which can send it backwards and forwards. Unless your robot does not know the meaning of retreat, this is probably a handy thing to do. Without this, naively connecting a single output to a motor would only allow you to go forward or stop.

How does it do it?

I can't claim to understand the precise workings of this chip but I think the general theory is pretty straight forward. Each of the signal level inputs in a pair (for one motor) are connected to amplifiers which perform the same job as the Darlington Driver above, stepping up the output from a small input. The connection of these is such that the main output of each is connected to a different terminal on the motor. When no signal is provided to the amplifier it is able to act as a 'sink' (a route back to ground or 0V). This means that adding a high signal to one input will cause the current to flow in one direction through the motor, and sending a high signal to the other will do the reverse causing the motor to spin backwards or forwards. Lord knows what happens if you turn on both at once.

This arrangement is very similar to an arrangement of switches or relays (switches controlled by an electric current) known as an H-Bridge, which is much easier to look at and understand. The H-Bridge also has an interesting ability to short circuit the terminals of the motor whilst isolating it from the power supply. This uses the generator properties of the motor to create a current which opposes it's direction, causing the motor to brake.

How does it integrate with the project board?

There is a specific DIP socket for a motor driver on the project board. The chip, or a pin compatible alternative can be dropped in here. The board is wired up such that outputs 0-3 will now control a the A and B marked areas on the board as described. If you are planning on controlling a million output devices you may wish to consider hacking a servo instead, as this only uses one output for forward and backward control.


330R DIL Resistor

chip_dil_resistor.png

What does it do?

If you buy the servo upgrade pack for the Picaxe (i.e. you hate money) you'll get what looks like a little chip to plonk in place of the Darlington Driver. This chip is in fact a series of 330 Ohm resistors linked across like the legs of a ladder. This drops the current on the output side to allow you to connect passive devices without worry of frying the Picaxe chip.

How does it do it?

Well... it's a resistor. You'll notice the 330 Ohm value batted about quite a lot in the Picaxe documentation, but where does it come from? If you read the Picaxe introductory manual, you'll see buried in there somewhere that the maximum current the output pins can sink or source is 20mA, or 0.02A. Not a lot, so applying a bit of basic electronics and assuming nothing else is in the circuit, how much voltage is that?

    V = IR
V = 0.02 x 330 = 6.6V

Knowing this is handy for a number of reasons. If you are hooking things up to the same battery pack for V1 and V2, then anything you add in here is only going to increase the resistance and so drop the current. This means you can hook up what you like without worrying about the chip as long as it doesn't generate current for itself. If you are planning on hooking up servos etc. using a separate battery pack for the V2, then don't go above 6V with these resistors or you could start stressing the chip. If you are going to hook it up to a petrol generator to power your space heater, you are going to need a bigger resistor (and professional help).

How does it integrate with the project board?

This resistor set sits in the same socket as the Darlington Driver chip, so you'll have to pull that out to use it. It doesn't need the voltage feed in the last pin position, so it sits across the output pins 0-8 leaving two clear beneath. This allows you to use servos (which only require a small pulse signal) or LED's etc. on the normal output connector pins without worrying about frying the chip.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

It will be great help - I allready learned a lot!

(And don´t be sorry - it is the whole deal: You update, you get the frontpage! that´s how it works - be proud :) 

/ Fritsl

Sweet thanks mate, was wondering what all these did

How brilliant!!

(I am linking to this from the "first robot-tutorial" now :) 

/ Fritsl