Author Options:

Arduino question? Answered

I got the adruino uno recently and i am still learning how to use it. I was wondering if anyone could show how to program it to send a pulse out at the highest voltage and 1Khz continuosly.




Best Answer 8 years ago

the highest 'voltage' that an arduino should reasonably output is 5v, because it runs at ttl logic voltage.

If you want it to pulse higher voltage, you need to use a transistor etc to drive a transformer, or pulse the power boosted from another transformer.

As for the code, depends on how accurate you want it. Quick and dirty is to set up a flip flop code that simply delays for 500ms off, 500ms on, changing the value of the pin (pinvalue = !pinvalue;)

to make it more accurate instead of using the delay(); function, you need to set a loop that checks the millis() value and flopping after it increments a certain number of times. It counts up in miliseconds since the sketch started.


Answer 7 years ago

can you show me the code to make a 3.26mhz pulse?


Answer 7 years ago

That's outside my 'expertise'. Given that the crystal input is 16mhz, that would be REALLY hard for the processor to just 'divide by almost 5'...


Answer 8 years ago

der. thank you. That would get you a solid 1Hz.

Definitely need to adjust my numbers to 500uS...which the duino can still count.