Programming issue

thunderace7

New Member
Hi. I am having a bit of a problem programming my latest project. I have a 28x2 running some led units but I am having some issues getting the program to load.
I have a Windows 10 laptop running the latest version of PE6 and an AXE27. When I try to download the program I get an error message saying that the first byte has not been echoed back. The picaxe continues to run its current program as if it hasn't seen the new one trying to download. I've tried several things like reloading PE6, changing COM ports, resetting the picaxe just as the download starts but nothing makes a difference. The program will load eventually but only after 10 or so attempts. The project is built on shipboard so, I suppose, there might be a problem with the download circuit. I'll have a close look at that tomorrow. Once the download starts it always completes ok and the program runs correctly once it has loaded.
Any ideas would be appreciated.
 

Goeytex

Senior Member
From your symptoms, it seems like the AXE027 is having (intermittent) trouble receiving data from the Picaxe.

1) AE027 ground must be common with Picaxe 0V pin.
2) Download circuit wired incorrectly. Remember, the 22K resistor is the only component tied directly to the Picax Serin Pin. The 10K connects to the other side of the 22K and then to 0V(Ground)
3) Remove any devices connected to either Picaxe Serout or Picaxe Serin ( Except for AXE027)
4) Check for voltage at Picaxe V+ Pin.


If you can't find the problem ...Takes a clear closeup photo of the breadboard and post it here. If there is a connection problem someone here should be able to spot it.
 
Last edited:

inglewoodpete

Senior Member
TA7, you mention "shipboard", a name I have not heard of before and google did not help me either. Goey refered to breadboard, so I'll assume it is something similar.

If you are using the square 3.5mm stereo socket on a breadboard, you need to extend the pins as they are intended for use with printed circuit boards.
25214
 

AllyCat

Senior Member
Hi,

I guess the OP means stripboard (sometimes aka "Veroboard") which doesn't usually have Plated Through Holes, so there is the risk of an intermittent connection to the edge of the copper (hole) if the soldering is poor or "forgotten". Also, note that the connections must be to the two "outer" pins (as shown by Pete's two extensions), not to the two switched inner pins.

Otherwise, the most common causes of poor programming are if the (battery) supply is weak or low voltage, or the interface levels are incorrect (e.g. due to a mis-located 10k pulldown resistor).

Cheers, Alan.
 

thunderace7

New Member
Sorry about the confusion, I typed "stripboard" but it was autocorrected and I didn't proof read it properly.
I have had a good look at the circuit today and I can't see anything wrong. I have taken some pictures and will post them when I've resized them.
 

thunderace7

New Member
I suppose there could be an issue with the cable but I don't think so even though I've been using it since 2010. The other thing could be the power supply. It is a new one that I've not used before. Maybe I'll remove the load and try a 2A psu. The one I'm using is a 5v 30A psu.
 

The bear

Senior Member
With due respect, your 'Circuit' would be better with the high tech approach, i.e. pencil & paper.
Good photo's.
 

Technical

Technical Support
Staff member
This type of verification error is nearly always a power supply issue. Use 3xAA cells to give 4.5V and see if it then works reliably.
 

thunderace7

New Member
With due respect, your 'Circuit' would be better with the high tech approach, i.e. pencil & paper.
Good photo's.
Thanks for your comments.
I like to keep records of my projects on the laptop and I find my drawings are not always easy to read. This is not so much a circuit diagram but a stripboard layout from which I build the board.
 

thunderace7

New Member
This type of verification error is nearly always a power supply issue. Use 3xAA cells to give 4.5V and see if it then works reliably.
Thanks for your comments.
I will try another power supply and, if that still doesn't work, the battery pack.
I did consider changing the ceramic capacitor for a polyester one but I'm not sure it would make a difference. Maybe I'll add a bigger capacitor or 2 across the supply lines.
It is switching up to 24 1W leds so that might cause the voltage to fluctuate.
 

AllyCat

