Message Boards Message Boards

ModelPlug: Arduino Due DAC Support


I've been attempting to use SystemModeler to stimulate analog outputs on an Arduino DUE DAC pins (DAC0 & DAC1). Thus far, no joy. At this point, I'm not sure whether my problem is with ModelPlug or the StandardFirmata loaded on the board. Does the ModelPlug provide support for true analog output? Is there a good way to provide true analog output (i.e., not PWM) using these tools?

BTW: I was able to set up the system using an Arduino UNO using PWM. Unfortunately, when reading the PWM signals and converting them back to the analog equivalent, these were not continuous (ie, exhibited discontinuities from time to time).

POSTED BY: rcoggeshall
1 month ago

Hi rcoggeshall,

I don't have an Arduino DUE at hand to test. But ModelPlug should support all the inputs/outputs reported by the Firmata. You can try to upload a different variation, instead of StandardFirmata try AnalogFirmata and check if more analog outputs are reported.

The problem with the discontinuities when reading the PWM signal seems to be because you are not using a filter at the output of the PWM. Here's a nice blog post that explains it and also shows how to make a filter to get continuous from the PWM output

1 month ago

I am not sure what you are attempting to do. But there is no such thing as a Analog Output .. The analog pins are for read only.

What you mean by Analog output is a simulation using PWM digital pins (virtual analog voltage) . Therefore , if you are seakign to create any special voltage other that 5 volts , then you will need to produce using a voltage regulator circuit with Arduino engaging logic to control the voltage regulator.

Anyhow, you may also reach from the PWM pulse to a steady analog DC voltage using appropriate capacitor rail with protection diode which will deliver a normalized voltage output.

Hope this will help.

POSTED BY: Jose Calderon
16 days ago

Group Abstract Group Abstract