I am brand new to coding with Arduino. I need to set up a voltage gradient starting from 0.5 v in increments of 0.5v upto 10v. I did some research and found the IRF520 relay module that can function with an input of 3-5V while providing an output within the range of 0-20V. I am using the PWM capability of the arudino to set up the gradient, however the starting output voltage seems to be determined by the power supply and not the code with random increments (approx 0.1 instead of 0.5 v). Though I have looked through videos and the available datasheets, I am not sure if the ifr520 is able to go below 0.5v when supplied with high power. I would greatly appreciate any help and suggestions is this regard. At present, my irf520 is powered by a power supply (3.5-25v range capacity), the arduino is connected to the ground and pwm to the signal pin of the module. The + and gnd outputs to a multimeter.
If you really want help, you need to supply a schematic of your project, including the values of all resistors and capacitors, and include the power supply. In order to stop the stepping voltage, you need to have a filter section that includes a fairly large capacitor. Also, please tell us how fast you need to change the voltage gradient values. That same capacitor will also slow the changes!
Thank you for your replies. Let me explain as best as I can, I am building a behavioral assay that needs to drive a low voltage current through a tissue sample (0.5 v - 8 v). I need to generate this gradient in a step up manner with a 2 minute interval between each step. Which is why I thought the arduino PWM ability might be useful. I am presently using a signal generator (0-10v, 0-22mA) which is very useful but manual and hence prone to human error. I was trying to think of the best way to automate this gradient using a microcontroller and a relay module. At present I am only using a 5k resistor between the relay output and the tissue to generate a current >3mA at the output. I will take a look at the DAC module. I would also like to add I am a core old school biologist and this is my initiation into setting up an interesting experiment, so thank you all for the help!