7891 views|14 replies

237

Posts

0

Resources
The OP
 

STC8A8K64 MCU ADC input is disturbed [Copy link]

 
This post was last edited by elec32156 on 2020-8-7 21:15

The ADC port of the STC8A8K64S4A12 chip is used to collect the voltage of the linear Hall. The default output voltage of the Hall is about 1.65V. The actual test found that there was spike pulse voltage interference in the ADC input, with an amplitude of about 400mv and an interference level duration of about 3us (as shown in Figure 1). The ADC sampling trigger threshold is set to 12mv, which is easy to be triggered by mistake, causing the device to not work properly. It is not clear what caused this interference;

The following verification tests have been performed, but the cause of the problem has not been found:
1) The ADC pin is left floating, and the measured pin has high and low level pulse jumps (as shown in Figure 2). I don’t know if this level jump caused the spike pulse after the 1.65V was connected; the ADC input was disconnected, and the pin was connected to the ground with a 10K resistor alone. The measured voltage also fluctuated, and occasionally there were spikes, as shown in Figure 3


2) This chip has a total of 15 ADCs available, and only some of the outputs have interference. As long as the pin has interference, there will be such high and low level jump pulses when measuring its floating state, but the waveforms output by different pins will be slightly different;
3) A 1K resistor is connected in series between the Hall output and the ADC, and 100NF is connected in parallel to the ground. It is found that the interference spikes are gone, but the waveform becomes Figure 4, and occasionally there will be a drop of about 100mv.


4) Changing the VCC input filter capacitor of STC8 from 0.1UF to 10UF+0.1UF, no improvement; changing the magnetic bead between VCC and AVCC to a 22R resistor, no improvement; the schematic diagram of the power supply is shown in the figure


5) Considering whether there is any other circuit interference, all other devices on the board were removed, leaving only the microcontroller and the peripheral power supply resistors and capacitors, and the power supply was connected from the VCC pin filter capacitor to the 3.3V stabilized power supply with a flying wire. The phenomenon still exists.

I would also like to ask teachers and seniors to give me some advice, thank you very much!

This post is from 51mcu

Latest reply

hfe
I called STC today and was told to connect a 103 capacitor to the ground. It was tested and it worked. The conversion result no longer showed 0. I will continue debugging. USB conversion will also be affected. Changing a USB conversion tool may have unexpected results.   Details Published on 2022-8-24 16:54
 

310

Posts

5

Resources
2
 

You can try changing the board or the MCU.

This post is from 51mcu

Comments

I have replaced multiple boards and multiple MCUs, and the phenomenon is the same.  Details Published on 2020-8-8 14:46
 
 
 

396

Posts

0

Resources
3
 

The hardware is not well designed

The analog input channel can add an RC low-pass filter

This post is from 51mcu

Comments

My third experiment added an RC low-pass filter, but it was still not a stable input voltage. Occasionally, there would be a voltage drop of about 2ms. I don’t know where this came from.  Details Published on 2020-8-8 14:49
 
 
 

7422

Posts

2

Resources
4
 

Try adding filtering

This post is from 51mcu
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

4005

Posts

0

Resources
5
 

Does your interference signal have any periodicity? Try to program the microcontroller to do nothing to see if it is a software problem.

This post is from 51mcu

Comments

This has not been verified yet, thanks for the reminder, I will verify it.  Details Published on 2020-8-8 14:55
 
 
 

52

Posts

0

Resources
6
 

The signal doesn't seem to have any periodicity. I wonder if there is something wrong with your program.

This post is from 51mcu
 
 
 

237

Posts

0

Resources
7
 
Song Yuanhao posted on 2020-8-7 21:27 You can try changing the board or the MCU

I have replaced multiple boards and multiple MCUs, and the phenomenon is the same.

This post is from 51mcu
 
 
 

237

Posts

0

Resources
8
 
whuer posted on 2020-8-7 22:38 If the hardware is not well designed for the analog input channel, you can add an RC low-pass filter

My third experiment added an RC low-pass filter, but it was still not a stable input voltage. Occasionally, there would be a voltage drop of about 2ms. I don’t know where this came from.

This post is from 51mcu
 
 
 

237

Posts

0

Resources
9
 
huo_hu posted on 2020-8-8 01:51 Does your interference signal have any periodicity? You can write a program that does nothing on the microcontroller to see if it is a software problem

This has not been verified yet, thanks for the reminder, I will verify it.

This post is from 51mcu
 
 
 

1w

Posts

142

Resources
10
 

Use two channels to monitor the ADC input and power supply simultaneously. Interference may come from power supply conduction.

This post is from 51mcu

Comments

Most likely from the power supply  Details Published on 2020-8-21 10:04
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

6062

Posts

4

Resources
11
 
chunyang published on 2020-8-10 19:17 Use two channels to monitor the ADC input and power supply at the same time. The interference may come from the power supply conduction.

Most likely from the power supply

This post is from 51mcu
 
 
 

234

Posts

0

Resources
12
 

Try to power the board with batteries. Also:

1. MCU analog AVCC power supply, plus π-type filtering

2.ADC pin input plus RC filtering

3.ADC plus software filtering

These are the most basic methods

This post is from 51mcu
 
 
 

927

Posts

0

Resources
13
 

Keep going, I look forward to the next analysis.

This post is from 51mcu
 
 
 

14

Posts

0

Resources
14
 

Did you solve it in the end? I also encountered the same problem. When the external circuit is at a specific impedance and a specific voltage, the sampling value = 0 appears irregularly.

This post is from 51mcu
 
 
 

14

Posts

0

Resources
15
 

I called STC today and was told to connect a 103 capacitor to the ground. It was tested and it worked. The conversion result no longer showed 0. I will continue debugging. USB conversion will also be affected. Changing a USB conversion tool may have unexpected results.

This post is from 51mcu
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

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