AXE027 - Bain of my life

Steve2381

Senior Member
Now deep breath... lets not rant...

I have had to finally abandon my Picaxe. I just cannot justify the maddening amount of time I spend faffing around with drivers trying to get my computer to see the IC's.
Again, this morning at work, the latest programming software was showing the device on the left hand side of the screen, and all was well in device manager... yet it threw up comm port unavailable when I tried to uplaod - no matter how many re-installed, port changes etc we tried.

Tested the lead - all fine.

Very simple code, uploading to an 08m2 (and we tried numerous chips)... via an Axe027 to an Axe091 board (I think that is the number of the dev board).

I have 2x Axe027 leads, and I get this issue on a total of 5 different laptops and PC's. I had to give up in the end and go home to grab some Arduino mini pro's - bang, code written and uploaded in 20 minutes.

I just don't understand why these chips can be so problematic when it comes to the drivers. Even my shiney new 3k Asus laptop cannot deal with the drivers and I have to constantly unplug the programming lead, delete the drivers, re-install the drivers, reboot the Picaxe programmer...

Maddening :rolleyes:
 

hippy

Technical Support
Staff member
I just don't understand why these chips can be so problematic when it comes to the drivers.
They usually are not. That you are seeing so many issues across so many computers does suggest that it might be something you are doing, the way you are working, which may be causing the issues or leading to seeing more issues than others do.

I don't mean that in a blaming way, "it's your fault!", but I don't see any level of complaints which indicates a more systemic problem. Most people don't seem to have any problems at all, or only an occasional few. Most 're-installed the drivers' issues turn out to be new users who hadn't appreciated that "hardware not found" was the PICAXE not responding, not anything wrong with the drivers, cable or anything else. Most "can't download", "hardware not found" turns out to be the need of Hard Reset.

And that's not to pretend you aren't having real and frustrating problems; you obviously are. The hard part is understanding why, what the cause is, why it seems to be affecting you more than others. If we can solve the issue, even identify its cause, we would like to.

The key seems to be in the port becoming unavailable, and the solution likely rests on figuring out why that is happening. Uninstalling and reinstalling the drivers probably isn't the fix, and is probably only compounding the frustration.

I am not sure how best to resolve the issue. We do have the means to remotely connect to a user's computer so we can watch what is happening and see what's going on and could perhaps see what the cause is, determine what is happening and why. That may be one option.

If you can detail any 'I do this, then this, and then that, and 'bang' it's gone!" process which leads to the problem, that would help. Just being able to detail that may be enough for us and other members to analyse.
 

Steve2381

Senior Member
Hi Hippy
I have been using Picaxe for a long time. Its the only platform I have issues with uploading (apart from maybe the odd Chinese Mini Pro).

If It was on a single PC, then I could understand there could be issues with that version of windows.... but it fails regularly (as in every time I use it) on my personal Asus laptop, my workshop Sony Vaio laptop, my office HP PC, my work Asus PC and my work HP laptop.
Rolled back drivers, rolled back compliers, tried latest versions... nope.

Its always a port issue.
I usually use the Axe091, but also build projects with their own 22k+10k programming port incorporated.
I never use the serial pins for my projects, as I know that can lead to problems (yes, I know you can disconnect them in code). I also ensure the serial in has the correct resistors attached and not left floating.

I end up changing the Axe027 leads between USB ports over and over. Uninstall the device in device manager, plug it back in... it finds it, but fails to load the driver.... I manually add the driver and then it might work - for a single upload. Then 2 minutes later it will fail to find the comm port again and the whole process starts again.

I don't understand how the complier can show me the port, say all is happy, come back with a pass test (shorting the pins on the Axe027.... and then say 'nope' when you try to upload.

I work in a design workshop building special effects, and we are always up against it time wise. Today I spent hours trying to get my 30 lines of code into an 08m2 and everyone was waiting on me.
I know it sounds like user error.... but I don't count myself as stupid. I am pretty knowledgable around computers, and I just cannot figure out why it has so many issues.
 

rq3

