How can I convert this circuit to digital using arduino ?
It has two stage : the first generate triangular wave then generate pulses
It has two stage : the first generate triangular wave then generate pulses
Attachments
-
187.1 KB Views: 68
Did you mean 14kHz?If my math is correct that generates a square wave at 14Hz
Yes the frequaIf my math is correct that generates a square wave at 14Hz, but there's no variable element there.
Arduino generates PWM natively at about 500Hz so if duty cycle is the only important thing then one line of code will replace that circuit.
If frequency is important too then the code for your needs isn't difficult but we need more info to give you more guidance.
Yes the frequency is importantIf my math is correct that generates a square wave at 14Hz, but there's no variable element there.
Arduino generates PWM natively at about 500Hz so if duty cycle is the only important thing then one line of code will replace that circuit.
If frequency is important too then the code for your needs isn't difficult but we need more info to give you more guidance.
I use pulses signal to switch mosfetYes, I can. But we need more information about what you're doing with this. Normally with PWM it's the duty cycle (on/off ratio) that's important, not frequency. Such high frequencies are normally associated with power conversion which is a very specialised area andyou wouldn't generally use a uController to generate it. Why is frequency important here? What are you using the PWM for?
it charge battery 2v and the frequency in range 12khzAnd what is the MOSFET controlling? If it's a motor or lamp or solenoid then normally the PWM frequency would be a good bit lower than 12kHz.
Yes, especially as that circuit given by the OP, if using the specified op amp, uses < 10uA @ 6v! 60uW is hardly 'power hungry' and there's no way a digital solution will be any better.What are you harvesting energy from? Many sources are such low power that any battery charging current would be miniscule, so PWM would hardly be justified.
Power budget =300uWHow much power is the opamp taking really? An Arduino or any adequately fast uController solution will take much more. What is your power budget?
Is there opamp with 10uA?Yes, especially as that circuit given by the OP, if using the specified op amp, uses < 10uA @ 6v! 60uW is hardly 'power hungry' and there's no way a digital solution will be any better.
From piezoelectric, yes it low power 300uWWhat are you harvesting energy from? Many sources are such low power that any battery charging current would be miniscule, so PWM would hardly be justified.
by Jake Hertz
by Aaron Carman
by Jake Hertz
by Jake Hertz