1451 views|2 replies

424

Posts

8

Resources
The OP
 

Start with a Routine [Copy link]

This post was last edited by lehuijie on 2019-11-24 22:08

I have the board in hand but I don't know what to evaluate, so I'll start with the ADC acquisition photoresistor routine.

First look at the schematic diagram

R22 is a voltage divider resistor. It is found from actual tests that the resistance of the voltage divider resistor is too large, resulting in a small linear range of the data collected by the ADC.

The following group shows the values collected by the ADC when the finger completely covers the photoresistor, which is basically the same as the value collected under light. The sensitivity is designed to be too small.

This post will be updated continuously...

image.png (19.5 KB, downloads: 0)

image.png
This post is from stm32/stm8
 

424

Posts

8

Resources
2
 

The first group of ADC data is the low bit, the second group is the high bit, and the third group is used for segmentation, which is 00. The ADC data is right-aligned.

This post is from stm32/stm8
 
 

424

Posts

8

Resources
3
 

This is the data read from the serial port and transmitted to MATLAB. MATLAB displays the data waveform. The waveform below is the spectrum after FFT.

The waveform fluctuation is only caused by whether I press the photosensor or not, otherwise there is only a straight line.

I originally recorded the video, but I don't know how to upload it to the post. I will look at how to upload it during the weekend. I will upload the code and introduction together during the weekend.

I don't know why the Chinese characters are garbled yet. I'll check it out in the next two days.

This post is from stm32/stm8
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list