Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

another transistor question on rs232

Status
Not open for further replies.

large_ghostman

Well-Known Member
Most Helpful Member
i am doing a max232 circuit and would like led indicators on both the pic side of the chip and pc side, pic side easy i will just use npn high base resistor as i only want a led indicator not a floodlight! and can do the calcs now but the prblem is while i know the pic side is 5V and have a rough idea of Vf for the Led i am unsure on the pc side, reading the maxim datasheet on there normal use circuit it shows a 10V + and 10V- from the charge pump (page 14 i think) anyway my question is. Is the output from the max232 pc side 12V or 10V? yes i could connect it up on bread board etc but i am doing a schematic so i can lay a board out, i know it dosnt really matter for a led but i would like to know if i calculate 12V-Vf or 10V-Vf, also reading the standards for rs232 it say's 12V and -12V so not sure what the actual voltage out the chip is. i could of course just use 2 leds on the RX and TX pic side but would be nicer to have RX TX on pc side as well.
also my bonus question is, are any of the other 9 pin connections on the Dsub from the pc at a voltage all the time? thats just because it would be nice to be able to tell if the cable was connected by sensing a voltage, not essential but i do like the bells and whistles and the little things make a difference lol (thats a mum quote)
LG
 
It would be best to use a transistor switch (for LED control) for both the PC RS232 and the MAX 232 Rx and Tx lines since you don't want to influence the Data line voltage levels.

Proper base triggering will eliminate concerns over actual device output voltage levels since saturation currents are so low (for the 2N2222 type, for example).

And there are no RS232 input or output lines that are at a consistantly reliable (+ or -) voltage level (except, of course, Gnd). I suppose your could, however, with proper coding (or pull-ups), drive any of the data control lines to 0 or 1 if they're not already being used for comms.
 
Last edited:
sorry i didnt make it clear, i intend to use transistors on all of them, my query was more about working out base resistor for the pc side as i wasnt sure if the chip output 10V 0r 12V but then again like you say on the RX from the pc its eigther measure or guess!
i will just go with a very high value as i only want 7-10mA anyway, i will use BC547's (loads to use up) i could measure the HFE of each but will assume 50 then i am totally covered :D.
one other question i have read that its best to ground any outputs or inputs that are not being used, if so is it best to say use a 10K-20K resistor to GND on the unused channels?
i will post a schematic when it's finished so you have an idea what i am upto :D
 
I am unaware of any crossover problems between RS232 data lines and I've never seen the need to concern myself with unused pinouts.

That does not mean you cannot do as you suggest. It just strikes me as a waste of parts and time...
 
i agree with you about it not being an issue, but i have seen a couple of posts where it gave a problem, IIRC Ian the mod on here put in a post once that he had once had an issue, i dont think it's a common problem, on the other hand it isnt a commercial project and the parts are sitting here waiting to be used :D plus makes the board layout slightly more of a challenge and good experience :D
 
i am doing a max232 circuit and would like led indicators on both the pic side of the chip and pc side,
This could soon look like Backpool illuminations!

pic side easy i will just use npn high base resistor as i only want a led indicator not a floodlight! and can do the calcs now but the prblem is while i know the pic side is 5V and have a rough idea of Vf for the Led
OK

i am unsure on the pc side, reading the maxim datasheet on there normal use circuit it shows a 10V + and 10V- from the charge pump (page 14 i think) anyway my question is. Is the output from the max232 pc side 12V or 10V?
The MAX232 has a voltage doubler, so the output will be +/-10v.
However, that is not a very stiff 10v and will easily be pulled down to a lower voltage by small loads.
This is not a problem as the voltage range of a valid RS232 signal is quite wide, something like 3 to 12v for one state and -3 to -12 v for the other state.

yes i could connect it up on bread board etc but i am doing a schematic so i can lay a board out, i know it dosnt really matter for a led but i would like to know if i calculate 12V-Vf or 10V-Vf, also reading the standards for rs232 it say's 12V and -12V so not sure what the actual voltage out the chip is. i could of course just use 2 leds on the RX and TX pic side but would be nicer to have RX TX on pc side as well.
As I said above, the voltage could be all over the place.

