Digital Capacitance meter using microcontrollers

Click For Summary
SUMMARY

The discussion focuses on creating a digital capacitance meter using the HSC08 microcontroller chip (MC9S08QG8) and a 555 timer circuit. The user aims to measure the number of signals from an unknown capacitor over a 7.5-second period. Key components include an interrupt service routine (ISR) to count signals and a second ISR to manage the timing for the 7.5 seconds. The proposed solution involves using one interrupt to increment a pulse count and another to calculate capacitance after the timing period.

PREREQUISITES
  • Understanding of HSC08 microcontroller architecture
  • Knowledge of 555 timer circuit operation
  • Familiarity with interrupt service routines (ISRs)
  • Basic programming skills in assembly or C for microcontrollers
NEXT STEPS
  • Implement and test the interrupt service routines for counting and timing
  • Explore the configuration of the IRQSC register for signal counting
  • Research methods for calculating capacitance based on pulse count
  • Learn about optimizing ISR performance for microcontroller applications
USEFUL FOR

Electronics hobbyists, embedded systems developers, and students working on microcontroller projects involving capacitance measurement and timer-based signal processing.

virdip
Messages
1
Reaction score
0
Hey friends, I am trying to make a digital capacitance meter by using a HSC08 microcontroller chip (MC9S08QG8). Unfortunately this is one of those courses where one doesn't know anything because of lack of pre-requisites. Anyhow (enough complaining) what I have been trying to do is the following:
Connect the 555 timer to the IRQ pin of the chip. The 555 timer circuit has the unknown Capacitor attached to it. Now I am trying to measure the number of signals over a 7.5s period. I understand that I need an interrupt service subroutine to count the number of signals for this duration. However I am not sure how to control the count timing. I have been trying to use a delay subroutine such that the IRQSC register is set for counting in cycle of that delay.
 
Last edited:
Physics news on Phys.org
virdip said:
Hey friends, I am trying to make a digital capacitance meter by using a HSC08 microcontroller chip (MC9S08QG8). Unfortunately this is one of those courses where one doesn't know anything because of lack of pre-requisites. Anyhow (enough complaining) what I have been trying to do is the following:
Connect the 555 timer to the IRQ pin of the chip. The 555 timer circuit has the unknown Capacitor attached to it. Now I am trying to measure the number of signals over a 7.5s period. I understand that I need an interrupt service subroutine to count the number of signals for this duration. However I am not sure how to control the count timing. I have been trying to use a delay subroutine such that the IRQSC register is set for counting in cycle of that delay.

You can use one interrupt to just bump a counter variable (the pulse count) and return. Use a second interrupt to trigger on the expiration of the 7.5 second timer. That ISR disables the IO counter ISR, calculates the capacitance for display or whatever, zeroes out the IO counter variable, and re-enables the IO ISR.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
7
Views
3K
  • · Replies 41 ·
2
Replies
41
Views
10K
  • · Replies 2 ·
Replies
2
Views
2K