Author Topic: arduino-bluetooth LE-transistor problem...  (Read 1202 times)

0 Members and 1 Guest are viewing this topic.

Offline timckiTopic starter

  • Contributor
  • Posts: 27
  • Country: us
arduino-bluetooth LE-transistor problem...
« 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?
This oscilloscope isn't telling me anything all I see is a squiggly line....
 

Offline michaeliv

  • Frequent Contributor
  • **
  • Posts: 260
Re: arduino-bluetooth LE-transistor problem...
« Reply #1 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.
 

Offline bobcat

  • Regular Contributor
  • *
  • Posts: 94
  • Country: us
Re: arduino-bluetooth LE-transistor problem...
« Reply #2 on: March 12, 2016, 02:40:24 pm »
Put a 10K pulldown resistor on the base of the transistor.
 

Offline timckiTopic starter

  • Contributor
  • Posts: 27
  • Country: us
Re: arduino-bluetooth LE-transistor problem...
« Reply #3 on: March 12, 2016, 07:11:31 pm »
10K pulldown thank you, it worked.

Thank you for your time..
This oscilloscope isn't telling me anything all I see is a squiggly line....
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf