Download Utility

bgrabowski

Senior Member
I am trying to design a piece of kit for my students to use when programming Picaxes for solderless breadboard use.

It comprises: a 3xAA cell supply; zero insertion force (ZIF) sockets for 8-pin, 18-pin, 28-pin and 40-pin Picaxes; a stereo jack socket with the download resisitors; a 4k7 pullup to the reset pins and a reset button.

Ideally I would like to build in some protection, or if that is not possible an alarm, should the Picaxe be inserted in the socket the wrong way round. Can anyone suggest a suitable arrangement?
 

Jeremy Leach

Senior Member
I would say that it's extremely difficult to have a circuit that detects if the ICs are inserted the wrong way round - but will probably be proved wrong !

Re protection - I think you would need to do an analysis of the pin mappings when each type of PICAXE is inserted the wrong way round, then address any trouble spots individually.

Edited by - jeremy leach on 01/08/2006 13:59:45
 

BeanieBots

Moderator
There are many techniques that can be used but your biggest issue is the power supply. Only having 4.5v available with limited power will be difficult.
I think the best you can hope for is 'damage limitation'.
If you need to stick with just 3 cells, then I would feed the supply into a low dropout 3.3v regulator. If the regulator is supplied via a suitable resistor, then current will be limited by the R and thus prevent destruction of wrongly oriented chip. The value of R will need to be low enough to keep the input to the regulator above its minimum input voltage but high enough to prevent excessive current. 100R sounds like a good starting point if the circuit has no loads such as LEDs.
A comparitor (or 08M) looking at the regulator input voltage could be used to sound a buzzer to indicate an over current situation.

A better way of course is not to power up the chip until it has been checked for orientation. The most common way of doing this is to look for a 'pin impedance signature' but this is not a simple task and would require a considerable amount of extra circuitry. I'm sure the resistor/regulator method will do what you require.
 

Michael 2727

Senior Member
Mark each chip and socket with light or
white nail varnish, it doesn't come off easily. If the marks don't line up it's inserted incorrectly.
I was goint to suggest an over current LED.
But I just inserted an 08M into an AXE092
in reverse to see how long it took to get
hot ( I did this once or twice accidently
and recall the chip got warm but no harm
was done)
To my surprise not only did the chip <b>not </b> heat up it ran the program inside it then
stopped where it was designed to. It even played the tune and flashed the LEDs,
probably not in the original order designed.
 

hippy

Technical Support
Staff member
I think you could ultimately be on a hiding to nowhere. If you protect the ZIF Programmer, they are still just as likely to insert the chips upside down when back at the breadboard or make some wiring error which blows the chip.

The most obvious solution would seem to be to super-glue the PICAXe's to the breadboard along with a download socket and power leads, on the principal if they can't change anything they can't go wrong.

An alternative would be to mount the PICAXE's on PCB's with some interconnect mechanism to physically prevent incorrect insertion.

If you do want to just protect the ZIF Programmer, current limiting seems to be the key, and easier to do if you are just seeking to protect a single unit. I use my Lab PSU limited to 10mA when playing with PICmicro's and frequently moving chips between board and programmer, and that seems to have saved me the few times I've made the mistake. You could be able to build something really simple and cheap using an LM317 and a resistor.

There should be some easyish way to add over-current detect, and you can rely on the clamp diodes giving a two-diode in series short from +V to 0V when the wrong way round. You could wire a PICAXE up via relays, in active configuration powered as normal, in the default state, as the bottom end of a potential divider read by READADC of another PICAXE or something like that. Measure its 'resistance' and switch to powered if okay. You'll probably want to isolate both RX and TX of the download link; anything feeding into the PICAXE will cause 'virtual power rails' to be created internally.

Making sure the notched end of the chip is clearly marked is the most important thing I would say, along with insisting all chips are inserted in the breadboard with notch to top. Even then I've made the occasional stupid mistake.

I guess that these days a bit of 'social engineering' with a piece of 4&quot;x4&quot; isn't acceptable :)
 

BeanieBots

