Can't program 18X

axeman22

Member
I have an 18X running of 4.23 Vdc - everything works fine. In production I'm going to use a 12Vdc source so I have a Reg which reliably gives me 5.041Vdc to the circuit.

so when I go to program in this second config (with the reg) it will not program, the software says the picaxe is not responding, saying voltage might be too high etc.

if I was running 6.5 or 7V I could understand.. but at 5.041 I think I should be fine still?
- http://www.hippy.freeserve.co.uk/picaxeq3.htm#what_is_the_picaxe_operating_voltage

the supply is quite clean I feel, it's from a Dick Smith Q1760 Power Supply - I would think that would have caps across the rails etc to filter - my point being that if I add a cap across the output of the Reg I'm not thinking it would do a lot. I must admit, I often don't put caps in circuits where they are shown, perhaps I'm underestimating the value of the filtering from Caps and this is a practical ramification?
 

Janne

Senior Member
The problem is most likely in your download circuit, if programming another board works. The lack of cap is not good practice, but i don't think it as a likely candinate for fault at this poin.

Can you post a schematic, and possibly a picture of your offending circuit?
 

cactusface

Senior Member
Hi Axeman,
Have you checked the download circuit?? I made that mistake too. The 10 and 22K resistors still need to be in there, with none of the programming pins floating. Even a board just running the circuit needs them, The reg should be fine at 5.05 or so, adding extra caps does no harm but don't think its the problem, here.. Let's hear how you go.
Regards
Mel
 

axeman22

Member
Interesting... I just thought, I have a 12V Battery.. that will be smooth as silk and negate the need for any caps - as it's totally smooth. Put that as input to the reg with circuit voltage being 5.002Vdc - still no joy!

EDIT : ok. before posting, I thought, I better really do my homework this time! So I grabbed a cap - 470uF Elec and put it across the circuit rails. it works a treat now. I can also use my power supply instead of the 12V batt - I cranked the power supply output(input to the Reg) up to 18Vdc and still worked fine, can download, picaxe runs all ok etc.

I notice that the reg holds the circuit voltage at 4.994 V with the cap and without the cap at about 5.022.

I think this is a function more of the Reg Needing a Cap to settle it down as opposed to the voltage being too high or noise from the power supply.

this is new learning to me, I never use Caps with the regs I use, I think from now on I will always whack a 470uF Cap across the rails on my PICAXE cct's - only good can come from it I'm thinking.

Pics for this interested (Cap missing from the pics, but it is right beside the Reg[LP2954AIT])



 

axeman22

Member
Hi Axeman,
Have you checked the download circuit?? I made that mistake too. The 10 and 22K resistors still need to be in there, with none of the programming pins floating. Even a board just running the circuit needs them, The reg should be fine at 5.05 or so, adding extra caps does no harm but don't think its the problem, here.. Let's hear how you go.
Regards
Mel
btw - the resistors are always in circuit. Though, I seem to recall reading that they can be removed when not downloading a program etc. I'll check that out another day!
 

boriz

Senior Member
If you were using an oscilloscope instead of a DMM you would probably see what’s going on. The DMM can only give you an average reading when there is any sort of noise/ripple. And that’s very likely what you’ll get, even using a battery, because of the various internal oscillating/switching operations in the Picaxe and on the serial line. A Picaxe is a complex load.
 

westaust55

Moderator
If you have a look at the circuit diagram in PICAXE Manual 1 (currently V6.9) on page 24 you will see that Rev Ed shows a 100 micro Farad electro type cap as well as a 100 nano farad ceramic type across the regulator output.

Voltage regulator datasheets typically state that a ceramic type cap is required across the output to prevent regulator oscillation and thus provide stability.
A few datasheets also recommend a 22 micro Farad Tantalum cap as a form of energy reservoir.

