08M download blocked by shared output?

lauriet

Member
Hello.
I hope someone can advise on this ...
The manual, part 1, states for the 08M -
'Pin 0 (leg 7) is used during the program download, but can also be used as a normal output once the download is complete...If you are making your own pcb you can include a similar jumper link or small switch, or you may prefer to connect the microcontroller leg to both the output device and the program socket at the same time. In this case you must remember that your output device will rapidly switch on and off ...'

Having got a circuit working fine on a prototype board (with the jumper) I have made a custom board (without the jumper).
I have a piezo sounder sharing the output (resistance about 25r) and the existing program and outputs execute perfectly'

But now the Programming Editor starts the 'Connecting to hardware' process then reports 'Error-hardware not found on com6' when I try to update the software.
I can hear the connection attempt on the sounder, so am happy the configuration is correct.

As it would now be monumentally awkward to access the board copper-side and there's a slim chance the fault is elsewhere, can anyone confirm that a piezo sounder is not a good share for this output or if there is any temporary bodge I can make on the component side to re-program the 08M when required?

Many thanks,
Laurie Townsend
 

srnet

Senior Member
can anyone confirm that a piezo sounder is not a good share for this output
A piezo sounder is not a good share for pin 7, serial out, it might work, it might not, depends on the piezo sounder.

Awkward or not, remove it and try the download again.
 

cravenhaven

Senior Member
I dont know a lot about piezo speakers but 25r sounds very low. If that is the case then it doesnt surprise me that you would have trouble with the download circuit, because the load from the speaker will be dragging down the voltage output during serial comms. I would think the only option would be to disconnect the speaker during serial comms.
 

srnet

Senior Member
I have a piezo sounder sharing the output (resistance about 25r)
Just noticed that bit;

Shorting the serial out pin with 25R, is going to stop the serial out working, and the current at 5V would be 200ma, which will likely damage the PICAXE.
 

srnet

Senior Member
I dont know a lot about piezo speakers but 25r sounds very low. If that is the case then it doesnt surprise me that you would have trouble with the download circuit, because the load from the speaker will be dragging down the voltage output during serial comms. I would think the only option would be to disconnect the speaker during serial comms.
Piezo elements are high resistance, in the Meg Ohm range and fairly capacitive.

If the resistance of the device is really 25R, its likley to be a piezo buzzer, a composite device with an internal electrical circuit driving a piezo element.
 

Goeytex

Senior Member
Agree with above.

Ideally you probably should have designed the circuit with a transistor driving the piezo sounder if you needed to share the pin. The sharing would then have been be ok. And also the drive current on pin 7 would have been greatly reduced. Even better would have been to include the transistor driver AND a jumper.

At this point you will have to find a way to disconnect the piezo speaker when downloading a program.
 

hippy

Ex-Staff (retired)
Piezo sensors are usually high resistance and I've not experienced any problems in putting one on Pin 0 and downloading - apart from the cacophony of noise!

The decisive way to tell if it is the piezo causing problems is to temporarily unsolder the piezo, see if download then works. If it does, the moral is to prototype the exact circuit you will be using before committing to PCB or stripboard.

It could however be simply that the program is blocking, preventing downloads, in which case a Hard Reset should solve the problem. Try that first.
 

lauriet

Member
Thanks for the replies; I knew it was a bold/foolish step omitting the jumper, but it is a very tiny board and space was tight (converting a model railway bogie to a steam tram. The tiny piezo does lovely chuff-chuffs and whistles, but the board is under the motor and the program values cannot be determined until its all constructed and running).
Ah well, out with the screwdriver and magnifier.
Cheers.
 

BeanieBots

Moderator
I'd be surprised if you could get "lovely chuff-chuffs and whistles" out of a piezo and the fact that you see 25R very strongly suggests it's NOT a piezo or at least not a 'naked' one. A simple bare piezo should have been OK.
 

srnet

Senior Member
I'd be surprised if you could get "lovely chuff-chuffs and whistles" out of a piezo and the fact that you see 25R very strongly suggests it's NOT a piezo or at least not a 'naked' one. A simple bare piezo should have been OK.
One of those mini-speakers from a mobile phone perhaps.
 

lauriet

Member
The sounder is an HCM0903A. Looks like piezo from the shiny disc viewable through the sound hole, but is described as an Electro-magnetic sound generator. Anyway, its very small and very effective.
Disconnecting it did allow downloads, so the project marches onwards. Being a motorised model train bogie, I currently cover intermittent drops in supply with a humungous supercapacitor, but am searching for better circuits or elegant concepts. Perhaps this needs a new thread.

Thanks again.
 

inglewoodpete

Senior Member
If the sounder is electromagnetic, you should take care not to overload the PICAXE output. The PIC pins are capable of outputting 25mA per pin, which equates to a minimum load resistance of 200ohms. You risk having the output drivers on that pin fail with time due to the stresses placed on them.
 

srnet

Senior Member
The sounder is an HCM0903A. Looks like piezo from the shiny disc viewable through the sound hole, but is described as an Electro-magnetic sound generator. Anyway, its very small and very effective
See also post #4.

A small and effective way of damaging a PICAXE perhaps .........
 
Top