Help its for charity - Dog treat dispenser

I work for a charity called DEMAND, we design and manufacture bespoke pieces of disability equipment. We have a project running at the moment to produce an electric single dog treat dispenser for a lady in a wheelchair that requires a guide dog, it is required to periodically give a guide dog treats however she is unable to do this, hence our device.

We are design engineers not electrical engineers and we are struggling here,

I have attached images of the circuit but let me explain.

When a button is pressed a dc motor controlled via a transistor connected to a digital pin on a arduino nano, turns 360 degrees turning a mechanism, releasing a treat.

My issue it this, when the battery is connected directly to the board all is well and works fine, however when I introduce an on/off switch into the circuit to cut the power to the board when charging the battery everything goes to pot, the motor no longer turns as it should but stutters and faults, removing the switch immediately solves the issue.

If any one requires more information we will happily provide it.

The DEMAND Team

scan00099.pdf (63.2 KB)

Use a different switch!

Paul

What switch were you using that broke everything?

Spec sheet?

Normally adding a power switch doesn't do things like that...

Also, schematic? (hand drawn is fine)

your photos do not show the wiring. the top of the board has holes, but no wire connections are shown.

I would expect that your switch is not connected as you expect. since you say that changing the posistion does funny things, it is eitehr shorting out your system or not telling the arudino the correct state.

we usually request a hand drawn schematic and since your board looks relatively simple, you should not have any problem making one.

Is the motor a servo?

Weedpharma

@dantyas:

Please try to look at things from our point of view.

From the point of view of an engineer (or hobbyist) trying to troubleshoot a circuit, it makes no difference what your charity's name is, what its mission is, or that the intended user of this device is in a wheelchair.

However, it makes a great deal of difference how everything is wired up, hence the request for a schematic. It might also help to give us some idea what code you have running on the Arduino.

Also, you do not state where or how you inserted this switch into the circuit.

@dantyas, all the assistance given here is charitable. We don't charge and you can't get it any cheaper no matter what cause you are supporting.

I'm not sure I like the idea of somebody having a dog who is not able to care for it properly.

...R

My apologies for the lack of initial information, that was remiss of me, I have attached additional images to the original post of the switch circuit and circuit board.

The battery: Overlander Nimh Battery Pack 2/3 AF 1600mah 4.8v RX Flat Premium Sport View here

Switch: Standard Switch Harness with Charging Lead, View here

If you need anything else please let me know and I will do my best to provide it.

I am sorry for any annoyance caused from my previous post.

Please read ALL previous responses and answer the questions and supply what is requested.

EG, a drawing of the circuit, what the parts are and how the switch is wired.

If you cannot do this, we cannot give you the help you need.

Weedpharma

Robin2:
I'm not sure I like the idea of somebody having a dog who is not able to care for it properly.

I think the people who supplied the guide dog would not have done so if that was the case.

I have attache a PNG and PDF of the circuit to the original post

Imgur

Imgur

The current situation is this, when the button is pressed the motor turns fine for maybe the first 10 - 15 times, after that is stalls and faults.

Why do you have VIN & GND going to the tactile button?
If you wire one side of this button directly to an arduino pin set as INPUT_PULLUP and the other side of the button directly to GND you can dispense with the VCC & resistor to/from the button.

You also seem to be using a FET P but it is connected after the load and not before. There is no protection diode across the motor.