08M2 output signal during upload

Hendriks

Member
Hi, this is my first post, my first PICAXE project and also my first problem.

I use this setup which works fine. The only trouble is during uploading a new program to the 08M2 a lot of pulses (maybe the serial data?) show at C4.
Therefor the relais is humming until the uploading is done.
The pulses on pinC4 are about 1.5Vtt

Why does this happen? It only appears on C4, not on the other pins.
Is there a way to avoid this?

ep_controller.JPG
 

srnet

Senior Member
No idea, I had a 08M2 (SOIC) on the bench with my scope connected so I checked.

No pulses on C4 at all during download, its floating, and my logic probe (a classic CSC LP3) thinks so too.
 

eclectic

Moderator
@Hendriks

First, Welcome to the Forum.

I've just tried a 08M2 DIP

Lots of pulses on C.5 (Ser in)

No pulses on C.4

Two suggestions.

1. Can you disconnect the Transistor/Relay and try again?

2. Please post your code.
Someone here can try it.

e
 

John West

Senior Member
I see no power supply bulk filter capacitor in your schematic. A common mistake that can cause such problems. I'm not sure why hobbyists fail to add it, but it is often necessary for reliable operation, especially in circuits that drive power devices from minimal power sources.

However, I'm more likely to suspect mis-wiring or a solder bridge in this case, between IC legs 2 and 3, as the 1.5V on C.4 indicates that there is a substantial signal driving the Darlington (with a pulse rate that is likely the programming pulse) at a time when signal pin C.4 should be floating, and there is nothing in the design as shown that should enable the relay during programming.
 
Last edited:

Hendriks

Member
Thanks for the replies.
I had a decoupling capacitor (100n) directly over the picaxe and the setup is powered by batteries. This should cover most suppression problems I guess.
After I had this issue with a soldered vero board I replicated the schematics on a solderless breadboard with the same results.
During uploading to the picaxe 2mS width pulses appear on C4. The pulses are 1Vtt and 12mS apart.
I shrank the code to this minimum that still allows me to see te setup working:
Code:
#no_data
pause 2500

Init:
    symbol LCD=C.1
    symbol FlowSensor=C.2
    symbol PushButton=pinC.3
    symbol Pump=C.4

Main:
high FlowSensor
pause 2500
low FlowSensor

do
    high pump
    pause 1000
    low pump
    pause 250
loop

End
 

John West

Senior Member
This should cover most suppression problems I guess.
It's best not to guess when it's quite easy to add a couple of hundred uFd bulk filter capacitor to the bd.
You fail to tell us anything about the relay, (or the batteries,) yet you use a Darlington transistor (which you do not specify the type of) to enable the relay (which you don't specify,) indicating the relay is a significant load, something that small batteries (which you don't identify) may not be able to properly power, thus creating fluctuations on the power supply lines. Also, your schematic indicates 2 attached displays. What are they? What current do they draw?

Solutions to problems require full information to base them on. We'd like to help, but we can't do much without info.
 
Last edited:

eclectic

Moderator
I can't supply screen-dumps of the 'scope at the moment

AXE091 / 08M2 / Program listing from post #7.

'scope probe on leg 3 (C.4)


On downloading, for about 5 seconds there were spikes.

My cheap 'scope measured them as

760mV pk-Pk
~16 ms apart.

e
 

Hendriks

Member
I agree, don't guess.

I had no reason to use a Darlington (BC517) other then they do it like that in the manuals . But I also tried it with a normal BC550 which made no difference.
The relay is 4V-50 Ohm, so a small load to the power supply.

Anyhow not important in this case because the relay will not be powered during uploading will it?

I had this issue when using a stabilzed power supply so I switched to a 4.5V battery pack (3xAA) with fresh batteries.
This made no difference.

Like Eclectic proposed I disconnected the transistor, so there is absolutely no load on C4. I still see the same pulses (1Volt peak-peak (we say top-top, therefor 1Vtt)).

I tried 2 different 08M2's and had the same results with both.

Any ideas?
 
Last edited:

MartinM57