By default I usually do add a Tantalum cap of the order of 22 micro Farad across the output of voltage regulators.
Then add a few more 100 nF ceramic or poly types around the circuit.
An old rule of thumb was one 100nF ceramic per IC chip – though admit I often do not use that many myself.
 

BCJKiwi

Senior Member
Please read the data sheet FOR THE REGULATOR BEING USED.

This will clearly show when, where, and what caps to use AS A MINIMUM. It will vary with different regs and between manufacturers.

Running a Reg with no Caps will almost always be unsatisfactory as most require one on the output to stabilise the regulator.

An input cap may or may not be required and usually is there to stabilise the supply to the reg.
 

Dippy

Moderator
I'll second (third?) that.

With regards to capacitors on regulators, you haven't discovered anything new Axeman ;)

The information for all this is within your reach....
I won't say RTFM as that sounds cheeky.

Hopefully, you'll investigate it (as in 'read up') a little further. Then you'll know the ballparks for type, sizes and position of capacitors. And then you'll know the potential pitfalls of grabbing the first capacitor in the drawer too.
Anyway, well done and lesson learnt.

Tattoo this on your arm; "Read the Data Sheet" :)
 

BeanieBots

Moderator
This keeps on comming up and is relevant in several threads which are still active now.
A regulator is one small part of a power supply, it is NOT a complete power supply.
 

Dippy

Moderator
Yes and I don't understand how people get a diagram showing how to wire up a regulator but completely ignore the capacitor aspect. Are they just looking at catalogue pinout pictures?

Apparently opening the Manual 1 (Getting Started) and searching on "regulator" or "power supply" is impossible so I think BB should do a tutorial :)
 

Goeytex

Senior Member
If the micro has been programmed in the past and Serrxd was used, or possibly a very long pause command, it might mean that you need to hold the reset down when programming until the message reads "connecting to hardware" .... Then release the reset as soon as you see that message.

If you have a battery as the source for the regulator then the problem is not caused by noise or ripple. All the capacitors in the world will not help in that case. It is something else.

I am almost color blind but I am looking at the resistors on Pin 3 and I don't see any orange.
It may be me, but are you sure those are 10K and 22 K ?



Goey
 
Last edited:

MartinM57

Moderator
A 7805 with no capacitors can put a several Mhz oscillation on Vout - google for "7805 oscillation" or see http://forum.allaboutcircuits.com/showthread.php?t=31651 - even when powered from a good DC source.

Your slight DMM reading difference could be picking that up - only a scope would tell for sure.

There is also an urban myth that you need to draw a minimum current from Vout to get good smooth regulation - your circuit could be pulling virtually nothing as it is so simple and with low consumption components. You could consider a 'power-on' LED or a 1K across the regulator output to draw 5mA quiescent current.
 

slimplynth

Senior Member
Was originally looking at the resistor colour codes, when I noticed in MS Paint, holes A7 - A9 show signs of small fire damage and also the GND wire insulation looks a little crusty (suspect)... From the thread title I'm wondering if the possible scorch marks and inability to program could be linked? In your original post you said that you had it running fine @ 4.23V is this still the case? have you tried same/different 18X @ 4.23V

Regards

S
 

hippy

Ex-Staff (retired)
If you have a battery as the source for the regulator then the problem is not caused by noise or ripple.
Not saying you're wrong, but I'm not so sure. It seems to me a number of the odd Reset issues have occurred with SLA batteries and I'm wondering if they are more prone to 'wireless interference' than other batteries or something like that. It's more a thought than anything else; using SLA is the only common denominator I can see in all those cases.
 

Goeytex

Senior Member
I'm not saying "no capacitors" as it is always appropriate to follow manufacturers recommendations. We just gotta get folks trained to read an follow datasheets. No ?

But given a stable DC supply like an SLA there should be no supply generated ripple to filter out so stuffing caps all over the board will buy you very little except possibly a nice inrush of current at power up. Manufacturer's recommendations should suffice unless there is evidence to suggest other wise.