Senior Member
Hi,
This is not so much a circuit diagram but a stripboard layout from which I build the board.
Have you tried "Pebble" (from the PICaxe Downloads section)? It can produce a good compromise between Stripboard/Breadboard Layout and Circuit Diagram.
It is switching up to 24 1W leds so that might cause the voltage to fluctuate.
When the PICaxe is being Programmed, all its output pins (except the Programming Output) go to "Tri-State" (high impedance/"floating"), so if they normally drive FETs, then each output/FET Gate should have a Pull-Down resistor (to Earth), to ensure that the FETs are Off. I hate to think what might happen if you have 24 watts of LEDs "randomly" flashing away during programming. ;)

Cheers, Alan.
 

thunderace7

New Member
Hi.
I'll have a look at Pebble, Alan, and see what it does.
I've resolved the problem. It seems that there were 2 issues. I connected my usual power supply but had to remove the ULN chips because the PSU can't take the current. I still had the programming problem. I then added a 100nF polyester capacitor in parallel with the ceramic one and it all worked properly. It seems that ceramic capacitors are not good enough in this application.
I then went back to the original 5v 30A power supply and the problem returned. After a lot of playing around I added a 330mF electrolytic across the power rails and this fixed it.
It seems that my new power unit is not really very good. Maybe it is unrealistic to expect a unit rated at 30A to perform well at 1.5A but I expected it to be better than it is. It has a trim adjuster for the voltage output and I set this to 5.00v with no load. When delivering 1.5A this drops to 4.3v and, apparently, has considerable ripple as well. I'll have to get a scope on it.
With the reduced supply voltage and the loss across the ULN chips there is only about 3.5v applied to the led units. These are designed for 5v so are not really performing to their best and only draw 1.5A in total (I would expect around 6A if working properly).
I'm surprised they light up at all but their colour mixing is really good with quite a pure white.
My thanks to all who gave advice.

Chris.
 

AllyCat

Senior Member
Hi,
Maybe it is unrealistic to expect a unit rated at 30A to perform well at 1.5A but I expected it to be better than it is. It has a trim adjuster for the voltage output and I set this to 5.00v with no load. ......... 6A if working properly ......
I would expect a 30A supply to work moderately well at (say) 1.5 Amps, but not necessarily at "No Load", nor the few mA that a PICaxe will draw during Programming. So I think the preset shoud be set up (and the PSU run at all times) with at least a modest dummy load (perhaps an Amp).

The ULN2003 chip has internal input pull-down resistors, so its Outputs all should be OFF when Programming, but I think you may be rather optimistic about the performance of these ULN devices: Firstly, because of their Darlington (cascaded Bipolar Transistors) Output stage, they will typically drop around 1 volt (the specification says up to 1.5 volts) even at modest currents. Also, the maximum specified dc current with all 7 outputs active is only about 180 mA for each stage. Thus the maximum total output per package is about 1.25 A, and even this implies that it will be dissipating over a watt. The DIP package is rated at 70 degrees C rise per watt. :(

Since you mention their colour balance, are these "intelligent" LEDs, and if so, why do you need to switch their (total) current via the Darlington drivers?

Cheers, Alan.
 

thunderace7

New Member
Hi, Alan.
I think you are right in saying I'm being optimistic about the ULNs but I expected a 1v drop at the output. As to the power dissipation, it is probably best that the circuit is performing sub-optimally! The low voltage output means that the LEDs are not reaching anything like full output (all 24 of them are only drawing a total of 1.5 amps) and this is distributed across 2 ULN2803 chips. Use of the 2803s makes your calculations above even worse as there are 8 circuits per chip instead of 7.
The LEDs are not intelligent. They are something my son gave me and are intended to be used as decoration on a hot tub. They consist of a white plastic box with a cable gland that holds a 5mm fibre optic light pipe and, when fitted, the fibre optic is positioned in front of the RGB LED. The only other components in the box are 3 high wattage resistors. The units are designed to plug in to the illumination control circuit of the hot tub and so have no controller with them. Hence why I'm playing around with the Picaxe. I am only trying to see what they are capable of and (luckily) this is only a test circuit. When I actually find a use for them I will have to be more careful with power dissipation limits.
I will see if I can take a photo of them for you to see.

Chris.
 
Top