Senior Member
Steve, I feel your pain. I sell a product with an embedded Picaxe, and for years used a jury rigged rat's nest to program the finished boards. The female socket on the rat's nest that the Axe027 plugged in to was iffy, and I knew it. Sometimes I would have to rotate and scrub the connection dozens of times before I got a successful download to the Picaxe. The errors could be anywhere from "Comm Port Not Found" to... whatever. Of course, a loop back test always passed if I was clipping direct to the Axe027 male pin (tip, sleeve,ring).

I finally broke down and built a sexy programming box, with a gold plated receptacle for the Axe027 male connector, a power switch, a programming button (both LED illuminated), a speaker, and a Vishay knob-pot for variable ADC inputs.

I've never had an issue since, and I use it across computers with several versions of Windows operating systems.
 

Hemi345

Senior Member
What it sounds like to me is other software you have installed is tying up the port that is also common across all you PCs. Something that may be running in the background at startup. I know how maddening a problem like this can. I'd take one of your computers and do a factory reset on it to get it back to a fresh install. Windows 10 has this feature builtin. Install the AXE027 first, then install PE6. Nothing else. If you still have problems, then maybe the cable is faulty. If all works fine, then start installing software and testing after each one till you find the culprit.
 

Hemi345

Senior Member
Along the same lines of rq3, I dont use the stereo jack in any of my projects. I use a 3 pin polarized header on the PCB and matching cable ever since I started with PICAXE (when I had a serial port on the computer's motherboard). When I got an AXE027, I fashioned a female stereo socket to connect the 3 pin housing and leave that always on the cable.
 

inglewoodpete

Senior Member
I can understand your frustration with the AXE027 interface. It is annoying when you spend as much time maintaining a tool as you do actually using it for its intended purpose.

My experience with the AXE027 has been almost entirely positive. The drivers have been loaded only once on both my laptop and desktop PCs, now dating back several years.

As others have mentioned, the 3.5mm stereo socket is bulky: often it is the largest component of my PCBs. I have mounted the stereo socket vertically on a small piece of stripboard in a few projects. However, my plug/socket of choice is more often a 3pin x 0.1" polarised header, usually with 90 degree pins but bent slightly to more like 120 deg. This allows the socket to reach over the programming resistors to reduce the space requirement and allow the whole board to fit in a smaller enclosure.
 

Steve2381

Senior Member
I already use a header for my programming on my pcbs... I don't like the jack socket.
We always use quality parts. Our Farnell bill last month was 24k, and RS was 27k. We don't skimp (you can't in this business and you always need the parts yesterday).
These computers I have are a mix of Win 7 and Win 10. My Asus is brand spanking new. Certainly not going through the grief of a re-installed Windows (and work would not allow that anyway).
I can't think of any software that is 'common' to all PC's... therefore causing the issue.

What's in the Axe lead? Is it a simple lead or does it contain a pcb in the USB plug?
I have 4x Axe leads now kicking around.
Hmm
 

bfgstew

Senior Member
I would be suspicious of the works network denying access to the Picaxe.
I had similar issues with an install at work, and getting the 'IT' guys to allow it was just not worth it. Used my own laptop with clean install with no interference with work side of things and never had a problem since.
Just my thoughts and maybe way wide of the mark concerning your work set up!
 

hippy

Technical Support
Staff member
What's in the Axe lead? Is it a simple lead or does it contain a pcb in the USB plug?
The USB plug end of the AXE027 cable contains an FTDI FT232RQ chip and circuit board. There is a circuit diagram and a picture of the internal board on the last page of the AXE027 datasheet -

http://www.picaxe.com/docs/axe027.pdf

The most likely things which would cause a serial port not to be available is it being in use elsewhere, some other software grabbing the port for its own use, or an issue with the USB connection causing the AXE027 to appear to be disconnected.

A broken or intermittent jack plug connection, broken cable, even an entirely cut cable, should not produce an unavailable port error, only "hardware not found" errors.

Windows may incorrectly determine an AXE027 or any other serial port to be a mouse or pointing device at boot-up, but that should not cause a port to become unavailable once it has been booted and the port has been found to be available.

While it is possible there may be issues with a particular PC or USB connection of a cable it is highly unlikely that such faults would be present on multiple PC's and cables.

The "it's there, download a program and the port's gone, no longer available, cannot do further downloads" is very odd. If that were the typical behaviour we would have seen numerous and regular complaints about that. That this is happening with a number of PC's, with different operating systems, with a variety of cables is extremely odd.

