You have no items in your shopping cart.



Profile Informations

Login Datas

or login

First name is required!
Last name is required!
First name is not valid!
Last name is not valid!
This is not an email address!
Email address is required!
This email is already registered!
Password is required!
Enter a valid password!
Please enter 6 or more characters!
Please enter 16 or less characters!
Passwords are not same!
Terms and Conditions are required!
Email or Password is wrong!
Captcha is required!
Captcha is wrong!

Arduino Signal Generator Build On Protoshield

There is a simple signal generator kit in our store, it selling well ,but it’s source is not released so we can’t modify it for more DIY.

The principle of this signal generator is like a 8bit DAC, so just need some resistor we can build it on Arduino . We make a prototype on the Arduino prototype shield :

The schematic is very sample .Note that one thing,  the higher precision resistors you used , the better effect.

How to write the code ? On the contrary of using a ADC , the same 8bit for a voltage express, 0xFF means 5V(Depend on your I/0 voltage level) and 0×00 means 0V, VCC divided into 256 , each represents a voltage value.

For the sine wave , we could build a voltage table for the waveform , divided a cycle into 256 :

unsigned char sin_tab [256] = {

244,245,246,247,248,249, 250,251,251,252,252,253,253,253,253,253,254,253,253,253,253,252,252,251,
251,250,249,249,248,247,246,245,243,242,241,239,238,236,235,233,231,230, 228,226,224,222,220,218,

Of cause , it can be divided it into 512,1024, the more subdivision the better effect.

Try just put the value of this table into the I/O register, you can see a nice sine waveform in your DSO:

It’s easier to generate a triangle wave than sine wave. Just make the I/O output since the increase in proportion, you can see the waveform like below:

It’s the easiest way to generate the square wave ; )  Just pull all pins high and low alternating.

We can generate many special waveform if we want:

It just a simple signal generator , so you do not expect the waveform of good quality. It’s also hard to make the wave in fixed frequency, but it don’t means you can’t . In this shield we add a button for changing the different waveform , and maybe you can add one more for frequency modulation – just modify the interval of extend the output , you can change the frequency.

Get more latest information about this KIT and the code , you can login our iforum.