IO does not work - D0-D7 never output except of blue led [SOLVED]

Hi I am trying to play with IOs. When connecting a small bulb directly to 3.3 and gnu it does turn on. When i am trying to do it with the tinker the light never turns on. i tried everything from D0-D7. important to say my spark is connected and when i am turning the D& to high from the tinker app the blue small led turns on.

Do I miss anything or it might be a faulty product?

@galsk, what do you mean by a “small bulb”?

With tinker, if you set D7 as a digitalWrite pin then toggle that pin you will see the small blue LED on the Spark go on or off. :smile:

@galsk, the point of @peekay123 's question [quote=“peekay123, post:2, topic:5205”]
what do you mean by a “small bulb”?
[/quote]

is, this: If you mean a small incardescent bulb, it’s not meant to work because the IO current driven/sunk by the IO pin might be too low to make the fillament starting to glow.
If you actually meant a LED, then it’s really odd.

BTW: How do you attach the lamp? Dx -> Gnd or 3.3 -> Dx?

even though it works when i am connecting the bulb to 3.3 and GND?

@galsk, the bulb requires too much current to be driven from a digital pin!!! I also don’t recommend connecting to the 3.3v supply either. You should use an LED or use a relay to drive the bulb, powered by the batteries directly, just not via a digital pin.

@peekay123 Ok. 1st of all thanks for the quick response. i will avoid it. I have a battery pack, as you can see on the second image. Where can i find information of supplying external power to a bulb and controlling the On/Off from the Core?

@galsk, search the community. Spark has a relay shield that would be great and @Hypnopompia make a motor control board using a power transistor (FET). What you use is totally dependent on the voltage and current requirements for bulb. Have you considered a super-bright LED instead?

Hi @galsk

Try this link for some ideas of how to driver higher current loads. You want a circuit like the one at the bottom of this page:

http://itp.nyu.edu/physcomp/Tutorials/HighCurrentLoads

2 Likes

Thank you very much. Exactly what i was looking for.

1 Like