It doesn't seem PC specific, OS specific, or cable specific, but there must be some common cause somewhere.
 

Steve2381

Senior Member
No - work are fine. They don't get involved in my PC, but.... eyes will roll if I say I want to re-install Windows. Anyway... I have no evidence to suggest that will fix anything, as its a problem on other computers too.

I totally agree... I cannot find any consistancy with these problems. I know it makes me look like a newbie, but I have been doing this stuff long enough to deduce the issue from most problems.

That is the annoying part.... upload your code. All fine. Change it about a bit, hit upload..... 'Cannot find com port #'. Why not? It was there 2 minutes ago and nothing has changed.

Try a new Axe027... nope
Try a new chip.... nope
Check all connections.... OK
Nothing interfering with the serial terminals and correctly wired.... OK
Open device manager... seems OK
Search for driver.... best one installed
Try all other USB ports .... nope
Uninstall Axe027
Re-install Axe027... Nope
Uninstall AXE027 and then the unassigned item now in the USB listing
Reboot the Picaxe editor
Plug the Axe027 back in
Re-install the driver if it doesn't do it automatically
Will it work? If not.... reboot PC

Upload a few more times..... and repeat upon failure

Appologise to wife for the swearing and go get an Arduino from the workshop
 

Pongo

Senior Member
I guess I'm lucky, in years of picaxing have never seen these problems. I have never used an AXE027. I've never used an audio jack for a serial connector. I always use the now deprecated full download circuit. I have used regular PC serial ports, and USB-serial adaptors with Prolific, FTDI, and Aten chips.
 
Last edited:

hippy

Technical Support
Staff member
That is the annoying part.... upload your code. All fine. Change it about a bit, hit upload..... 'Cannot find com port #'. Why not? It was there 2 minutes ago and nothing has changed.
Are you absolutely sure it's "cannot find COM port", not something else ?

Can you take a screenshot or let us know exactly what the error message says, which port it refers to and what port it was when it worked.

When the port becomes no longer available it would be interesting to know what is shown, after clicking on the "Configure and Test" link below the COM Port drop-down combo-box, in the list of available ports. Whether that changes after clicking Refresh Ports.

Nothing interfering with the serial terminals and correctly wired.... OK
Which is odd, because, if the PICAXE Editor cannot open the COM port, it seems strange that anything else can.

I'm wondering if it could be that you have a terminal open which grabs the COM port and then doesn't surrender it for the PICAXE Editor to use ?

Open device manager... seems OK
Again, somewhat odd. If the physical USB connection had been broken or 'disappeared' then so should the entry in Device Manager, it shouldn't be showing.

If it's there then Windows knows about the AXE027, knows it's plugged in, can and is communicating with the AXE027, and the port should be available to be used.
 

Steve2381

Senior Member
Yep Hippy... all you say is true... all very odd.
No other terminal open. Only ever run one application at a time.
Yes... usually says 'Cannot open comm port 7' or something like that.... can't remember the exact wording.
But, on the left hand side of the editor it shows comm port 7. Refresh the ports .... still shows port 7.
I have noticed that if you change usb ports, that doesn't change the comm port in the editor (because I assume its allocated one), but when you reboot... you get say comm port 4 allocated instead. Then you simply get the same error on that comm port.
Nothing else shows in the ports list or USB list (yes... tried removing my wireless keyboard/mouse). They are basically the only things plugged into the laptop.
You never get the yellow exclamation mark in device settings either... unless you seriously mess about.

Not sure what to try.
I am developing some smd breakout boards for our projects, so that we don't have to build them from scratch every time.
But, until I resolve this issue, I just can't justify using a Picaxe.
 

Steve2381

Senior Member
OK. Going forward.
I have decided to design a few breakout boards, and maybe I will have more luck with these dedicated pcbs.
They are going to be SMD, probably an 08m2, and 18m2 and a 40x2.
I have been browsing Farnell for parts..... OMG.... wood for trees and all that!

I can design the pcb no problem, but I need to source the correct parts.
Found some SOT223-3 5V regs. But when it comes to an external crystal, resistors, caps etc, I just don't really know what I am searching for. There is just far too much choice. Any recommendations?

