NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » WiTricity

August 25, 2012
by Pew446
Pew446's Avatar

I have to do another electronics project for school in second semester, so I have plenty of time, but I was hoping I could create some type of "WiTricity" deal, where I can use inductors to wirelessly transfer power to an led or something. I have been researching this up and down and I am still very confused on what frequency oscillator I should use and such. I have no idea how to find out what I need. I will be posting progress and discoveries here, but if anyone wants to contribute, maybe you've done this already, that would be cool. My first question, however, is that is it possible to simulate a square wave using my ATMEGA and the 14.7456 MHz crystal? Like, could I have a timer that turns a pin high/low at a rate of say, 100 kHz? Thanks. :)

August 25, 2012
by Rick_S
Rick_S's Avatar

Easily, or even faster. PWM can do that, just set your frequency and a 50% duty cycle and you have a nice square wave. With hardware PWM, you are limited frequencies that are divisions of your clock (clock div by 0, 8, 32, 64, 128, 256, or 1024) or 14,745.6KHz, 1,843.2KHz, 460.8KHz, 230.4KHz, 115.2KHz, 56.6KHz, or 14.4KHz.

However, you could use a timer and an interrupt and toggle a port at virtually any frequency you want.

The advantage to Hardware PWM generating the signal is that it doesn't take away from your program to operate. Once setup, and the registers are set, it just does it's thing leaving the mcu free to do whatever else you want.

Rick

August 25, 2012
by Pew446
Pew446's Avatar

Sweet, thanks!

Post a Reply

Please log in to post a reply.

Did you know that our customers love us? Learn more...