Moderator
I can assure you that a chip the wrong way round WILL NOT RUN and will get hot if enough current is available.
The current drawn will be similar to that drawn by a diode placed directly across the supply.
I've connected the 08 project board the wrong way once and lived to tell the tale. The only reason it survived was because the supply was partially discharged batteries but it did get too hot to touch within a few seconds. Those who use PC power supplies would have instant smoke and probably some very fast shrapnel.
 

Dippy

Moderator
I think a bit of cranial engineering with 4x2 is fine hippy. 4 x 4 is a little heavy to swing with speed.
Obviously from the safety point of view all splinters should be removed first.
 

bgrabowski

Senior Member
Thank you for your suggestions. Current limiting resistance seems to be feasible. I have just tried downloading to a 28X with various resistors between it and the supply. It still downloads with 1500 Ohms, suggesting as little as 3mA is needed.
 

Michael 2727

Senior Member
Beanie-B, I don't want to sound smart or anything,
but my chip is working inserted backwards.
I tried it several times forwards and backwards.
Admitedly the sound and tune is about 1/4 normal level.
<b> I don't recommend this practice </b>
but for the sake of interest I was prepared to sacrafice
a poor beat up old 08M chip I had.
Using a Schools Experimenter - AXE092, 08M
chip.
4.32V no load, 4.29V running in reverse.
3 x AA Cell supply.
 

Mycroft2152

Senior Member
Dippy, I always heard the stories the things were &quot;backwards&quot; down under. summer weather during December, water running counter clockwise, etc. We call 'em two by fours, north of the equator. they still do a great job convincing though.

On a serious note, adding a resistor to limit the current to the 3 milliamps that will allo downloads, will severely limit what else is added to the circuit. LEDs are 5-10 ma each, motors are 50 milliamps etc.

Myc
 

hippy

Technical Support
Staff member
There's something very odd going on in your setup Michael, because not only should there be a two-diode short created from +V to 0V through every I/O leg but the electronics would be running on an inverted supply.