also my bonus question is, are any of the other 9 pin connections on the Dsub from the pc at a voltage all the time? thats just because it would be nice to be able to tell if the cable was connected by sensing a voltage, not essential but i do like the bells and whistles and the little things make a difference lol (thats a mum quote)
All depends on what is on the other end of the cable and what it is doing at the time. I am not sure that we can make a generalisation.

A couple of stray points from other posts in this thread.
It is not necessary to worry about unused inputs on the MAX232, there are pull-up/down resistors built into th chip.
Also when designing your "Light Show", be aware the RS232 TX and RX lines idle at -10v (ish) which is equivalent to a STOP bit and binary signal level "1" in asynchronous RS232 comms.

All this reminds me of an episode which happened to me many years ago.
Why did the Silent 700 go up in smoke?
A Silent 700 was a nice portable (in 1980) RS232 terminal with keyboard and printed output on thermal paper, made by Texas Instruments if I remember correctly. It was silent compared with a teletype or a dot matrix printer with solenoids driving wires which hit a ribbon to make the print.
So we had a Silent 700, as a piece of general use equipment.
One day I connected it to an RS232 output from a Ferranti Argus 700 computer, instead of the usual teletype machine (which was acting up as usual).
After a few seconds, clouds of magic smoke came out of the back of the Silent 700. "Oh dear me" thought JimB:oops::(
The problem turned out to be that the Silent 700 had some diodes or similar wired to the RS232 connector, presumably to provide some kind of overvolt or ESD protection. These "diodes" conducted at about 8volts.
The Argus 700 RS232 card however put out a rather "stiff" 12volts on some of the handshake lines. The diodes did not stand a chance!
The A700 carried on doing its thing and I just disconnected all the pesky diodes in the Silent 700 and it carried on doing what it did best, much to my relief.

JimB
 
This could soon look like Backpool illuminations!


OK


The MAX232 has a voltage doubler, so the output will be +/-10v.
However, that is not a very stiff 10v and will easily be pulled down to a lower voltage by small loads.
This is not a problem as the voltage range of a valid RS232 signal is quite wide, something like 3 to 12v for one state and -3 to -12 v for the other state.


As I said above, the voltage could be all over the place.


All depends on what is on the other end of the cable and what it is doing at the time. I am not sure that we can make a generalisation.

A couple of stray points from other posts in this thread.
It is not necessary to worry about unused inputs on the MAX232, there are pull-up/down resistors built into th chip.
Also when designing your "Light Show", be aware the RS232 TX and RX lines idle at -10v (ish) which is equivalent to a STOP bit and binary signal level "1" in asynchronous RS232 comms.

All this reminds me of an episode which happened to me many years ago.
Why did the Silent 700 go up in smoke?
A Silent 700 was a nice portable (in 1980) RS232 terminal with keyboard and printed output on thermal paper, made by Texas Instruments if I remember correctly. It was silent compared with a teletype or a dot matrix printer with solenoids driving wires which hit a ribbon to make the print.
So we had a Silent 700, as a piece of general use equipment.
One day I connected it to an RS232 output from a Ferranti Argus 700 computer, instead of the usual teletype machine (which was acting up as usual).
After a few seconds, clouds of magic smoke came out of the back of the Silent 700. "Oh dear me" thought JimB:oops::(
The problem turned out to be that the Silent 700 had some diodes or similar wired to the RS232 connector, presumably to provide some kind of overvolt or ESD protection. These "diodes" conducted at about 8volts.
The Argus 700 RS232 card however put out a rather "stiff" 12volts on some of the handshake lines. The diodes did not stand a chance!
The A700 carried on doing its thing and I just disconnected all the pesky diodes in the Silent 700 and it carried on doing what it did best, much to my relief.

JimB


ok i admit 8 Leds is a tad overkill but this board in its defence is a general board i want to use for projects like debugging etc so i thought a led on each side will at least tell me if the program i have written on the pc side is working or if data is being sent from pic side etc, so its a kind of tool board rather than for just one project :D and again its for helping practice layout :D, and it was kind of dads idea he pointed out that one day i would have to be sensible and consider cost in a design,function,form and balance (not a clue what he was on about lol) but for now there is several thousand 3mm Leds in a box gathering dust (from when dad had the online shop) that cost next to absolutely nothing (most the stuff was ex bankrupt stock got really cheap from auctions) so i might as well use them to have fun and learn. but yeah i do take your point about blackpool! and dad also commented that the board had more bling than a council house chav!
as for voltage i will post the drawing its nearly done but i am only using the lines for the transistor base. interesting point about the -10V i will have a think about that and see if i need to do anything about it (design wise). i will monitor if it pulls too much and drags the voltage down but hopefully not at 1mA or there abouts, if it does i can always up the base resistor there is room in the cals :D.
as for the pulling lines down to GND when not in use, ok i accept that and have scraped the idea! anymore suggestions are very welcome. its great learning from the pro's, even if i do something that isnt the way it should be done (like blackpool light show) i do take notice and pay attention, it's stored in my book for when it matter's ;) so please dont think good advice is just ignored because it isnt
LG
 
there you go and i have resisted putting a power on Led in :D
rs232 board.JPG
 
The comment about Blackpool, was just a little facetious quip on my part, don't worry about it.
I understand all your reasons for designing the board as you have done, and they are all (well most of them anyway) good.
I have this nagging feeling that you may end up being confused by the LEDs on the RS232 side of the MAX232, I may be wrong, you will have to build it and see.

Can I suggest that you make test points for easy connection of scope probes, always useful if you are having a bit of a head scratcher. And while you are at it make a good solid point for the earth clip of the scope probe as well, in fact make at least two as you may need to connect some other test equipment there as well.

i have resisted putting a power on Led in
Big mistake, that is one LED that SHOULD be there if this is a test fixture.

A quick critisism, don't draw things the way you have drawn C1.
It spoils what is otherwise a well drawn schematic. Having said that, I have not checked it for electrical errors.

JimB
 
The comment about Blackpool, was just a little facetious quip on my part, don't worry about it.
I understand all your reasons for designing the board as you have done, and they are all (well most of them anyway) good.
I have this nagging feeling that you may end up being confused by the LEDs on the RS232 side of the MAX232, I may be wrong, you will have to build it and see.

Can I suggest that you make test points for easy connection of scope probes, always useful if you are having a bit of a head scratcher. And while you are at it make a good solid point for the earth clip of the scope probe as well, in fact make at least two as you may need to connect some other test equipment there as well.

Big mistake, that is one LED that SHOULD be there if this is a test fixture.

A quick critisism, don't draw things the way you have drawn C1.
It spoils what is otherwise a well drawn schematic. Having said that, I have not checked it for electrical errors.

JimB
ahhhhhhh i moved the block and C1 didnt move GRRRrrrr i should have checked before posting!! well spotted jim thanks!, test points and earth connection will be added thanks for that i didnt think of it! but it has given me another idea!! will add the Led that should be there lol. i am hoping i can lay it out so the Leds make sense and also i am using green for RX and red for TX so if a green is on so should a red be at the opposite end of the board, havnt tried laying it out yet but would prefer if the leds were by the socket they belong too and pic inputs so its easier to see what the led is telling me. if it dosnt work then out they come on next board!
 
ok revised schematic
rs2321.JPG

as it say's on the drawing, i have used both male and female single inline header's on the pic side of the chip. thats simply because that way i can connect just about any of my projects if needed and still have test points, only done one type pc side as obviously will only be using cable to connect from board to pc so it just needed to be a test point.
at the start of this i set myself the challenge of fitting it all on the offcut from the other board! its getting a tight squeeze now :D lol will post layout when done.
 
You could also add an MCU which will determine baud rates, count characters and display the results on LCD. This would make a great test unit.
 
this one is more for just connecting up to a pc, but with my 30f project i have thought about doing a poor mans bus pirate with LCD built in and as it can switch clocks i could have a large range of baud rates, also has 2 uart 2 spi 2 i2c so would be a good chip for that kind of thing :D but for now this board is a simple learning board
 
the hard part so far is the lay out, i set myself the challenge before i started designing it that i would use the off cut board from the transistor board i did, to begin with that was easy but after adding all the lights and stuff it's going to be tight by my standards, i dont normally cram a board because i make my own i dont have to worry so much about £ per inch, so i dont get any practice in set size boards and laying stuff out to fit a tight space. I have used a few tricks so far that i have learnt off here like changing square pads for slightly smaller round ones, and i have dropped the pad size slightly and will use much thinner traces than i normally use, that will be good practice as i have a 100 pin TQFP board in mind :D
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top