Help hooking up a bubble machine

Hi there. I’m setting up a bubble machine toy to be controlled by a Photon. I’m very novice in electronics (I’m more of a software guy).
I opened the sucker up and soldered wires to the same points that are connected by a toggle button. I have my Photon set up in a breadboard with Tinker flashed on it.
I have tried putting the negative terminal of the batteries (with batteries in) into GND and the other end into D0, but it does not activate the toy. I can touch the two wires together to make the toy go, so the soldering is enough.

What’s the right way to set this up? Are the 2 AA batteries required, or can it take power from the Photon?

1 Like

It sounds like you need to use a transistor to open and close the circuit.

This should give you the gist of using a transistor.

1 Like

Yes! That looks like it’ll fix all my problems. I’ll get one of those and fire it up.

1 Like

Ok, Radio Shack didn’t have all of its selection available due to a store wide sale, but I got transistor to work (TIP120).

The problem I have now is the toy only goes at about 50% power when I power it via the Photon. Hitting the toy’s original button still goes 100%. What could be causing this?

Also, connecting it to D0 never worked, and D2 was always on. Is that an issue with my Photon?

How have you wired the transistor? You should be using the toy’s power supply.

Oops, forgot to include the photo.

The toy does have its 2 AA batteries. You can see the wires’ connections in the original photo.

1 Like

I think you have done this correctly but I’m not sure why you are getting the 50% power problem you mentioned.

@ScruffR, @peekay123, do you have any input on this?

@boldbigflank The photon my not be sourcing enough current and therefore may not be getting to saturation with only 3.3v on that BAD (Big Ass Darlington) boy.

I’d try a simple 2N2222 general purpose NPN transistor, if you can afford them (at about 10¢ a piece, retail).

Bear in mind you may have already damaged your output pin with your original wiring. I noticed you are on another pin now… Be careful exposing your fragile pins to big power. :fearful:

2 Likes

I thought that MOSFET looked a little too beefy too.

In all honesty, today is my first time playing with the 2N2222 NPN transistors I have. I often replicate things I help people with on the forum so that I understand it too. So far I have been able to remotely power on a photon, motor, and an LED using my Pi Zero W and transistors.

1 Like

Ok, thanks. I will keep an eye out for those type. They aren’t really the kind of thing you can get shipped, so I’m at the mercy of whatever Radio Shack has in stock.

1 Like

I get most of my electronics from Adafruit. This kit comes with a bunch of transistors and useful components.