RC circuit, discharge with digital signal from FPGA

AI Thread Summary
The discussion focuses on measuring the charge time of an RC circuit using an FPGA, specifically for a 4x4 matrix keypad. The user seeks to discharge the capacitor with a signal from the FPGA without premature discharge. Suggestions include using a tri-state output from the FPGA to pull the capacitor low through a resistor, ensuring the discharge current remains within the I/O pin's rated limits. Additionally, using a GPIO to control an NPN transistor for discharging is proposed. The user is open to exploring both internal and external circuit options for this task.
ttsky
Messages
20
Reaction score
0
Hi all,

my task is to measure the charge time of an RC circuit with a counter using FPGA, once the cap is charged, i must discharge it again for next input. Idea is to discharge it with a signal from FPGA, but what sort of circuit would allow this without discharging the cap prematurely?

if it helps, the circuit is for a 4x4 matrix keypad, row and colums tied to resistors and a cap, each button press should produce a diffrent charge time, i need the caps to be discharged before next keystroke.


Thanks

∫Aziz∫
 

Attachments

  • Untitled Diagram.jpg
    Untitled Diagram.jpg
    9.8 KB · Views: 538
Engineering news on Phys.org
I'm not sure I understand your stated task. Are you saying that you need to do this without any external supporting circuitry for the FPGA or do you intend on using external components?
You can use the FPGA alone, but your resistor values will need to be increased and the cap value lowered such that the FPGA I/O pin can be used as a discharge by pulling the cap low from a tri-state output (probably through a low value resistor to limit the current). To do this you need to set the resistor and cap values that the current in the discharge side is below the rated sink current of the I/O pin for the selected part. Search through the app notes of the various FPGA manufacturers about using their parts for A/D or with special inputs dedicated as comparator - I know Lattice has notes that describe this use.
 
You can use a GPIO - directly to a Base on an NPN, with a resistor to limit current. Cap ( to be discharged) -- Resistor -- Transistor Collector -the Transistor Emitter to ground.
 
Thank you for reply, There are no limitations on external circuits, however if i don't have to then i wont, i will explore those options and post an update soon.

thanks
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top