Jump to content
  • Advertisement
Sign in to follow this  
macmoy

Piezo Transducer or BC548 Transistor problem.

This topic is 3509 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

help.. i managed to do the drumset using parallel port. the problem is, i cant use the piezo properly.here how i do it. i connect pin2(d1) of the parallel port to the COLLECTOR of the NPN transistor(BC548). then i connect the positive wire of the piezo to the BASE of the transistor. then i connect the ground to the EMITTER of the transistor. I also connect the negative wire of the piezo to the ground. The problem is, when i hit the piezo,sometimes the PC reconizes the input,sometimes don't. I tested using a switch,it works perfectly. So my guess it that the voltage of piezo that is giving then BASE is very low. OR maybe the BASE of the transistor is expecting high voltage than a piezo can give. so how will i solve this problem? please help me..

Share this post


Link to post
Share on other sites
Advertisement
It may be that you're not polling the parallel port at the exact time that the signal is high? I don't think the parallel port is latched?
If so, you should put a latch (or flip-flop) on the detect pin. Then wire one of the outgoing parallel port signals to the "reset" of the latch.
Then, reading looks like:
1) read parallel port input
2) set reset bit
3) clear reset bit

This will make sure that any hit that happens between reads is still detected (turns an edge event into an acknowledged level event).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!