Candy Dispenser Not Working

Hi. First imp project. Received email from Jamesco with this project using the imp and April board enabled candy dispenser. I ordered all the pieces parts and but no love. All parts connected as per the instructable. The sketch works from the iphone. If I meter across the mosfet I see the pin go to a little over 5v when I press the dispense button on the phone. But the motor never runs. I have swapped out the mosfet for another and it does the same thing. To me it seems either the instructable is wrong or missing a step or a component (but going over the pictures, I do not see where that is possible if the pictures do show the actual project used in the final assembly), or is it possible my April board is defective as that is the only part I have not replaced yet.

Thanks for all replies. I would really like to get this first project off the ground.


Meter pin 9 relative to Ground. What is that normally and what does it do when you request candy? Do the agent and device logs respond in the correct way?

Yes. I am pretty sure the imp side of things is working correctly. If I remember I correctly I get 3v from 9 to ground. But I will have to double check.

Can you take some close-up photos of your april board with parts? Maybe we might be able to see something amiss.

If I click on the dispense button I get 3.25 volts on pin 9 to ground. Otherwise there is 0 volts. Thanks for taking a look. I had shelved this out of frustration. It would be great to get it back together and get some skittles flowing…

I cannot see anything wrong there and it seems like your pin 9 is functioning so do you agree that rules out the april board, imp and such? The mosfet is not functioning or the power supply is not sufficient to run the motor or the motor is bad or ???

I think you can short from the middle pin (drain) to the ground (source) of the mosfet as a way of bypassing it to test the motor.

I have not built this but it looks like a relatively straightforward circuit.

Yup. That is what is making me crazy. Yes. If I short the mosfet the motor runs. I used the original mosfet and just in case, replaced it with another from RS with the same results. So I don’t know what to make of it. The 3v on the mosfet should be enough to pull it down and give me my 6V to the motor. I don’t know what else is the problem. I appreciate you taking the time to look, though.

You’re using the very same mosfet as the Instructable? And there isn’t any mistake in polarity (if that’s possible). Also, did you order more than 1 mosfet and try another one? Maybe it’s bad.

Too bad the author didn’t include an actual schematic. That’s a lesson to anyone posting an Instructable or project … please include a schematic.

What is the available current on your power source?

What about diode clamping motor? Connected right?
May be Drain connect Pin Dst un April board - not sure from picture.

Hey @BuzzKill - a few things to check right off the hop:

  1. Did you get the correct FET
  2. Is the positive lead of the motor connected to Vin
  3. Is the negative lead of the motor connected to the middle pin of the FET
  4. It looks like the middle pin of the FET might be soldered to the Dtct pin - that could be bad if it’s happening.

If those are all working, we’ll look at some more stuff.

Give us better close-up photos of both sides of april board.

Hmm … well I may be on to something. Not sure. The MOSFET is an IRF510 and the gate voltage (3V) from the April may not be enough to get the motor to go? I can short the leads and it the motor runs fine. So I know things are wired correctly (in theory). Thanks for all the answers! No it is not soldered to the Dtct pin.

IRF510 doesn’t fit! Or can fit or not, depends…
Because Gate to Threshold Voltage is 2…4V.(see data sheet).
Find another FET with max Threshold Voltage about 2V, like Adafruit mentioned IRLB8721 or other.

Replaced with an NTE 2395. Still no love. Could the resistors on the motor be the issue? The diode and all that are were they are supposed to be.

Going to order the ones from Adafruit. I guess I am on pause again for a few more days. Thanks everyone!

NTE 2395 is the same: 2…4V threshold level and you get one with threshold 3,4V, imp cannot drive it.

Hello, did anybody figure this out? I’m having the exact same issue. If I disconnect the middle pin that goes to the motor ground, when I press dispense the middle pin shows 6.3 volts on the VOM, but if I leave it connected to the motor ground, and press dispense the VOM shows 0. If I jump positive to the Gate, the motor spins? Driving me nuts also, any additional ideas?

Mine is still no worky even after changing out the mosfet. :frowning:

Does the following code (it should be the only thing in your device code) make the motor spin?