How to handle UART between 5v uC and 12v RF module?

Go To Last Post
10 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all.  I'm using an ATTiny2313a, and H34a 433mhz transmitter module (pinout here: https://www.google.com/search?q=...).  I want to use a 12v battery to get more range out of my H34a, and was planning on using a linear regulator (L7805) to bring that 12v down to 5v just for the ATTiny.  However, I need to have the ATTiny's TX pin hooked up to the "Data" pin of the H34a to output data at certain intervals.  Is this going to cause any troubles, since the ATTiny will be running 5v where the H34a will be hooked directly up to the 12v?  I'm assuming I still want the grounds connected, right?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Greetings -

 

This: http://www.lchstar.com/EN/index....  says that the data input is CMOS compatible. Yes, you share grounds.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I saw that.

 

 

I guess that, since this is purely a transmitter, there will never be anything out of this pin ...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 says that the data input is CMOS compatible

Just to be clear, that means that the data input signal is fine at 5 V, while the RF output transistor is running at 12 V.

 

Disclaimer, tough to fine a true data sheet!

 

JC 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It sounds like it will be ok to connect the data pin directly to the mpu.

What kind of range are you getting now, and what do you expect with the higher voltage?

You said battery power, then said linear voltage regulator which is not the best choice for long battery run time.

 

Tell us more about your wireless project, please.

 

Jim

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

DocJC wrote:

 says that the data input is CMOS compatible

Just to be clear, that means that the data input signal is fine at 5 V, while the RF output transistor is running at 12 V.

 

Disclaimer, tough to fine a true data sheet!

 

JC 

 

Interesting.  So if this transmitter was non-CMOS compatible, would it fry my AVR?  Or simply not register the input 5v as a high?

 

ki0bk - I have yet to test the range at all at any voltage, just thinking ahead with this question.  I'll certainly test 5v first and see if it provides an acceptable range.  I have no idea what range to expect with either voltage, as I've heard lots of various results with these modules.

 

In terms my project, my plan was to provide a 12v rail directly from the battery that the transmitter will use, and a separate 5v rail that is run through the L7805 linear regulator for use by the ATTiny2313a and basically every other component.  I know that linear regulators are much less efficient than switching regulators, but my understanding was that switching regulators generate electrical noise that can disrupt RF transmission (which clearly is a problem for my use case).  I don't anticipate that the 5v part of my circuit will be drawing much power, since there isn't much processing that needs to be done - basically, it just needs to listen for button interrupts and then send the appropriate packet on the TX line.  I'm planning on utilizing sleep modes when a button hasn't been pressed for a certain amount of time, which will further reduce my power consumption.

Last Edited: Thu. Nov 2, 2017 - 06:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Tylerlee12 wrote:
 would it fry my AVR? 

See #3.

 

my understanding was that switching regulators generate electrical noise that can disrupt RF transmission

Only if they were very, very badly designed!

 

 

I don't anticipate that the 5v part of my circuit will be drawing much power, since there isn't much processing that needs to be done

Then you need to take care to select a regulator with low quiescent current

 

Picking the 1st datasheet hit googling "L7805": http://www.st.com/content/ccc/re...

 

Quiescent current is 6mA !!

 

surprise

 

 

I'm planning on utilizing sleep modes ... which will further reduce my power consumption.

Any benefit will be lost with your regulator burning 6mA while doing nothing !

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Interesting.  So if this transmitter was non-CMOS compatible, would it fry my AVR?  Or simply not register the input 5v as a high?

If the module is designed for operation from 5 - 12 V DC, then typically it will have a small voltage regulator on the board to supply a 5V (or whatever) power supply for the logic part of the device.

That regulator might be as simple as a small zener diode and resistor, on inexpensive modules you are not likely to find a "better" regulator.

The output of the module's logic circuitry then capacitively feeds the output driver stage ( s ), which can run at any voltage.

 

The most important par of ANY RF project is the antenna.

"Proper" RF connections, an antenna ground plane, (if needed by the type of antenna being used, and a good antenna will make all the difference in the world.

 

JC

 

 

  

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil - Wow, great catch!  That's something I hadn't even considered.  Any low quiescent current linear regulators you would recommend instead?  

 

DocJC - Thanks for that explanation.  In terms of antennas, I made my own out of copper wire and soldered one onto my receiver and one onto my transmitter.  Here's the guide I followed: http://www.instructables.com/id/...

 

FYI, the receiver I'm using is a 433mhz RXB12 (https://www.google.com/search?q=...).

Last Edited: Thu. Nov 2, 2017 - 09:34 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The title of the thread mentions, "UART"

 

Note that these cheap modules are not good to just connect direct to  a UART!

 

See this discussion only the other day: http://www.avrfreaks.net/forum/t...

 

It is also noted on the page Jim linked in #2:

 

 

EDIT

 

So "Plan 1" was in a separate image:

Last Edited: Thu. Nov 2, 2017 - 09:58 PM