# Photon DAC Pin Behaviour

**URL:** <https://community.particle.io/t/photon-dac-pin-behaviour/19361>\
**Category:** General\
**Created:** [January 23, 2016, 7:34am UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361 "2016-01-23T07:34:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomast74](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/thomast74/32/5019_2.png) [@thomast74](https://community.particle.io/u/thomast74)\
**Post date:** [January 23, 2016, 7:34am UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361/1 "2016-01-23T07:34:28Z")

</div>

Hello,

I have a photon, installed with the latest 0.4.9 Firmware from develop and I use the Tinker app from my mobile phone to test the voltage output on the DAC pin.

The pin is set for OUTPUT and with analogWrite I set values. If the value is lower than around 1600 the voltage is 0, if the value is higher the voltage is 4.84. I use the BrewPi Spark with a 12v external power supply. I think with USB power it should have a max power of 3.3v. I guess.

Is this the normal to expected behaviour for this pin with analogWrite?

Thank you,  
Thomas

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [January 23, 2016, 11:34am UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361/2 "2016-01-23T11:34:31Z")

</div>

How do you measure?  
Have you got an oscillogram of your measures?

---

<div class="post-metadata">

**Author:** ![mtoko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mtoko/32/4434_2.png) [@mtoko](https://community.particle.io/u/mtoko)\
**Post date:** [January 23, 2016, 3:17pm UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361/3 "2016-01-23T15:17:40Z")

</div>

Hi

There was an issue with DAC that had a workaround which worked until the upgrade to 0.4.6. This was noted in this thread

> [@analogWrite DAC only once for each pinMode( ,OUTPUT)](https://community.particle.io/t/analogwrite-dac-only-once-for-each-pinmode-output/15393/7):
>
> Hey, I have similar kind of trouble with my photon. I can not use analogWrite() in my code, but it works with the tinker app. I’ve copied the code above and tried without success, any ideas?

There was some information that this was to be fixed in 0.4.9. Does anyone know if this is the case?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [January 23, 2016, 3:38pm UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361/4 "2016-01-23T15:38:05Z")

</div>

The issues are resolved and I’ve also again tested for @thomast74’s issue and can’t see his behaviour.

---

<div class="post-metadata">

**Author:** ![thomast74](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/thomast74/32/5019_2.png) [@thomast74](https://community.particle.io/u/thomast74)\
**Post date:** [January 23, 2016, 9:39pm UTC](https://community.particle.io/t/photon-dac-pin-behaviour/19361/5 "2016-01-23T21:39:52Z")

</div>

Apology, I was too fast to create a topic that is not Photon’s fault. I use a PCB board and measured with an multimeter at the connectors and no the pin’s on the Photon directly.

I checked via SETUP mode and screen that my firmware version is 0.4.9, which it was. Checking with the Tinker app and a normal digital multimeter via GND and the DAC pin. It changes the voltage correctly between 0 and 3.3v depending on the analogWrite value (0 to 4095).

The special PCB board I use did not transfer the pin voltage towards the connector where I measured originally. My mistake.
