Go Down

Topic: MKR Zero DAC on A0 + "Arduino MKR Connector Carrier"  (Read 462 times) previous topic - next topic

sokofromnz

Hey guys,

I have the mentioned config and was wondering if I get a 0-5V Analog Out with it.

Its kinda weird though:

- The MKR Zero declares A0 as the DACs output pin (FAQ on https://store.arduino.cc/arduino-mkrzero)
- The Grove Connector Carrier speaks of Analog Outputs only, including A0 (https://www.arduino.cc/en/Guide/MKRConnectorCarrier)

So is it even dangerous to write something on A0 with the Carrier Board connected?

Thanks
Soko

pert

#1
Apr 23, 2019, 12:13 pm Last Edit: Apr 23, 2019, 12:14 pm by pert Reason: Embed image
If you check the schematic for the MKR Connector Carrier (which you can download from the "Documentation" tab of the product page), you can see the circuit it connects to A0:



The resistors form a voltage divider to reduce 5 V signals to the 3.3 V maximum input voltage of the MKR boards. I believe the capacitor is there to protect the microcontroller's input pin from voltage spikes induced on the cable.

I don't know anything about the DAC functionality of the MKR Zero, but I don't see anything about that circuit that would make it dangerous to use DAC with the MKR Carrier Board. On the other hand, it is possible the circuit could have unwanted effects in specific applications. If this is an issue, you can bend the A0 pin out a little bit before inserting the MKR Zero into the MKR Connector Carrier, so that the A0 pin doesn't go into the MKR Connector Carrier's female header. Then you can still connect to the A0 pin via the female header on the MKR Zero, but not via the A0 Grove connector on the MKR Connector Carrier. Please be careful to only bend the pin the minimum amount necessary, since repeated sharp bends of the pin will weaken the metal and eventually cause it to break off.

sokofromnz

#2
Apr 23, 2019, 12:25 pm Last Edit: Apr 23, 2019, 12:26 pm by sokofromnz
Thanks pert!

I kinda get the drawing and the voltage divider. Although it might not damage the MKR Zero it still doesn't work as an DAC output with the resistors and capacitor.

Meaning: If I put use A0 as an DAC-Out-Pin I might get the set voltage directly on the A0 pin of the MKR Zero.
But I definetly won't get it on the A0 pin of carrier. Neither 3.3V as full-high nor 5.0V as the carrier board doesn't amplify the DAC0/A0 from 3.3V to 5.0V...

thx again
Soko

PS: Having said that: I would need a 5V (or even 10V) real analog voltage  out of my MKR Zero. Any ideas of a shield/board that is capable of doing so. I have 24V supply voltage available...

pert

I would need a 5V (or even 10V) real analog voltage  out of my MKR Zero. Any ideas of a shield/board that is capable of doing so. I have 24V supply voltage available...
I'd guess you would use an op-amp for that purpose, but that is well outside my area of expertise. Hopefully someone else will drop in with a good recommendation for you. It might be helpful if you described what you're using the DAC for.

sokofromnz

Okeydokey, no worries!

I want to set the voltage of a MeanWell RSP-750-48 power supply via the MKR Zero.
Therefore I need an analog output from 2V to ~6V according to its datasheet:
https://www.meanwell.com/productPdf.aspx?i=358

Go Up