Hoperf HM-TR 232 to TTL

jgershonw1

New Member
Awhile ago, there was a discussion about the Hoperf HM-TR. I bought a batch of the 232 version. Now, I want to convert some of them to TTL. The datasheet (http://www.hoperf.com/pdf/hm-tr.pdf) shows the two versions side by side and I can just barely see the differences. From what I can see, it appears that I can desolder the MAX232 from the board and add a few parts. Unfortuntately, I can't make out what are the components. Does anybody have a high resolution picture of the TTL version?
 

moxhamj

New Member
Yes you could try desoldering but you might end up damaging the board. The SMD is a max232. You could always use another max2232 +/- a few 74HC04 gates to turn the RS232 back into TTL.
 

hippy

Ex-Staff (retired)
Or why not leave it as RS232 and use a 22K fom its output to PICAXE input and drive its input direct from a PICAXE output. That should work; at least it's worth giving it a try. And this way you have a transceiver which can be used with a PC or a PICAXE.

If you need the signals inverting, just use a 74HC00 or similar.
 

moxhamj

New Member
Hippy is right. And if the signals are going into a picaxe, you can correct the polarity inversion in picaxe code so you won't need inverter chips. So this could be as simple as using a 22k resistor.
 

jgershonw1

New Member
I have been using an external MAX232 to do the level conversion. It would be nice to reduce the part count and the 22K sounds like a good idea. I am still interested in seeing a photo though.
 
Last edited:

manuka

Senior Member
22k -who can argue with that.

EXTRA: These HopeRF modules are about to be officially stocked by MicroZed,the Aus. PICAXE agent,& they've asked pretty much the same question. IMHO the RS-232 version is the most versatile & as it's only slightly more I hence recommend it. My PICAXE use with the RS-232 version has been seamless anyway- has anyone even tried TTL ? Stan
 
Last edited:

hippy

Ex-Staff (retired)
You should still be able to use the same 22K trick with ATmegas ... with anything really, the current-limiting is what's important. I've had it working with PICAXE/PICmicro, Parallax Propeller and 74HCxx.

The 'one resistor' can be enhanced with a zener clamp across the input pin, diode blocked to prevent negative current, diode clamped to 0V and +V, and the resistor increased for even greater protection ( I use 470K with the Propeller, just 30uA ).
 

hippy

Ex-Staff (retired)
Here's a handy circuit which comes in useful which can be built using 74HC86 Quad Exclusive OR gates ...

Code:
                                        -.-    -.-      -.-
                                         |     .|.      .|.
                                         |     | | 10K  | | 10K
                                         |     |_|      |_|
                        ___             _|_     |        |
               ___     /   ||---.      /   ||---{        |
To RS232  <---|___|---O    ||   }----O(    ||   |        |
               330     \___||---'      \___||---|--------^-----< From TTL
                                                |
                                                |     ___
                                       ___      }---||   \
              1N4148       ___    .--||   \     |   ||    )O---> To TTL
From RS232 >---|>|----.---|___|---{  ||    )O---|---||___/
                     .|.   22K    `--||___/     |
                     | |                |       O Link to
                 10K |_|                |       O invert
                     _|_               _|_     _|_
 

jgershonw1

New Member
You should still be able to use the same 22K trick with ATmegas ... with anything really, the current-limiting is what's important. I've had it working with PICAXE/PICmicro, Parallax Propeller and 74HCxx.

The 'one resistor' can be enhanced with a zener clamp across the input pin, diode blocked to prevent negative current, diode clamped to 0V and +V, and the resistor increased for even greater protection ( I use 470K with the Propeller, just 30uA ).
Are there any disadvantages to using this method?
 

Dippy

Moderator
Check out the PICAXE enhanced download circuit - it's been running fine for years.

For a very simple non-ic version of an inverting/buffering RS232-UART see this.
Its been used many times on PC-PIC without problem. It may work on your RS232-PICAXE.
 

Attachments

hippy

Ex-Staff (retired)
Are there any disadvantages to using this method?
Yes. You need to ensure that the current is limited enough that it doesn't damage what it is connected to but is still enough to make it work. It usually involves operating the chip outside its official specification but in a way that won't, in theory, do damage. That is often frowned upon by professional engineers plus any resulting damage is your own responsibility.

On the other hand ( don't do this ! ) Microchip show how this method can be used to interface PICmicro to mains voltages, so if it's good enough for them :)

It's also not fully RS232C compliant so while it does work it won't work as well in all cases as a genuine RS232 solution would, such as over long cables. It may also not support higher baud rates, although I've never experienced any problems up to 115200 baud.

Single resistor interfacing for serial is a 'low cost hack', like locking your valuables in a box with a padlock rather than in a professional safe. Only the user can decide what they are prepared to accept; a low cost solution which usually works or a professional solution which is guaranteed to work.
 
Top