Measuring high/low with BC548

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear all,

 

I had the feeling that I know what I do but the reality is proving me wrong.

 

I try to use a signal from my car (LED-status of my automatic gearshift, neutral vs. drive position) with an ATTINY85 (powered with 3.3V).

My schematic is based on using an NPN-transistor BC548 with a resistor beforehand. The signal going into the resistor comes from the car and is based on status-switching between 0.25V and 4.75V.

The transistor then is grounding (or not) PB2/INT0 (waking up from Idle based on rising edge). Internal Pull-Up is used.

This works in general but the input signal which is 'switching' the BC548 is low with 0.25V and high with 4.75V.

The measured high/low-signal at PB2 seems wildly jumping between the states.

I guess the resistor is maybe miscalculated by me. I tried then with 1MOhm, with 3MOhm, with 10kOhm. But always the same issue.

 

I have the feeling that I do something wrong and hope that you experts here immediately see whats wrong with the setup.

 

Any hint is welcome.

 

Laubfrosch

This topic has a solution.
Last Edited: Fri. Nov 22, 2019 - 10:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Laubfrosch wrote:
My schematic
Would be nice to see it!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Laubfrosch wrote:
My schematic

Please post it!

 

See Tip #1 for instructions.

 

Laubfrosch wrote:
I have the feeling that I do something wrong

So please also post some good, clear, in-focus photographs of what you have.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the tip of how to upload. I will do once at home.

I will send schematic and coding.

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey,

I am sorry but this topic may be closed.

Today my Quimat-Mini-Oszilloscope arrived and I had to realize that the input signal is a PWM-signal with 200Hz (instead of the expected pure high/low voltage).

Consequently my schematic cannot work. Now I will first research the forums on solutions for that before posting again.

I apologize for not being prepared enough.

If the moderator can support please in closing this topic?

ole

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Laubfrosch wrote:
 this topic may be closed.

You do that by marking a solution - see Tip #5.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...