Moderator
No 08M2's I'm afraid :(

I've no idea why it happens but I don't doubt the reported observations either...curious
 
Last edited:

Technical

Technical Support
Staff member
Have you tried a weak pull-down (e.g. 100k) from the C.4 pin to 0V.

When a chip is in reset, downloading, or powering up the i/o pins (ie your output C.4) are not actively driven (as they are in a high impedence input state until the program starts). Therefore a weak pull down resistor will stop the transistor base 'floating' during this time.
 

eclectic

Moderator
Have you tried a weak pull-down (e.g. 100k) from the C.4 pin to 0V.

When a chip is in reset, downloading, or powering up the i/o pins (ie your output C.4) are not actively driven (as they are in a high impedence input state until the program starts). Therefore a weak pull down resistor will stop the transistor base 'floating' during this time.
Tried 100k then 33k

This does reduce/remove the "blips"
at least on my cheapo.

Obviously a grownup's 'scope is required.


e
 

srnet

Senior Member
we say top-top, therefor 1Vtt
Really wierd, and very confusing. I wonder how many understand what tt is supposed to mean, it implies waverforms have an up and a down.

Out of interest is the tt positive or negative and is there a bb ?
 

Hendriks

Member
Thanks, now I understand C.4 is in high impedance state. Nevertheless it still has enough power to make the transistor light the LED during programming.

When pulled down with 100K the pulses are still there but only 0.25Vp-p. The LED doesn't light anymore and the relay doesn't hum either.

Also maybe a Darlington amplifies too much?
 

Hendriks

Member
Hi srnet,

I am from the Netherlands where we say top-top or Vtt, but I understand that in English I should have said peak-peak. Thanks for this correction. I still don't understand exactly how a peak is less confusing than a top but it's a little off-topic anyway.
 
Last edited:

srnet

Senior Member
Also maybe a Darlington amplifies too much?
The c.4 pin is in the high impedance state, so the leakage current is 5nA typical, 125nA max. So multiply that by the Darlington gain and you will have the max current through the relay coil.

Now you said that with a 100K pulldown on the pin you have 0.25v, so that a current of 2.5uA.

So where is it coming from, or is it actually there ? Its not going to be (or at least it should not be) coming from a PIC pin that has a max leakage of 125nA ..........
 

MFB

Senior Member
In addition to a pull-down resistor on the base of the Darlington, you could cheat a bit by placing a capacitor across this resistor to reduce the amplitude of the unexplained spikes.
 

100317

New Member
Hi Henriks,

if you have been set up your project as shown in the picture, it can not work!

In the schematic the Power (V+) is connected via 100nF to ground (0V). So the 08m2 is maybe powered

over serial in.

Hans
 

Hendriks

Member
So where is it coming from, or is it actually there ? Its not going to be (or at least it should not be) coming from a PIC pin that has a max leakage of 125nA ..........
It is there alright, coming from C.4 since it also occurs when there is nothing connected to this pin.
I have no idea where it is coming from. This is my first experience with picaxe so I hoped this group would know about this behaviour.

In addition to a pull-down resistor on the base of the Darlington, you could cheat a bit by placing a capacitor across this resistor to reduce the amplitude of the unexplained spikes.
thanks, I accepted now that I need to workaround this issue so I can live with it. However a pulse that is 2mS on and 10mS off is a little more than just a spike...:)
 

srnet

Senior Member
Fair point Hans, although my 08M2 wont do anything without the +V connection to pin 1 missing.

Given that the power consumption of a 08M2 at default clock of 8Mhz is about 1ma, that would drop over 10V through a 10K resistor.

Mind you if the circuit diagram is missing the +Ve connection, what else is it missing ?
 

lewisg

Senior Member
The only trouble is during uploading a new program to the 08M2 a lot of pulses (maybe the serial data?) show at C4.
Yep. Maybe not actual serial data but I get a whole bunch of random numbers on a serial 7 segment LED:

View attachment 9613

Since that is a RTC program a 8300 isn't valid.

Some scope shots:
Download1.jpgDownload2.jpg

The first is early in the Downloading program part of the process. That is when the serial LED display goes nuts. Later to get the second waveform and the LED goes to all zeros (0000) and stays that way through Downloading data. The time between pulses does change. It is around 12ms during the latter part of Downloading program and around 16ms during Downloading data.

I hope this helps.
 

MFB

Senior Member
It may not be the most scientific approach, but why not just filter out those spikes before they reach the input of the Darlington.
 

lewisg

Senior Member
My rough test:

AXE091
PICAXE08M2
Ch1 (red 1V/div) on pin C.4
Ch2 (blue 1V/div) on breadboard side rails

Download using my normal 12VDC 1.5A wall wart:
Download4.jpg

Download using a 0-30VDC 5A bench supply set to 10V:
Download5.jpg

What is the deal on uploading images? Only two per message?
 

lewisg

Senior Member
To check what power the 08M2 was actually getting I made come changes.

Ch1 (red 1V/div) on pin C.4
Ch2 (blue 10mV/div) on 08M2 power pins

Using my normal 12VDC wall wart I turned up the rate and the sensitivity of the power channel to get a better picture of the start of the problem:
Download6.jpg

