-1

blood glucose breakout board

I am trying to output analog voltage (400 mV) using Arduino Nano PWM pins. Is it okay to directly connect (using jumper wires) the PWM pins to the Vin+ of the INA219 current sensor?

I badly need it for my graduation project. Thanks for the help.

  • I think adding several capacitors of different sizes between the arduino PWM pin and ground would smoothout the PWM signal into constant voltage. Could you show us how yor circuit works? – Filip Franik Feb 24 at 8:41
  • I inserted my circuit connection above. Can you help me? – Jan Lauren Manipol Feb 24 at 9:30
  • So you just want the INA219 to show value of 400mV? There is no circuit that actually uses that voltage? You can achieve that in simpler ways then using an Arduino. – Filip Franik Feb 24 at 9:47
  • 2
    It's unclear why exactly you want this 400mV voltage (or other voltages as well)? You can build a voltage divider from 2 resistors to get 400mV from 5V and GND. Or for general voltages, you want to build a DAC (youtube.com/watch?v=Y2OPnrgb0pY) – Maximilian Gerhardt Feb 24 at 11:07
  • 1
    @FilipFranik please don't use just capacitors. You'd need a resistor as well, or you'll end up destroying the Arduino pin. – Gerben Feb 24 at 14:44
0

PWM pins don't output analog voltages. They output pulses of 5V. You then need to average the output in order to get an actual analog voltage out of it. You should be able to use a small capacitor and current limiting resistor to average out the voltage of the PWM pin. I'm not sure how close to 400mV you'll be able to get. If i remember correctly the PWM pin has a value of 0 - 1023, and 1/1024 is .0048828, or 488.2 mv, so your lowest possible output will be almost 100mV too high. You might need to add a voltage divider to the output to get the output you want. Then again, if all you want is a fixed 0 or 400mV you could accomplish that with a digital output pin and a fixed voltage divider - no need for PWM.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.