MAX232 to picaxe without a PC

jmumby

Senior Member
I have a phone with a data cable. The phone has a hayes compatiable modem in it so Im pretty keen to get it going with a pixace. Probem is the cable has 1.A micoprocessor for translating commands and 2. some sort of max232 setup to level shift from the phone (3.3v) to a PC.

Problem is I want to communcate with this from a picaxe but obviously don't have the voltage swing of a pc. I assume the MAX232 uses the voltage from the PC to 'charge up' the caps for the voltage swing.

Anyone have any ideas how I could do this?
 

tjetson

Senior Member
So you want to convert from 5 volt picaxe signals to ~12 volt computer signals; then have the phone convert those ~12 volt signals down to 3.3 volts?
 

husslemk4

New Member
Would it be possible for you to just add another MAX232 to level shift the data back down again? I see no reason for this not working, worth a shot.

The MAX232 does not use any PC voltage at all, it uses your circuit voltage and its capacitors to create a "Charge pump" this is what steps up the voltage from 5/3.3v to 12V.

http://www.coolcircuit.com/circuit/rs232_driver/max232.gif

As you can see in the picture there is no power link between the PC and MAX232, just a common ground.
 
Last edited:

lbenson

Senior Member
What about just using the serial download circuit, the same as you could with a pc serial out to picaxe? Phone out to junction of 10K to ground and 22K to picaxe pin. I'd try it first with a low-cost picaxe like the 08M, just to see if you could send out "AT" and get back "OK" or something similar.

But that raises the question of "what speed RS232". Maybe you'd need a 20X2. What phone are you using?
 

hippy

Technical Support
Staff member
The phone's data cable is most likely powered by the phone, the MAX232 will be converting between the phone serial and PC +/-12V. On the PC facing side it will be just as if the signal had come from a PC albeit the sex of the connector reversed and pins swapped, so the standard 10K/22K download interface should work for receiving from the data cable, straight output ( or via 180R ) to the cable from a PICAXE output pin to the data cable.

Not sure why there'd be a micro in the data cable though - perhaps if you could give us a clue as to the phone manufacturer / model and likewise for the data cable.
 

jmumby

Senior Member
The cable is a nokia DLR-3P. This link http://www.atrox.at/datacable/dlr3/index.html shows someone who has made there own, I have an original one. I tried a MAX232 from the picaxe to the phone put I only get 5v on the output, the same circuit on a PC gets 12v on the output which leads me to beleave the MAX232 drives it's output respective to the voltage it is connected to.

I tried connecting directly to the outputs of the phone as it is 3.3v but I think the little bit of magic in the cable uP stops this from working.

I hooked it up in a null modem type of arrangment as I had two female connections.
 

hippy

Technical Support
Staff member
If you're only getting 5V out of a MAX232 you've either got it wired wrong, are using the wrong pins or aren't supplying the correct power to it. The MAX232 outputs should swing -10V/+10V approximately, the output should not be proportional to the input voltage.

PICAXE Manual 3, page 43, shows how a MAX232 should be wired up for a PICAXE.

Maybe post your circuit ?
 

jmumby

Senior Member
Well the same circuit works when connecting directly to a PC via a null lead. The setup I have is a FTDI on a USB port simulating the output voltage of the picaxe. If I plug this into the regular serial port (via null cable) of my PC and have two terminals open I can type between the two, no problem. Admittedly there was an earth problem giving me the 5v out, this is more like 10 now.

If I send an AT to the phone I get nothing back BUT if I plug the phone into a regular serial port immediatly after, I get an OK. I have no flow control so Im a bit puzzled.
 

jmumby

Senior Member
That was wierd. I had flow control turned off in hyper terminal yet it would still talk to the phone?!?! I had to turn flow control off on the phone (via an AT command) and it works via 3 wire serial
 
Top