It seems that the power the PICAXE gets is cleaner than the breadboard on a AXE091. I think there is another issue than crummy power. But I have been wrong before and will be wrong again...

Hope this helps.
 
Last edited:

inglewoodpete

Senior Member
I had no reason to use a Darlington (BC517) other then they do it like that in the manuals .....The relay is 4V-50 Ohm, so a small load to the power supply.

Any ideas?
The problem is more about the design of your circuit than the PICAXE. You are using a very low current relay (8mA - is that correct? Nope - see edit2) and an extremely high-gain transistor (darlington). A small amount of noise operates the relay - bad design.

There is no need for a darlington transistor to drive this relay. I suggest you try an ordinary small signal transistor - the lower the gain the better. If the relay is truly 8mA, you don't really need a transistor at all but you will have to be careful with the relay's damaging back-EMF.

Edit: As others have mentioned before, but not acknowledged, is the PICAXE powered?

Edit2: Yep, Martin is right. 0.08A is 80mA. Must remember to take my shoes off and use my toes as well when doing large calculations :)
 
Last edited:

Hendriks

Member
I suggest you try an ordinary small signal transistor
Hi ingelwoodpete,
You probably missed it, but I mentioned that I tried a small signal BC550 with the same results:
I had no reason to use a Darlington (BC517) other then they do it like that in the manuals . But I also tried it with a normal BC550 which made no difference.
As others have mentioned before, but not acknowledged, is the PICAXE powered?
Yes, I powered the picaxe to pin 1 but forgot to draw this line in the schematics. I don't think it would work without power anyway.
The LED that is over the relay will light during programming, whether using a small signal transistor or a darlington, whether using batteries or a big power supply.
It is no big deal I just wanted to know if it is a known issue.

The first is early in the Downloading program part of the process...
Ok, point taken. :) I used to think that I could download data from a source to my computer or upload data to the internet or to some device.
 

Technical

Technical Support
Staff member
We don't think it has been mentioned, but we assume that you are using an old RS232 serial cable (or serial / universal usb adapter) rather than the AXE027 USB cable. We have tested here on an AXE091 and don't see this behaviour with an AXE027 with the default 7805 regulated 5V supply.

As RS232 voltages can go higher than 5V and lower than 0V you can get small transient voltages inside the diodes within the serial in pin when using a traditional serial cable, which although not harmful can lead to this type of behaviour on floating pins close by. That is why, for instance, touch sensors cannot be calibrated via this type of cable, as these voltages affect the touch sensor readings. pin C.4 is simply the physically closest to the serial in pin in the silicon. The solution is to just tie the pin down with a pull-down resistor.

The recommended AXE027 USB cable doesn't suffer this as it is a true 5V/0V logic level device.
 
Last edited:

lewisg

Senior Member
As RS232 voltages can go higher than 5V and lower than 0V you can get small transient voltages inside the diodes within the serial in pin when using a traditional serial cable, which although not harmful can lead to this type of behaviour on floating pins close by.
Sure enough!

AXE091
PICAXE08M2
Ch1 (red) on pin C.4
Ch2 (blue) on pin C.5 (serial in during download program, data)

Serial cable (AXE026):
Download7.jpg

USB (SparkFun PGM-09260):
Download8.jpg

Thanks Technical!
 

Paix

Senior Member
Thank you LewisG, your support in this thread has been both invaluable to a prompt outcome and generally enlightening.
 

SAborn

Senior Member
Edit..........
I posted at the end of page 1 and did not see the next 3 pages that already had covered my comment.
 
Last edited:

100317

New Member
Fair point Hans, although my 08M2 wont do anything without the +V connection to pin 1 missing.

Given that the power consumption of a 08M2 at default clock of 8Mhz is about 1ma, that would drop over 10V through a 10K resistor.

Mind you if the circuit diagram is missing the +Ve connection, what else is it missing ?
Last week I installed a circuit for our boiler. But the programm still had one mistake, I dismantled the circuit and loaded a corrected program version on the 14M.

After the assembly I switched on the device. The Piezo beeps, as expected, then I pressed the start key, the Piezo beeps as expected,
but the LED did not start to flash and the relay was also not switched on. I went to my PC and checked the programm, however, found no mistake.
Thus I went again to the cellar and controlled the connections. I have swaped by mistake the connections for the power supply and the relay.
Can you explain to me, why the circuit partially worked?


Due to the limited space I have no LCD connected. Therefore I use the Piezo to inform me, with different tones, about the status.
In my opinion the circuit was supplied with GND via output4.
 

Attachments

Top