Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontroller UART device at sleep

Status
Not open for further replies.

wolf12

Advanced Member level 4
Full Member level 1
Joined
Mar 31, 2011
Messages
109
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Visit site
Activity points
2,102
How to turn off a UART device connected to a microcontroller at sleep mode? Is it safe to disconnect ground of the UART device?

Thank you.
 

Hi, which microcontroller you are using? There are a lot of architecture that have options to low power and also they provide facility how should this module behave during sleep. Also many manufactures are now providing to disable clock that to that module like (pic24F, dsPic33, ARM(7, 9, 11) series, MSP430F, STM controllers). Disconnecting GND is not a good option as when the devices wakes from sleep how the UART is connected again?

Enjoy!
 

Hi, which microcontroller you are using? There are a lot of architecture that have options to low power and also they provide facility how should this module behave during sleep. Also many manufactures are now providing to disable clock that to that module like (pic24F, dsPic33, ARM(7, 9, 11) series, MSP430F, STM controllers). Disconnecting GND is not a good option as when the devices wakes from sleep how the UART is connected again?

Enjoy!

I'm using atmega328p with arduino software uart. I was disconnecting GND before sleep and connecting GND after wake through a transistor used as a switch. The reason I did that is when I'm putting the micro controller to sleep, sometimes the uart devices connected to it get power through RX TX lines. And they also sometimes wake the micro controller when its not supposed to. Is there a better way?

Thank you.
 

Can you post your circuit? Also before you put microcontroller to sleep can you disable the UART module and Enable that again when it wakes up. Also can you put the UART pins in to high impedance mode after you disable UART as stated above.

Enjoy!

I'm not using hardware uart. I'm using software uart. I think the hardware uart is also power down in the sleep mode I'm using. By high impedance do you mean to make them as inputs?, I can but then I need to put pull up or pull down resistors right? Or I can make them as Outputs and put the pin state to low. Is it the best method?

The circuit is attached.
9210189900_1376573033.png
 
Last edited:

If you are attempting to conserve power by put the microcontroller in sleep mode, you should probably consider ways of powering down the attached UART devices as they may consume significantly more power then the microcontroller itself.

What specific devices are attached to the UART?

Are there more than one and if so are you using an analog MUX/DEMUX to switch from one to the other?


BigDog
 

If you are attempting to conserve power by put the microcontroller in sleep mode, you should probably consider ways of powering down the attached UART devices as they may consume significantly more power then the microcontroller itself.

What specific devices are attached to the UART?

Are there more than one and if so are you using an analog MUX/DEMUX to switch from one to the other?


BigDog

Yes, I can turn off the UART devices by disconnecting ground or pulling down VCC, TX, RX pins of UART devices. I tried using CD4052 as MUX but my time requirements (switching per 20ms) corrupts the data when using CD4052. So now I'm using several software serial ports. And no data corruption occurs.

A logger, GPS and a bluetooth module are attached to microcontroller.
https://www.sparkfun.com/products/9530
https://www.adafruit.com/products/746#Technical Details
https://www.sparkfun.com/products/10393

VCC pins of UART devices that consume less than 20mA are connected directly to micro controller pins.
If I put logic low to VCC pins, I see that even at sleep the UART devices get power through RX TX lines, so one method is to disconnect GND. This works.

Another way is to set RX TX as outputs and set them to low state, then sleep. But when waking up I have to reinitialize software serial port. This also works. But I don't know which method is the best.

Nice to get your advice after along time :)

Thank you.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top