Maker Pro
Maker Pro

Arghhh! I Hate RS232 :)

Thanks for the pointer. It's outside my budget but I found an earlier edition for a few bucks, which will at least give me the basics.

So the firmware in the device isn't meant to work with a modem at all? So I guess the modem can be configured to automatically connect to a WiFi host, and through to some kind of virtual port on the host device or something like that? Because that device expects a transparent, permanently enabled data connection. But I guess you already did this with the Bluetooth modem so you can do the same for the WiFi modem.

On the book, it gets revised and updated quite regularly. The edition I was referring to was an earlier one, and to be honest, I think it was better then the later one I have here. They are pricey, I think new they were always +$100. But don't be concerned about an old one - they're great!

Correct, the firmware in the device was only designed to speak RS-232 using the TX, RX & GND with the intended usage of connecting a serial cable to a laptop for management software - that's it.

So in it's original state it looks like this;

on-board CPU => Max232 Clone => TX/RX/GND pins for making a serial cable connection to manage it with 3rd party software.

The RS232 converter is required because the CPU speaks 5v TTL so it needed to be converted down to that from Rs-232 before being sent to the CPU. And vice versa.

When I went Bluetooth I found that the Blue Tooth module spoke 5v TTL.... so what I did was cross and run the TX and RX lines from the Blue Tooth module and tapped directly into a couple of vias on the board above the Max 232 clone on the way directly to the CPU. Thus, I bypassed the Max 232 and tapped directly into the CPU.

This worked well but it's a bit of hack. I would prefer, from a cleanliness standpoint, to use the native RS-232 TX/RX/GND breakout that the board provides. But the Blue Tooth solution was feasible, worked well, and was cheap and easy to implement....

What I found out though with the first prototype was that Blue Tooth worked as designed. No issues. But, the inherent issues with Blue Tooth itself were annoying. It's a short-range communications protocol (designed to replace wired components on your desktop like mice/keyboards etc). This meant my net book had to be in close proximity to remain connected. When the board was placed in an enclosure the range dropped further. The other side of it is that the Blue Tooth solution used virtual COM ports. These are just messy to set up and if you remove your Blue Tooth USB stick and put it in a different USB port it would create a whole new COM port. This meant I had to go back into the management software and tell it to use a different port etc. So I found it be both liberating and confining - but I was pleased that it worked and it does work well within the constraints of the technology chosen.

WiFi has the increased range that I would like and the software that I use has been written with native TCP/IP functionality and it does not use virtual COM ports in that scenario. It's a standard plain old TCP/IP connection. So it should be as simple as you start up your computer/management device, choose to connect to the WiFi module (it acts as an access point - just like any other wireless network) and then you fire up the management software and you're in - with greater range and no virtual COM ports to create problems. :cool:

So that's the method behind the madness, and, from the sounds of our conversation, it should work. So the solution should address all the criteria I didn't like with the Blue Tooth implementation and also, because the WiFi card fully supports TCP/IP - the door is wide open to all sorts of other things. Just as an example, you could get your Internet access from it!
 
Don't lump me in with that fella - you were a big help to me!
"That fella" was only offering help, bearing in mind that you said "I also want to get as far away from virtual COM ports as possible. It's so 1970's".

The solution I offered was definitely "not 1970s" and would have meant just a single IC at each end for one-way communication; or plus three extra components (a cap, resistor and diode) at each end for half duplex. On reflection, I should have realized you were probably saying you did not want any hardwired system.

However, as your quoted remark was from an old hand to a relative newcomer I think it had something to do with the 'not invented here' syndrome, and nothing would have been been gained if I had replied to it.

I won't waste my time in future.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
However, as your quoted remark was from an old hand to a relative newcomer I think it had something to do with the 'not invented here' syndrome, and nothing would have been been gained if I had replied to it.

I won't waste my time in future.

I have taken the time to re-read the whole thread given that you are clearly not happy.

