pulse sensor reading (sen-11574)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
User avatar
vitor
Posts: 5
Joined: Sun Apr 02, 2017 12:09 am

pulse sensor reading (sen-11574)

Post by vitor » Tue Aug 29, 2017 7:56 pm

Hello, I'm trying to read the sensor data from pulse sensor (https://www.sparkfun.com/products/11574). Can someone help me? I know that I cannot connect the sensor directly to ESP8266 otherwise, could damage the ADC port. Is it true (according to http://www.instructables.com/id/Online- ... nd-Cayenn/)?

shaoziyang
Posts: 363
Joined: Sun Apr 17, 2016 1:55 pm

Re: pulse sensor reading (sen-11574)

Post by shaoziyang » Wed Aug 30, 2017 1:01 am

pluse sensor use 5V or 3.3V, but esp8266's ADC range is 0-1V, so you need bleeder resistor to reduce voltage.

User avatar
vitor
Posts: 5
Joined: Sun Apr 02, 2017 12:09 am

Re: pulse sensor reading (sen-11574)

Post by vitor » Wed Aug 30, 2017 2:10 pm

Thank you, shaoziyang. I can read the value now, from 0 to 1024. I need to treat this value. Do you have a started point?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: pulse sensor reading (sen-11574)

Post by pythoncoder » Thu Aug 31, 2017 10:24 am

@vitor The webref you provided gives a pointer to a solution. See the code in https://github.com/WorldFamousElectroni ... rduino.ino.

Writing a Python equivalent should be an easy exercise.
Peter Hinch
Index to my micropython libraries.

crizeo
Posts: 42
Joined: Sun Aug 06, 2017 12:55 pm
Location: Germany

Re: pulse sensor reading (sen-11574)

Post by crizeo » Fri Sep 08, 2017 2:49 pm

How did you transform 0-3.3V sensor output to 0-1V input for the ESP's ADC input? Simply cutting off 2.3V by adding a single resistor can't do the trick, so what did you do? :?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: pulse sensor reading (sen-11574)

Post by pythoncoder » Sun Sep 10, 2017 5:43 pm

You need two resistors in series. I suggest 2.2KΩ connected between analog I/P and 0V. Then use a 4.7KΩ resistor between analog I/P and the pulse sensor output. A voltage of 3.3V on the pulse sensor will produce
3.3 * 2.2 / (4.7 + 2.2) = 1.05V on the analog input.
Peter Hinch
Index to my micropython libraries.

crizeo
Posts: 42
Joined: Sun Aug 06, 2017 12:55 pm
Location: Germany

Re: pulse sensor reading (sen-11574)

Post by crizeo » Wed Sep 27, 2017 11:55 pm

Thanks pythoncoder! I used your formula with higher resistors (because I did not have the ones you suggested) and it works perfectly (R1: 410 kOhm, R2: 181 kOhm)!

Post Reply