The only thing I can think is that you have some other input which is feeding in a voltage ( PC serial ? ) which is creating some virtual power rails of enough voltage to make the chip work. Not sure how though, and it would suggest that at least some diodes have burnt themselves out of circuit and have cleared the short.<code><pre><font size=2 face='Courier'> Wrong way round PICAXE
.--------------------.
+V &gt;----|----.--- 0V |
| _|_ |
| _\./_ |
| | |
I/O ---|----{ |
| _|_ |
| _\./_ |
| | |
0V &gt;----|----^--- +V |
`--------------------' </font></pre></code>
 

hippy

Technical Support
Staff member
Mystery solved; should have read exactly what was written a little more carefully - <i>&quot;my chip is working inserted backwards </i> . That's not the same as reversing the power supply ...<code><pre><font size=2 face='Courier'> .--------. .--------.
+V &gt;-------| +V 0V |---. +V &gt;-------| X2 I3 |---.
| SI O0 | | | X1 X4 | |
| X4 X1 | | | O0 SI | |
| I3 X2 | | | 0V +V | |
`--------' | `--------' |
0V &lt;--------------------' 0V &lt;--------------------' </font></pre></code> Because of the diode clamps within the chip you are effectively feeding +V into the chip's +V via a diode drop and taking 0V back out through another. Internally the chip is still running on (0V+0.6) / (V-0.6) rails. Interaction with the +V Leg is what is giving some sound out.

You were quite lucky because that configuration can 'explode'. A program which turns Pin 2 (X2) into an output low pulls +V to 0V and can cause the magic smoke to escape.

Had you not achieved that though I'd not have realised I was making the incorrect asumption that rotating the chip is the same as reversing the supply. I was probably thinking 74xx devices where that is the same because power is on diagonally opposed pins.

Edited by - hippy on 01/08/2006 17:03:05

Edited by - hippy on 01/08/2006 17:29:20
 

bgrabowski

Senior Member
Mycroft - Nothing else draws power, it is just a download facility. The Picaxes will be removed once programmed and used in students' breadboard circuits.
 

Michael 2727

Senior Member
I'm not out to prove a point, it's late and I'm too tired for that.
But this is result I got.
I tried 2 other different 08Ms, 3 in total.
Standard Schools experimenter PCB, AXE092.
Switch 1 thru 4 engaged to the LEDs, piezo.
No Download cable connected at the time.
3 x AA Cells z/carbon slightly used @ 4.3V
None of the 3 chips got even slightly warm,
and as far as I could tell were running their
3 different programs, IR Remote, DS18B20, and dual LDR read ADC.
Chips were all reversed in the socket.
I thought the chips would get hot also, I'm just telling the results I got, I was also
surprised at the result.
Anyway it's late I'm OFF.

 

Mycroft2152

Senior Member
BG, missed that point. Hmm, I like the immediacy of having the PICAXE connected to the computer to &quot;fix&quot; and try out the programs in steps, as well as using the DEBUG function. But if you are limited on the number of computers availible, it is a good compromise.

You may want to include a battery power switch and power LED to be able to reset the 08's.

Myc
 

hippy

Technical Support
Staff member
That's a good point Myc. I couldn't live without SERTXD, SEROUT and DEBUG.

Professionally speaking, there is a good case to be made for not coding until the design is perfect and proven on paper and then it's write once and it works as expected first time. Reality is usually somehat different, and I am a firm believer in the iterative &quot;code, test, debug, repeat&quot; camp.

I'm intrigued to know what students do when they need to debug a program in such situations ?
 

bgrabowski

Senior Member
The older students (15+) do indeed include download circuits in their projects so they can debug.

The younger pupils will mainly use this download device to load Picaxes with pre-written programmes for a range of input and output interfacing exercises. They mainly use the 08M and 18X, I included the 28 and 40 pin ZIFs to cover the full range of Picaxes we stock.
 

BeanieBots

Moderator
Michael 2727, you are correct. It IS possible for an 08/M to run with the chip reversed in the socket but as pointed out by Hippy, only under certain conditions.
Don't try it with an 18X though.
It is NOT possible with reversed power rails.
 

Rickharris

Senior Member
Let me share my school experience.

Students use a bread board/battery/picaxe PCB for experiments. What they learn is saved and may later be used in their practial project which is to make a robot. The hardware is fixed 08 and L293 with screw connectors for Motor and sensor (micro switch) The PCB has a download socket because the extra cost was minimal and we found thwat we had abigger problem with students bending legs in the 08.

They are quick to tell you it isn't working although I make them bring me the PCB to check ready for download - battery connected correctly, motor/sensor correct, soldering good.

Because of time constraints students do not make the PCB they are pre made, because of the screw connectors they are easyt to recycle if students decide not to pay for them.

Problems we see - batteries not in correctly, flat batteries, miss connected, IC pin not in socket (despite them not supposed to remove them), poor soldering especially on motor connections, students who can not type and check what they do. Otherwise pretty fool proof.

At least as accurate as their measuring and ability to cut a straight line. :)
 

manuka

Senior Member
Ahem- considered good old paper &amp; glue appropriate technology labelling? As endlessly mentioned,neat Picaxe labels reassure on both correct orientation &amp; device ID. No joke-students may think DIP8 ICs are just 555s!
See (yet again)=&gt; www.picaxe.orcon.net.nz/bread08.jpg <A href='http://www.picaxe.orcon.net.nz/bread08.jpg ' Target=_Blank>External Web Link</a>
 

Technical

Technical Support
Staff member
Bg - you are basically describing an existing kit - AXE080

<A href='http://194.201.138.187/epages/Store.storefront/?ObjectPath=/Shops/Store.TechSupplies/Products/AXE080' Target=_Blank>External Web Link</a>

<A href='http://www.rev-ed.co.uk/docs/axe080.pdf' Target=_Blank>External Web Link</a>
 

bgrabowski

Senior Member
Thank you technical.

Stan - I take your point about labelling. What I originally started this thread for was to seek a set-up which would allow the Picaxe to survive when placed the wrong way round. I still think this is relevant even with labelled Picaxes as students do not always read labels.
 
Top