Change Vin power supply on run

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

Hi,

I'm building low power device which will be powered from battery and supply voltage for XMEGA will be 1.8V, but device also has possibility to communicate via USB, so when I plug a USB cable then I have to switch to 3.3V (2.7V - 3.6V) with power supply because USB can't be used with 1.8V. Can I manage that on run without reset? Is it also possible to change system clock from 1MHz to 8MHz by changing prescaler on run?

thanks,
adriand

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

I'm fairly certain that you can change the clock on the fly, I have done this, and as far as I recall, it's standard practice, as the XMega strats up at some standard clock speed(internal 2MHz? it'll be in the data-sheet).

Not so sure about the Vcc, though. It seems to me that you might need to ramp it up slowly, but I'm just guessing.

Quebracho seems to be the hardest wood.

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

thanks John, so I maybe try change Vcc at the reset state, hope that will be ok..

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

You could use a low drop-out regulator like the TPS78218. 1.8V and 0.5uA quiescent current so it won't kill your battery.

Otherwise a nice big capacitor might work, or there are ICs designed to do exactly what you want but depending how low you need to go on idle current they might not be suitable.

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

mojo-chan... sorry, but this is not answer to my question. I'm using 1.8V LDO (TPS734XX), but when I plug USB cable for communication with PC I have to power my xmega with voltage from 2.7-3.6V, so I have to increase 1.8V to e.g. 3.3V. What I'm asking is if I can do that on the run, if it is ok for a chip (?)

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

If you can change the voltage without spikes, overshoot or undershoot and stay within the voltage limits of CPU frequency used, there is no reason why you shouldn't change voltage on the run.

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

An inductor and a couple of capacitors should do it. Enable brown-out detection so you get a reset if something goes wrong, and use the .noinit section or EEPROM to save data in that event.

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

that's what I need, I'll give a try that

thanks you all!

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

Hi, I want to share with you my test results. So, I made circuit that automatically switch Vcc voltage from 1.8V to 3.3V when USB is plugged in without reseting uC and it works very good. I don't have any inductors, just 10uF, 100nF on each Vcc:Gnd pair pins. What's more, datasheet describes that I need to have 2.7V - 3.3V range for USB use, but it works with 1.8V as well.

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

Interesting results. What speed are you running the CPU at? Seems like you could only get low speed USB with such a low voltage.

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

Yes, it's low speed and CDC class device

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

Thanks, useful information.