I note that RS485 is an interface that has balanced outputs whereas RS232 has single-ended outputs. If the OP was implementing only one end of an interface then it is likely that RS-485 transmitters may work (you'd only use one of the outputs) but the receivers may be problematic.

On that basis I would not recommend n RS485 driver unless I knew it would work, and in this case I'd take the time to explain how the balanced inputs and outputs should interface to the single-ended inputs and outputs.

Kris seemed to me to simply be pulling the thread back on topic with his comment (that was not specifically directed at you). Earnest George was simply expressing his thanks to Kris for the assistance. His comment to me reads more as saying that the time was not wasted on him than on any other reading.

It is always more difficult to read the emotive meaning of statements on forums like these than in face to face conversation.

I often find it best to write a rant then to delete it before hitting "post". Regardless of whether you think it has justification, the question should be "will it help". Often the answer is "no". You'd be surprised how often I delete comments rather than post them.
 
I can't speak to understanding much on the electronics side of things - that's why I'm here and ask people who do know :) Kris' help in another thread resulted in my building out LDO power regulators that work. They are in use right now on the project I'm working on. There's actually a lot of Kris in it from his help and there's no way I could have done it without him. So this is a big thing when you're goal oriented but need help getting there with individual steps.

With respect to my not knowing much about RS-232/serial etc, it seems to me if the input that's on the board that I have to send the signal to is set up for RS-232 then wouldn't that mean you have to use RS-232 to interface with it and not something else? (RS-485).

I was just saddened to see Kris bail out as the thread got sidetracked. But I feel for him, he's giving his time and valuable information, which was working because I think I have a viable solution now, so I learned a lot and his help also got me into the right part - which is important for me (otherwise I buy the wrong thing and I have a box full of them already!). But as a newby, it gets hard when the water starts to get muddy again - just when it was all getting clear. I suspect that's where a lot of this frustration may come from.

Kris seemed to me to simply be pulling the thread back on topic with his comment (that was not specifically directed at you). Earnest George was simply expressing his thanks to Kris for the assistance. His comment to me reads more as saying that the time was not wasted on him than on any other reading.

Exactly. Sometimes there's wisdom is knowing when to help and when to see that the help provided is already working :)
 

KrisBlueNZ

Sadly passed away in 2015
Thanks guys. I think the first mistake was me saying "but thanks for playing" to pebe. I said it because I thought that it was obvious that an RS-232 transceiver was needed, and I assumed that pebe must have recommended an RS-485 device thinking that it was RS-232. That comment was unnecessary and patronising and I apologise.
I often find it best to write a rant then to delete it before hitting "post". Regardless of whether you think it has justification, the question should be "will it help". Often the answer is "no". You'd be surprised how often I delete comments rather than post them.
This is great advice and I'm trying to get better at doing this as well.

Sometimes when I get frustrated by a post, I will write a pointed, scathing response, then instead of posting it, I'll cut and paste it into a post-it note and drag it to the edge of my desktop. Then at any time, I can re-read the frustrating post, and re-read my response, and say to myself "Yeah! You tell 'im, me!" and feel vindicated.

Then sometimes the author of the post will back down anyway, or someone else will respond in a less aggressive style, or sometimes I will write a more moderate response and post that. But it's only in extreme cases, like "Evon" recently, that I feel justified in having a "proper argument".

So I apologise for my unnecessary swipe at you, pebe, and I hope you will continue to help out here.
 
@Ernest

Hi Folks!
I'm in the process of trying to add WiFi to a project and it turns out I need a RS232 converter such as a MAX232 chip.

The WiFi board I want to incorporate puts out UART 3.3V TTL.I need to convert that signal to old school RS-232 and run it elsewhere. That's all I need to do.

…..The ultimate destination of the signal is a proprietary board that has terminals for TX, RX & GND. As such, my guess is that it does not support flow control at the hardware level. I do know that it has a MAX 232 clone (TI) further up the chain and then it turns the incoming RS232 back to 5v TTL and then sends it directly to the CPU.

No, the firmware in the 'brain' was designed to be connected to an old school RS-232 cable - that's it. So it was never designed to be used with Blue Tooth (which I had working well) nor WiFi, which I would prefer/plan to use. The amount of data going back and forth is pretty small. The BlueTooth module put out 5v TTL and so what I did was tap into the vias going directly to the CPU (bypassing their on-board Max232) and it worked well. Never saw an issue with the BT module set at 115,200 8N1 and no flow control (on the computer's virtual com port)

...... I also want to get as far away from virtual COM ports as possible. It's so 1970's :)
My understanding of the bits of the three quotes I have underlined was that:
1. You had a WiFi where you could access raw data
2. You wanted to transport its data to
3. A proprietary board that fed into a CPU whose ports you had access to.

