Re:Working with ADC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Not applicable
Hi I am working on xmc1200 evolution board ,As per the requirement of my project,230v universal Motor connected as Load to the current transformer,where current transformer is connected to 1 of ADC channel of controller pin,Based on this adc voltage i kept threshold voltage as 2V,if<2V means no load condition(Motor runs at 100v) ,>2v means load condition(Motor runs at230V)
,now need to provide1sec delay when switching from noload condition to load condition,for this i developed code ,but output is coming as suddenly on /off of relays happening,i am not getting output as expected,kindly suggest me is their anything to add to this code,or change configurations,kindly find the attachment.

code details:I am calling Load event function and Get Result function inside while(1) loop,
Tried different approches:1)ADC APP inside the ISR i moved if-else part it was working fine ,but cannot add delay inside ISR so i went for other approach
2)in this i Declared a global variable ,Result variable to the global varaible if-else part i moved to while(1) Loop,output is coming as ADC voltage varying but Relays are not responding as per the threshold voltage,,for any value of ADC voltage Both relays are on.
Kindly suggest me how can i run the relays based on threshold voltage ,and how can i solve oftenly on/off relays problem.


Thanks&Regards
PC
0 Likes
5 Replies
Not applicable
Hi PC,

There are noise introduce in the ADC module, hence the result would not be standstill even if the input voltage is stable.
I would suggest you to make an average of several results before you decide to turn on or turn off the relay.
And also due to the calibration weakness stated in the Errata sheet, ADC calibration is required to provide more stable result.
You can refers to the ADC calibration example at the DAVE example portal
0 Likes
lock attach
Attachments are accessible only for community members.
Not applicable
Thank you Jackson for your kindly response,Please suggest me how can i integrate this example ADC_Cal_BG_Source_Example_XMC11 with my application code written for project,Kindly explain



Thanks&Regards
PC
0 Likes
Not applicable
Thank you Jackson for your kindly response,Please suggest me how can i integrate this example ADC_Cal_BG_Source_Example_XMC11 with my application code written for project,Kindly explain



Thanks&Regards
PC
0 Likes
Not applicable
Hi Jackson kindly help me how can i stabilze the changes of current transformer inside the code
0 Likes
Not applicable
Hi ,i am trying to run the universal motor with relays,my condition is when we run mixer grinder without load(means without jar) Motor has to run at100v for this i am using Relay1,with load(with jar),making motor to run at230v,for this i am using relay2,now load and no load condition which is decided by output given by current transformer since Motor connected to current transformer,The output of current transformer is given to one of the ADC channel,

Problem:Their is sudden rise in current transformer so motor running at 100V some times ,230 some times,How can i stabilize to work as per requirement
Kindly help me to solve this since long many days i am trying to solve kindly help me
0 Likes