My boards are usually through hole. But these pcbs need to be small, and I have been practising soldering the SMD stuff, so it time to have a go.
Just finding decent board connectors has taken an hour!

One other area I have not addressed yet is switching. I usually switch through a BC548 and then onto a TIP127. That gives me a decent load capability.
But, I would like to try and isolate the processor side from the outputs. I am thinking opto-isolators, but I have not used them.
Can they only switch DC voltages?
 

PhilHornby

Senior Member
I had to give up in the end and go home to grab some Arduino mini pro's - bang, code written and uploaded in 20 minutes.
What hardware is used to program the Arduino mini pro's? Presumably this is also USB and Serial Port based? Any clash here?
 

Steve2381

Senior Member
No problems with the Arduino's ... both official ones and Chinese knock-off's with the CH340 drivers. They work every time.

Been reading up on opto-triacs for AC switching. Hmm, thats a world of confusion! A lot of our systems are 24v AC
 

premelec

Senior Member
You might consider solid state relays which have the isolation built in - some ON voltage drop. There are isolators that are triacs, transistors and FETs... depends on what you are doing... and how fast and what current
 

hippy

Technical Support
Staff member
I have noticed that if you change usb ports, that doesn't change the comm port in the editor (because I assume its allocated one)
Do you mean the bottom line status bar, which normally shows "PICAXE Chip : PICAXE-XXXX COM Port : COMX" ?

When I change the COM Port in the PE6 Editor COM Port combo-box that bottom line status changes to reflect the combo-box change.

but when you reboot... you get say comm port 4 allocated instead. Then you simply get the same error on that comm port.
Not entirely sure how you mean there. It might be clearer with details of exactly what you have connected, what descriptions the various COM ports are showing in the combo-box, in the "Configure and Test" list and Device Manager.

OK. Going forward.
I have decided to design a few breakout boards
It might be best to open a new thread on that rather push this one onto that topic.
 

mikeyBoo

Senior Member
hi Steve,
Considering that thousands of folks have been using Picaxes for years with no problems, it has to be peculiar to your situation. The only time I have ever had a problem talking to a Picaxe is when I had it’s output port hooked to a Saleae logic analyzer: I was getting a ground loop through the laptop wall wart. I unhooked it & ran the laptop on battery & all worked fine. However, this is a rare thing, but can happen if you have more than one power supply hooked to a project that uses a shared ground. (I’m not going to bore everybody by discussing ground loops.)

Just for fun, try talking to the Picaxe with the laptop running only on battery. Sometimes if you can’t figure out what it is, got to figure out what it ain’t.
 

Steve2381

Senior Member
I will set the Axe091 up later and see if I replicate the issue and post the results
Will start another thread re the SMD board then. I will get a little more info on what I want to achieve
 

marks

Senior Member
i guess this is one of the annoying quirks of pe6.
most of us just plug the usb device in any port before we open pe6 and we are good to go.

if we start pe6 first then plug in our device we always have to
refresh COM ports,using Workspace Explorer then we are usually good to go.

But if we have pe6 running and unplug and plug into a different usb port we have to
refresh COM ports ,and also select the device even if its the only one listed ,then your usually good to go.
if you only refresh COM ports you will get the ERROR : Can't open port COMx.

note. when you unplug your usb device it will still show your previous port you selected viewed using Workspace Explorer.
i also have a few different usb devices which seem to get assigned different com port number even though i'm using the same USB port(Windows10)
so when pluging in a device its probaly wise to always refresh and select.
Device Manager will show the usb device and actual com port number and this will disappear as soon as unplugged.
 

Flenser

Senior Member
Steve,

You said
I have noticed that if you change usb ports, that doesn't change the comm port in the editor (because I assume its allocated one)
This could be a misunderstanding that is adding to your frustration.

My understanding is that PE does not get a COM port allocated for it's use.
  • The PE list of COM ports is simply a list of all the ports that exist on the PC and I would expect this list to always match what I see in Device Manager.
  • These COM ports could all be in use by other programs or none of them could be in use by other programs. This does not effect the list that PE displays.
  • The COM port that is shown as selected in the PE list is the one that PE will try to connect with. If it is in use by another program then PE's attempt to open this COM port will fail.
  • PE will select one of these COM ports when it starts up but that is only a default selection. It does not indicate that the port is not is use by another program and it does not indicate that the port has been wired to a PICAXE chip.
 

