Search found 110 matches

by Archibald
Thu May 24, 2018 11:30 am
Forum: General Discussion
Topic: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)
Replies: 35
Views: 51532

Re: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)

Let's consider having calibrated your pH sensor on its own (including the electronic circuit board). If pH=7, the output voltage from the electronics should be 2.0V (ignoring the 'Offset' which should be small). If pH=0, the output voltage should be 0V and if pH=14, the output voltage should be 4.0V...
by Archibald
Wed May 23, 2018 11:52 pm
Forum: ESP-IDF
Topic: ESP32 - I want to decode a Manchester bitstream using I2S
Replies: 2
Views: 5245

Re: ESP32 - I want to decode a Manchester bitstream using I2S

I have received a Manchester bitstream over a very long length of cable so there was significant attenuation and considerable waveform distortion. Due to cable capacitance, the incoming signal looked more like a triangular wave and the amplitude of each peak (positive or negative) depended somewhat ...
by Archibald
Wed May 23, 2018 10:23 am
Forum: General Discussion
Topic: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)
Replies: 35
Views: 51532

Re: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)

With those resistor values, the formula for pH in your code should now be . . . . pHValue = 4.24*voltage+Offset; My ESP32 ADC functions over the range 0.17V to 3.15V (corresponding to the digital range 0 to 4095). With that voltage divider in place, the range at the input to the voltage divider woul...
by Archibald
Tue May 22, 2018 2:29 pm
Forum: General Discussion
Topic: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)
Replies: 35
Views: 51532

Re: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)

That PH meter - the value changes\steps up every 59.16mV so question is if ESP's analog reading has resolution of reading such voltage value granularity - e.g 59.19mv resolution. Maybe it is possible to set up the gpio pin to accept a voltage range of PH values (+-0.41212+bias) mapped to pin readou...
by Archibald
Tue May 22, 2018 1:02 pm
Forum: General Discussion
Topic: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)
Replies: 35
Views: 51532

Re: i want to map analog pins on 5volt between 0 to 1023 (10 bit resolution)

With the input of the pH meter circuit board shorted out (or the electrode in a solution with pH=7) the output should be close to +2 volts. It will not be exactly +2V due mainly to the tolerance of resistor values. That's why when setting up your meter you need to put a value for "Offset" into the c...
by Archibald
Sun May 20, 2018 1:03 am
Forum: General Discussion
Topic: Sigma-delta or Led Channel (PWM)? Which is better?
Replies: 6
Views: 8426

Re: Sigma-delta or Led Channel (PWM)? Which is better?

As far as I'm aware, LEDC can flash an LED only down to 1 Hz. It sounds like you need to drive the outputs directly from code especially if you wish to drive the 8 outputs in a sequence. Beware of photosensitive epilepsy ( link ). Regarding . . . . If you add a capacitor between the output pin and g...
by Archibald
Sun May 20, 2018 12:43 am
Forum: Hardware
Topic: Incorrect ADC Voltage After Calibration
Replies: 4
Views: 7267

Re: Incorrect ADC Voltage After Calibration

If you look at the example graph under "ADC Calibration" here . . . . http://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/adc.html . . . . . . you will see that as the input voltage changes from zero volts to about +0.1V (not -0.1V) there is no change in the digital reading: it remains...
by Archibald
Fri May 11, 2018 10:51 pm
Forum: General Discussion
Topic: C++ SPI for Max 31855 Thermocouple Amp
Replies: 28
Views: 30530

Re: C++ SPI for Max 31855 Thermocouple Amp

From the datasheet "A complete serial-interface read of the cold-junction compensated thermocouple temperature requires 14 clock cycles. Thirty-two clock cycles are required to read both the thermocouple and reference junction temperatures". As the documentation says the total data length is in bits...
by Archibald
Fri May 11, 2018 9:29 pm
Forum: General Discussion
Topic: C++ SPI for Max 31855 Thermocouple Amp
Replies: 28
Views: 30530

Re: C++ SPI for Max 31855 Thermocouple Amp

With regard to chip select, take a look at spicommon_cs_initialize and spics_io_num. I've not studied this API in detail but I don't think you should need to drive CS directly. Of the five transaction phases, you should be able to skip straight to the read phase. The clock pulses from the ESP32 shou...
by Archibald
Fri May 11, 2018 8:33 pm
Forum: General Discussion
Topic: C++ SPI for Max 31855 Thermocouple Amp
Replies: 28
Views: 30530

Re: C++ SPI for Max 31855 Thermocouple Amp

If you use the hardware VSPI or HSPI interface, my understanding of the documentation here is that a "transaction" of one byte of data would take about 24μs. Your 14 bits of data should take less than 2μs longer (assuming the API can cope with 14 bits). In contrast, I am bit banging a byte of data w...