Hi, im trying to make a variable voltage by using the PWM output from my arduino, analogwrite with FirmataVB, and an RC Filter.
here is a diagram of my simple set up:
Ive tried testing the circuit with a multi meter and the meter doesnt change from 0v using analogwrite.
I tried using digitalwrite to eliminate any conection problems eg with the multimeter and that works fine.
Below is my VB Code, nice and simple. Trying to control the voltage by using a slider bar in VB. (Have tried simple commands too and these dont work).
Arduino is running Firmata Basic.
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load FirmataVB1.Connect("COM4", 57600) End Sub Private Sub TrackBar1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TrackBar1.MouseUp FirmataVB1.AnalogWrite(11, TrackBar1.Value) End Sub End Class
Edit: The slider bar in VB has a min value of 0 and a max value of 255.
The capacitor has polarity and is wired with negative pin to ground.