I like to deal in what is "most likely" more so than in rare and seldom encounterd
anomolies that "might be possible". I prefer to save those until after the more likely stuff has been covered .

What is "most likely" in Axe's situation ?
 

MartinM57

Moderator
I'm sure we're on the same page, regarding caps and data sheets, but you forced me to do a tea break experiment :D

Plain 7805 on breadboard, no caps in sight, open circuit output.

~12v SLA supply
- attach DMM (only) to output - DMM shows 5.04V
- attach scope probe (only) to output - no ripple observed
- attach DMM and scope to output - no ripple on scope - DMM shows 5.04V

~12v bench supply
- attach DMM (only) to output - DMM shows 5.04V
- attach scope probe (only) to output - no ripple
- attach DMM and scope to output - 440mv p-p 8.6Mhz ripple on top of 5v output on scope - DMM shows 4.88V
...so then attach 4u7 tantalum to output...
- attach DMM (only) to output - DMM shows 5.04V
- attach scope probe (only) to output - no ripple
- attach DMM and scope to output - no ripple on scope - DMM shows 5.04V

Pick the bones out of that, as they say :)
 
Last edited:

axeman22

Member
Wow.. quite a few comments..

Ok, my 2 cents worth..

I'm happy that it is all working fine now. I think really the culprit was not having any Cap on the reg output. I probably went overkill with a 470uF Elec Cap but it is working fine and this is just a experimentation board.

There are no scorch marks on the ground wire or bread board - this is gold texta :)

I think reading datasheets is a good idea, but learning to read them is an art also. it's like when you teach people Unix - just check the man pages, it's all there.. which it is, but knowing how to read them is an art also.

I think at the end of the day it's good to be playing, learning and doing.. if someone wants to pull you up and say RTFM silly.. well that's fine, and probably appropriate, par for the course. I have known people who RTFM all day, have a ton of theoretical knowledge but are practically useless, then I've also known people that know you connect red to red and black to black, but have no idea of why.. the considered answer lies somewhere in the middle for my mind :)
 

BeanieBots

Moderator
Picking the bones out.....

I agree that I think we are all on the same page about caps.
An SLA battery is unlikely to generate much noise but both the regulator (yes, even linear ones) can and so can the PICAXE. With no caps, this noise can then be present on the supply. That's why they are called decoupling caps. They decouple.
Micros generate noise, regulators REQUIRE caps. The cap is just as mauch a part of the regulator function as it's ouptut transistor. (most regs, not ALL before anyone posts a link to one that doesn't require them).

Applying a DMM and/or scope probe can add enough capacitance to stop an oscillating regulator.

So, just fit the damn caps. At least that eliminates the most common cause of problems.
 

MartinM57

Moderator
I think reading datasheets is a good idea, but learning to read them is an art also. it's like when you teach people Unix - just check the man pages, it's all there.. which it is, but knowing how to read them is an art also.
Excellent point that I fully agree with - and some data sheets are more impenetrable than others.

It gets better with experience and passing years I can assure you :)
 

boriz

Senior Member
Main problem with datasheets is terminology. When I was learning (not that I’ve stopped!), I had no idea, for example, what Vbe(sat) meant, though I had already observed it experimentally. Same with many other inexplicable acronyms describing features of which I already had some grasp.

Can’t expect every datasheet to come with a Glossary though. I guess it’s just the nature of engineering.
 

BeanieBots

Moderator
You don't need to know them all. A little common sense goes a long way.
Once a few have been learned, the rest become obvious.

eg
Vbe The base emitter voltage (plus the fact that you are looking at a bipolar datasheet)

So, one day you come across Vgs and you don't have a clue... really??
Well the units are in volts, the "V" at the beginning is a big clue and surprise surprise we are looking at a FET datasheet. Let's think, maybe it could be the voltage between gate and source ???

Datasheets do follow a convention and you soon get to know it.
What you do with that information is another story.
 
Top