hippy

Technical Support
Staff member
Steve,
  • The PE list of COM ports is simply a list of all the ports that exist on the PC and I would expect this list to always match what I see in Device Manager.
PE6 asks Windows what COM Ports exist when it starts up and when Refresh COM Ports is clicked. It then lists those ports until it is closed down and restarted or Refresh COM Ports is again clicked.

If COM Ports are added or removed, through USB cables being unplugged or inserted, this will not affect what is listed until a Refresh or restart of PE6.

Steve,
  • PE will select one of these COM ports when it starts up but that is only a default selection. It does not indicate that the port is not is use by another program and it does not indicate that the port has been wired to a PICAXE chip.
When PE6 starts up it recalls the last COM Port which had been selected and tries to select that. If Windows does not indicate that COM Port is present it will select some other port.
 

kfjl

Member
@Steve2381

If you use Pro Minis, you have a USB-serial converter. If you have a couple of transistors or an inverter chip (eg 74HC04) you could make your own cable on a breadboard to make sure the problem isn't with the AXE027 or the socket. I vaguely remember some sockets are not quite the right size inside for the cable's plug.

You might also try Axepad to make sure the problem isn't with the PE.

If you're a Microsoft fan, why not follow their example and start migrating to Linux?
 

wapo54001

Senior Member
Everyone has different experiences, so this is just another perspective. I find that programming the Picaxe is a somewhat unreliable exercise whereas everything else I do on my machines is almost entirely rock-solid with no unexpected issues.

I have been programming the Picaxe with the AXE027 off-and-on for many years, on maybe three or four main computers and a few temporaries over that time, I think all on Windows 7 and USB 2 ports. I had/have the same scenario infrequently but ongoing -- the system programs fine and then suddenly stops programming -- and early on I spent a lot of time trying to figure out why. One day I simply unplugged the USB cable at the computer and then plugged it back in and the programmer suddenly worked again. Have been doing the unplug thing ever since and my memory is that it always works for me. Some days I go without doing it at all, some days it seems like I do it practically every time I change the code a bit and reprogram. It's not consistent even on the same computer with nothing I can see having changed in the five or tern minutes between programming attempts.

I do think that there is some weak link somewhere. I have, and use, two AXE027 cables interchangeably -- numbered so I know it's not a single cable issue. BTW, I always install the AXE027 driver by installing it twice consecutively. Installing it had been unreliable or problematic before someone mentioned that technique, but I've found that installing it twice always makes it install properly, first time. And why is that?? Or is that an old technique that is no longer required?
 

hippy

Technical Support
Staff member
BTW, I always install the AXE027 driver by installing it twice consecutively. Installing it had been unreliable or problematic before someone mentioned that technique, but I've found that installing it twice always makes it install properly, first time. And why is that?? Or is that an old technique that is no longer required?
I'd not heard of that and have no idea why doing it twice would be any better than once. All it's likely to do is the same as it already had done except maybe increase the COM port number by one.

The main 'having to install drivers' case is where someone has plugged an AXE027 into the PC without having run the pre-installer before plugging it in.

When that happens it seems Windows sees it, doesn't know what it is, sets it as an unknown device without any driver.

When the pre-installer is then run the drivers are copied to disk and parts of the Registry are updated. Windows then knows what the previous 'unknown device' is, labels it an AXE027, but doesn't set the drivers to be used. The drivers still need to be manually installed.

Once drivers have been installed there should be no need to reinstall drivers.

Installing the drivers is however a two-step process; installing the USB interfacing part, then installing the 'making it appear as a Serial Port' part.
 

steliosm

Senior Member
Hello Steve.
I can understand the frustration you are feeling when trying to program the chips and the bloody windows mess up everything that is hardware related. What I would suggest, should you choose to stick the Picaxe chips and not the Arduino Pro Mini, is to find an FTDI USB to serial cable, that windows are happy working with, and use a DIY serial cable (DB9 to 3 header pins) to program your chips.
I use a usb-to-serial cable and an old Picaxe serial downloading cable and never had a problem with them on Win7 or Linux.
 
Top