Go Down

Topic: Problem with using a PN2222 Transistor as a switch for a CSR8645 Bluetooth board (Read 967 times) previous topic - next topic

Tristan9497

Hi there,

i am currently trying to upgrade my car HiFi System with a CSR8645 Bluetooth module.
The Module i chose has 5 switching options for Play/Pause Next/Prev Volume-Up-Volume-Down.

The Plan is to use only 3 switches for these 5 operations this is gonna be realized with an arduino nano with holding the buttons for different durations. I can only use 3 switches because of the limitation of free slots in the middle console of my car.

I want to activate five NPN via the 5 digital Pins on my Arduino Nano depending on the pressed buttons.
The switching should be done by connecting the relative port with the COM Port on the CSR-Board. This works fine while i am using only the switch. Once i try to do the switching with the PN2222 Transistor nothing happens.

So finaly to my specific Question ;)
What resistor should i use for the B-Port of the Transistor if C is Connected with the Play-Port and E with the COM Port? I am asking this because i wasn't able to measure any current flowing between the COM and e.g. the Play Port while shorting these two.

I had the improvised Idea of just taking a 100 Ohm Resistor to assure a Voltage<5V at the Base. But that worked only to switch an LED on and of while i connected C to 5V and E to Ground (with a 220 Ohm resistor for the LED obviously);

Ill attach the Manual of the specific Board (even if it isn't that informative) and the Datasheet of the CSR8645 if that helps.


I hope you can help me
If you have any question feel free to ask i am happy for every help i can get
Thanks in Advance

Tristan9497

The exact Module can be found here:
https://eckstein-shop.de/12V-Mini-CSR8645-APTx-Hifi-Bluetooth-40-Receiver-boardhttps://eckstein-shop.de/12V-Mini-CSR8645-APTx-Hifi-Bluetooth-40-Receiver-board

dl324



Grumpy_Mike

Look at page 7 of the manual. You need to connect the switch between com which is a positive voltage and the button, which will be a smaller voltage.

Your schematic is showing you trying to do this as if you needed to connect to com which was a ground.

You need first to measure the voltage on the com input with respect to ground.

If this is 5V or less you need to use a PNP transistor with emitter to com and collector to your play pin.

If this voltage is greater than 5V then you need an NPN transistor to drive the base of the PNP transistor up to this higher voltage first.

Paul__B

If you can be sure the control voltages are 5 V or less, you can use a 74HC4066.

TomGeorge

Hi
Have you considered using opto couplers as your switches?
They would help isolate your Nano from the non gnd based input of the CSR module.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Tristan9497

Look at page 7 of the manual. You need to connect the switch between com which is a positive voltage and the button, which will be a smaller voltage.

Your schematic is showing you trying to do this as if you needed to connect to com which was a ground.

You need first to measure the voltage on the com input with respect to ground.

If this is 5V or less you need to use a PNP transistor with emitter to com and collector to your play pin.

If this voltage is greater than 5V then you need an NPN transistor to drive the base of the PNP transistor up to this higher voltage first.
First of all thanks for your answer.

i wasnt able to measure any voltages form one of the pins to ground (i am probably to stupid to measure properly).
But i was able to measure the Voltage between the Ports which is 1.8V, as you said Ground has a higher potential.

I dont realy know what to do with my measurement because i understood your message like the type of Transistor depends on the COM to GND Voltage.

Now a general Question came up as i read your answer. :)
Is there a general Rule why and when to use a specific Type of Transistor i wanna learn something out of this problem so i dont have to annoy you guys here again. ;)

Tristan9497

Hi
Have you considered using opto couplers as your switches?
They would help isolate your Nano from the non gnd based input of the CSR module.

Tom... :)
Also thanks to you for your effort.

I thaught about something like a optocouplers as my switch but ditched the idea just because i dont have any of them at the moment and would need to order them. Also i thaught it couldn't be that hard to get the circuit running wit my basic knowledge in electronics.

If i cant get it running with Transistors of MOSFET's i will propably have to order and use either optocouplers or relays.

Grumpy_Mike

Quote
i wasnt able to measure any voltages form one of the pins to ground
I didn't say "one of the pins" I said the com pin.

You want to use one of these circuits. What you have already tried is the switching to ground.



In your case replace the 5V or 12V with the COM pin.

Quote
Is there a general Rule why and when to use a specific Type of Transistor
Yes if you want to switch something up to 5V ( or a higher voltage ) use a PNP transistor, if you want to switch something to ground use an NPN transistor.


Tristan9497

I didn't say "one of the pins" I said the com pin.
With that i meant any of the pins to ground so even with COM to GND
well to discribe what i measured a picture will propably the best option Its quiet possible that i measured entirerly wrong.

Furthermore thanks for the schematics! I ordered a set of PNP Transistors and will try to get it to work according to your description once they show up ;)

Grumpy_Mike

Can you measure any voltage? Like the voltage between ground and the Vcc?

It could be that the com pin is being pulsed and so you are not picking it up on your meter.

Tristan9497

Can you measure any voltage? Like the voltage between ground and the Vcc?
Well between VCC an GND should work fine because thats the Ports on which i am supplying my 12 Volts.
But i tried to measure the Voltage from e.g. Play to GND aswell as  Volume-Up to GND both where 0V and my multimeter wanted to switch to AC all the time. If i have the time i am going to hook the com port up on my oscilloscope relative to GND.

TomGeorge

Play to GND aswell as  Volume-Up to GND both where 0V and my multimeter wanted to switch to AC all the time. If i have the time i am going to hook the com port up on my oscilloscope relative to GND.
Sounds like the buttons are mulitplexed/scanned.
Really think about using opto-couplers.
Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Tristan9497

Sounds like the buttons are mulitplexed/scanned.
Just googled it and it sounds like that could be true.
Can you recommend me a fitting optocoupler, i would just order them it might come in handy having some lying around in the future.
I really don't have any idea what to order.

Furthermore i have worked with them even less then with Transistors so my knowledge is far below basic xD.

If i get it to work, with one of the from you guys provided solutions, i don't wanna change anything again but i am going to give both at least a try;)

Grumpy_Mike

Quote
Sounds like the buttons are mulitplexed/scanned.
Yes that is what I meant by pulsed.

Tom why do you think an opto isolator? I can't see where that would help.

Because the pins have to be pulled high the opto would ideally have to have an PNP transistor in them which is not normal. Yes it might be possible to use an NPN in emitter follower mode, but it might not switch high enough.

Go Up