EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: timcki on March 11, 2016, 12:53:54 am

Title: arduino-bluetooth LE-transistor problem...
Post by: timcki on March 11, 2016, 12:53:54 am
HI guys,
I have an arduino with an Adafruit bluetooth le shield. I am using the BluefruitLE_nrf51822 sketch to control pins.
I am turning on a small little ensemble from a greeting card that sings to you
I have made a switch using a 2n4401 transistor  controlled by digital pin 6. the whole thing works, however,

When you first connect to the BLE shield the pins are set to input mode  and are putting out about 1.47 volts.
This voltage seems to be trying to power the circuit, as I am getting a noise out of the piezo.

When you switch the pin 6 to output mode  controlling it high or low the circuit works fine, on/off music/no music

When I hookup everything straight to the pins  GND and pin 6  I do not get the hum....

why is the pin in input mode putting out voltage?
and is there a better way to do this?
Title: Re: arduino-bluetooth LE-transistor problem...
Post by: michaeliv on March 11, 2016, 04:11:03 am
Your setup is not clear. So pin 6 is connected to the base of a 2n4401 which controls a buzzer which is connected how ?
How is bluetooth involved ?
When is the 1.47v measured ? Do you measure it on the Arduino pin even if disconnected from the transistor ?
One thing to keep in mind is that digitalWrite(pin, HIGH) will enable the pull up resistor on a pin if in input mode.
Title: Re: arduino-bluetooth LE-transistor problem...
Post by: bobcat on March 12, 2016, 02:40:24 pm
Put a 10K pulldown resistor on the base of the transistor.
Title: Re: arduino-bluetooth LE-transistor problem...
Post by: timcki on March 12, 2016, 07:11:31 pm
10K pulldown thank you, it worked.

Thank you for your time..