Voltage Regulator
To use the ESP8266 and the PPD42NS together we need 5V and 3.3V.
There are some ways to achieve this.
First option
Buy a LM1117.
Second option
I didn't have a LM1117, but got a LM317 and two resistors.
The schema to build a voltage regulator with this is:
The source of the image is in https://github.com/opendata-stuttgart/sensors-software/blob/master/schematics/voltage-divider.fzz
Important: The LM317 pins are not as expected! The ADJ is the left pin. For reference see: http://www.st.com/web/en/resource/technical/document/datasheet/CD00000455.pdf
Test the voltage
Using the Arduino it's really easy to measure the voltage. The program is:
void setup() { Serial.begin(9600); } void loop() { Serial.println(analogRead(A0) * (5.0 / 1023.0)); delay(1000); }
The resulting voltage should be around 3.16V.