
Initially it took some time for me to figure this out and that is why the wiring is messed up a bit. Also the pins 5 and 6 are controlled by Timer 0 hence we won’t be having problem in using analog write or servo control operation on those pins.

Stage plot pro serial gen free#
Because of this you are free to use the delay function and millis() function without any problem. The advantage of this library is that it does not disturb the Timer 0 of your Arduino, which is more vital than Timer 1 and Timer 2. Also the analog write function on pins 9,10,11 & 13 uses Timer 1 and Timer 2 hence you will not be able to produce SPWM on those pins. Hence you will no longer be able to use servo library or any other timer related library with your Arduino. There are some drawbacks with this library as well, because the library alters the default Timer 1 and Timer 2 settings in Arduino. We will discuss more about this library in the coding section. The library that we are using is the Arduino PWM Frequency Library. But there are some pre-built libraries which do just the same and can be used as such. This can be done by directly controlling the Timers of the Arduino and toggling a GPIO pin based on it.
Stage plot pro serial gen generator#
But for a waveform generator we need a PWM signal whose frequency can be controlled. But this function is limited only to control the duty cycle of the PWM signal and not the frequency of the signal. People who are using Arduino might be familiar that Arduino can produce PWM signals simply by using the analog write function. Producing Square Wave with Variable Frequency If you want to know more on how the PWM and Sine wave is produced with Arduino read the following paragraphs, else you can scroll down directly to the Programming Arduino section. My board looks like this once all the connections are complete. But I decided to solder it on a Perf board to get the work done fast and make it reliable for long term use. You can build the circuit on a breadboard or even get a PCB for it. Then to get a sine wave we produce SPWM signal on pin D5, the frequency of this has to be related with PWM frequency so we provide this PWM signal to pin D2 to act as an interrupt and then use the ISR to control the frequency of the since wave. The circuit is pretty simple we produce a square wave on pin D9 which can be used as such, the frequency of this square wave is controlled by the rotary encoder. You can also refer the below table to verify your connections. Anyhow, you will not have any such issues as it is all sorted out, just follow the circuit carefully to know which pin is connect to what. Hence I had to mess up with the wiring a bit by changing the pin order. The connections which I used previously didn’t turn out to work dues to some reasons which we will discuss later in this article. The complete set-up is powered by the USB port of the Arduino itself. Also what’s more fun than using a device, that we built on our own.

But other than that it will come in handy for all hobby projects and you need not wait in weeks for the shipment to arrive. Do note that this generator is not of industrial grade and cannot be used for serious testing.

Apart from that, the generator can also produce since wave with frequency control. This function generator a.k.a waveform generator can produce square wave (5V/0V) with frequency ranging from 1Hz to 2MHz, the frequency of the wave can be controlled by a knob and the duty cycle is hardcoded to 50% but it is easy to change that in the program as well. In this article we will learn how quickly and easily we can build our own Function generator using Arduino. While all of these can be purchased, we can also easily built few on our own like the Function Generator and the Dual mode power supply. A Multimeter, Clamp meter, Oscilloscope, LCR Meter, Function Generator, Dual mode power supply and an Auto transformer are the bare minimum equipments for a decent lab set-up. Every Engineer who loves to tinker with electronics at some point of time would want to have their own lab set-up.
