Picaxe Hangs - Voltage levels?

Graham O

Member
I am trying to read the Picaxe GPS into a Picaxe 40X on the proto board. Power is supplied by two separate 4.5V battery supplies.

The GPS is outputting data okay when fed directly into the PC's serial port.

I have put a sertxd statement as the first line of the program to test the connection and it work okay when the GPS is not connected.

When the GPS is connected to input pin 1 (TTL level), the Picaxe hangs and the program does not run. I also cannot program the Picaxe when the GPS is connected.

I've looked at the GPS output voltage and it is only 2V (measured on a scope).

Any suggestions would be much appreciated.
 

eclectic

Moderator
Graham.
Just so that folks can be sure:

1. What is your exact circuit / protoboard ?

High quality photographs might help.

2. What is your program?

3. Can you describe the symptoms a little more fully?

e
 

Graham O

Member
The GPS is on the Connect Board with a 3232 level adjuster chip. This feeds data out the jack socket to input pin 1 on the 40x. This is on the Picaxe 28/40 Proto board. The only change to the 40X is that I am running it at 8MHz rather than default 4MHz. There is no change in the symptoms if I revert to 4MHz.

The most basic program is:

sertxd ("first line",13,10)

This runs when the GPS is not connected to the 40X board, but does not run when the GPS is connected. If the GPS is connected but not powered, then it does run, but not if the GPS is powered. This is why I am wondering if the serial input voltage is too low and causing problems, i.e. the Picaxe detects there is something there, but not enough to do anything with.
 

inglewoodpete

Senior Member
Without a photo or circuit diagram I can only resort to the obvious questions:
- Is the Serial In line tied low (usually via 10k + 22k resistors)?
- Is the Reset line pulled high?
- Is the common rail (0v) of the GPS and the PICAXE tied together?
- Does the GPS and PICAXE use the same power supply?
- Does the PICAXE power rail drop when the GPS is turned on?
 

Graham O

Member
This is getting puzzling and frustrating. Latest tests.

Using either two separate power supplies or just using one and the problem persists, i.e. the picaxe stops running when the GPS is powered.

The output voltage from the GPS is nearly 4V (scope measured) when not connected to the picaxe, but only 2V when connected. This stays the same whether the picaxe is powered or not. Removal of the picaxe chip (to test for a board fault) gives me 4V. So the addition of the Picaxe is reducing the voltage.

I've replaced the 40X chip with another and the hanging fault re-occurs and the volts are low. So the chip is okay.

Interconnections. From the jack socket on the GPS board, I have two wires going to the 0V rail of the 40X Proto board and the signal wire going to the pad of input pin D1 which is connected to pin 20 of the 40X which is the input 1 pin.

All other details are as per the manual and each unit works correctly when not connected to the other.
 

Dippy

Moderator
Are you sure the ground connections are OK?

Without an image we can't confirm you have got it correctly connected.
Remember, you can see it, we cannot ;)

If the insertion of the PICAXE (powered or unpowered) loads the GPS data line then it hints at an electical connection/construction error.

My first test would be to test the proto board in isolation.
Pop in a programme which senses the Input 1 pin . e.g. a simple If dah-de-dah in a slow loop. Then apply +V (via a resistor) and then apply 0V - see if Input is sensing high and low. That will confirm your Proto Board is OK or otherwise.

Does the same thing happen to your signal with any other Input pins?
Sounds like you have something base-about-apex. If so I hope you haven't damaged anything.
 

lanternfish

Senior Member
... The GPS is outputting data okay when fed directly into the PC's serial port. ...

... When the GPS is connected to input pin 1 (TTL level), the Picaxe hangs and the program does not run. I also cannot program the Picaxe when the GPS is connected. ...
So are you trying to dump RS232 voltage levels into the 40X? What I mean is do you have the following setup:

GPS -----> RS232 Level Converter -----> PICAXE

If so - :eek: You will need to use another RS232 converter to reduce data levels to 5V suitable for the PICAXE.
 

Dippy

Moderator
That's what I thought at first too Lantern, but then he mentioned 4V (unloaded) o/p on 'scope. Or is that GPS a 3V device? I didn't check. If so, why 4 V?

This is where an image or schematic would have been so helpful for everyone else.
5 extra minutes by OP can save hours for others.

Quite honestly I'm wondering whether the 'scope measuements are correct.
What 'scope are you using?

Too confusng for me. I'll put the kettle on.
 

Graham O

Member
Thanks for all your help. My next job, as Dippy suggests, is to test input pin 1 as a straight hi/lo option without serial data. I'm also going to configure a 20X2 chip as a pseudo GPS by outputting data in NMEA format and see what that does when fed into the 40X board. And finally, if all else fails, I'll use the 20X2 as a replacement for the 40X.

I've tested the GPS output cable by feeding it into the serial port of the PC and I have the connections round the right way.

It does appear that there is a fault on the board, but it has been previously used for another project where it worked okay.

I haven't posted a photo as the two boards concerned are both official Picaxe parts and all constructed as per the manual and work in isolation of each other. (Unless people want very high resolution so they can look for solder bridges.)

At least I have another evening free tonight to work on it. I'll let you know if I get it working.
 

hippy

Ex-Staff (retired)
The GPS is on the Connect Board with a 3232 level adjuster chip. This feeds data out the jack socket to input pin 1 on the 40x ... The output voltage from the GPS is nearly 4V (scope measured) when not connected to the picaxe, but only 2V when connected.
This is very odd. The GPS output via the 3232 should be giving -10V/+10V signals, not 4V.

Such signal levels should be fed into the 40X using a 22K current limiting resistor. If used without I can only surmise that the PICAXE, and it seems the 3232, have been damaged.

I'd suggest putting the 40X to one side and concentrate on getting the GPS board working. As you have a scope that should be easier. Remove the 3232 and check the GPS signal output pin and the input it goes to on the 3232; are they as expected ( 0V to 3V3 AFAIR ) ? Insert a new 3232 and check that is giving -10V/+10V output.

Until you get the GPS board working as expected it's not really possible to move forward.
 

Graham O

Member
Thanks Hippy and everyone else. Sometimes it just needs someone to point out the bleeding obvious. I'd only meant the 3232 chip to be in the socket while proving the GPS worked with a PC, not with a picaxe connected. So now I'm reading and parsing the GPS correctly. Thanks for all your help and sorry to be such a numpty.
 
Last edited:

hippy

Ex-Staff (retired)
You aren't the first and won't be the last. I reckon there isn't anyone who hasn't been a numpty at some time; those who haven't are just saving that experience for a rainy day :)

Thanks for letting us know and good luck with the rest of the project.
 
Top