That being so, my idea was that because you could get at the raw data ports at both ends, you could get rid of the RS232 that you don’t like and to use two SPs to give a simple link like this that required no setting up for data speed:
WiFi data <> SP3485 <> SP3485 <> CPU data, instead of:-

WiFi module => 3.3v TTL => Max232 => RS232 => TX,RX, GND on Proprietary board => Max 232 => 5.0v TTL.

The CPU data would only be input at 3.3V, but that shouldn’t be a problem – the CPU will take 3.3V as a high (‘1’) bit.

But it appears that I had overlooked something somewhere in those quotes and my assumptions were wrong.

Today, having read the entire thread word by word, I noticed this:

…..Given the total trace length between the WiFi module and the destination is only inches I would think data integrity would not be an issue as it might be with a long cable….
Which makes me think that if you can get at the data at each end, with only a few inches between them, why not take the simplest approach and use an opto-coupler?

@Steve
I note that RS485 is an interface that has balanced outputs whereas

RS232 has single-ended outputs. If the OP was implementing only one end of an interface then it is likely that RS-485 transmitters may work (you'd only use one of the outputs) but the receivers may be problematic.
Yes. Although the transmitted signal in RS232 is single ended, signals on the Tx wire are ±5V to ±15V so are balanced relative to ground.

The SP3485 measures the difference between the two input lines and each has a permitted –3V to +7V swing in common mode. But the RS232 output can be up to ±15V, so the SP inputs could not cope with it without series resistors and diode clamps to its supply rails.

The reverse path also wouldn’t work because the SP3485 output is only ±1.5V (determined by its supply voltage) which is not enough for the ±3Vmin input of an RS232 receiver.

Which is why I opted for an SP3485 at both ends

@kris
Thanks guys. I think the first mistake was me saying "but thanks for playing" to pebe. I said it because I thought that it was obvious that an RS-232 transceiver was needed, and I assumed that pebe must have recommended an RS-485 device thinking that it was RS-232. That comment was unnecessary and patronising and I apologise.

This is great advice and I'm trying to get better at doing this as well.

Sometimes when I get frustrated by a post, I will write a pointed, scathing response, then instead of posting it, I'll cut and paste it into a post-it note and drag it to the edge of my desktop. Then at any time, I can re-read the frustrating post, and re-read my response, and say to myself "Yeah! You tell 'im, me!" and feel vindicated.

Then sometimes the author of the post will back down anyway, or someone else will respond in a less aggressive style, or sometimes I will write a more moderate response and post that. But it's only in extreme cases, like "Evon" recently, that I feel justified in having a "proper argument".

So I apologise for my unnecessary swipe at you, pebe, and I hope you will continue to help out here.
Thanks Kris, and I also would like to apologise for misinterpreting your comments. I was far too hasty and should have thought longer about it before posting my reply.

Again, my apologies to you.
 
@pebe

Your points are all valid. I think part of the issue that makes this harder is not seeing a picture of what I'm trying to do. I don't know what an opto-couple is but there are other issues that I have to contend with.

If I ever wanted to go production it would be required to tap into the existing inputs on the proprietary card. The design of that card forces RS-232 because that's what they assumed everyone would use. I have no control over that so I kind of have to work with it even if it costs a RS-232 converter.

There's a lot more to it but there is a method to my madness :) At least, I hope there is! ;)
 
I assumed this was for a one-off; I didn't know you were going into production with it. In that case it would be better to stay with the RS232, because hacking into a large quantity of boards to get to their CPUs is not a good idea.
 
Yeah, at present it's a one-off prototype but I would love to bring it to the masses and you're spot on, tapping into vias with loose wire is not the way to fly. I'm forced into working with what it is :)
 

KrisBlueNZ

Sadly passed away in 2015
Thanks Kris, and I also would like to apologise for misinterpreting your comments. I was far too hasty and should have thought longer about it before posting my reply.
All good. I guess this must be the time to have the group hug, LOL :)
 

KrisBlueNZ

Sadly passed away in 2015
Aww, that's OK. I said it was a group hug. You can join in as well ;-)

BTW what's with using the KFC logo as your avatar? Are you trying to make us all hungry?
 
Hahaha - no, I kept getting a message after I first registered saying I HAD to have an Avatar and all I was thinking of at the time was heading down to KFC and...well...not only did I find an Avatar but it fit too :) In fact, I think it's actually kind of awesome. The Colonel lives on!
 
Top