Feasibility guidance for a first project

I have plenty of programming skills, so that part is fine, but my knowledge of electronics is very weak (go figure). I know a few basics about resisters and transistors (assuming I'm allowed to Google them to refresh my memory). I have a project that I want to have a sensor register movement, delay for 5 or 10 minutes, then allow current to a motor for 1 minute (not a powerful motor, just a small one that only needs power or not to run a small belt).

Is this feasible? I was thinking I'd need a sensor and arduino board, but is there anything else I need? Will the arduino board handle the input/output from the electricity fine, or do I need a seperate thing for that? Can I do all that with just one board, or do I need more than one? Perhaps even a good link on where to start researching myself would be a start.

This will be my very first project, and I am trying to research components but there is just such a flood of products and information that I find myself at a bit of a loss on where to even start.

Thanks much.

dwright:
I have plenty of programming skills, so that part is fine, but my knowledge of electronics is very weak (go figure). I know a few basics about resisters and transistors (assuming I'm allowed to Google them to refresh my memory). I have a project that I want to have a sensor register movement, delay for 5 or 10 minutes, then allow current to a motor for 1 minute (not a powerful motor, just a small one that only needs power or not to run a small belt).

You probably need to refine your requirements more. In particular, how much movement do you need to register, and how far away from the thing being moved do you have to be. I could imagine you might want to look at:

In terms of motors, it depends on how much power you need to drive the motor (which in turn depends on the torque you need to drive), and to what precision you need to drive the motor. You can get cheap hobby motors that can be powered from the Arduino, or you can get more powerful motors that you have to power separately (but connect the grounds to the Arduino), and the control comes from the Arduino. A specialized form of the motor is the servo, that can be driven 0..180 degrees.

dwright:
Is this feasible? I was thinking I'd need a sensor and arduino board, but is there anything else I need? Will the arduino board handle the input/output from the electricity fine, or do I need a seperate thing for that? Can I do all that with just one board, or do I need more than one? Perhaps even a good link on where to start researching myself would be a start.

This will be my very first project, and I am trying to research components but there is just such a flood of products and information that I find myself at a bit of a loss on where to even start.

Thanks much.

For a simple sensor and motor, you should be able to drive it from a single Arduino just fine.

While you might get some things you won't use immediately, you probably want to get a starter kit that includes various sensors/buttons/leds, a hobby motor or two, and maybe a servo. That includes a breadboard, some wires, resistors, etc. Otherwise, if you try to buy just the parts, you will find in the middle of the night you are missing something. Also, it might be cheaper to get a set, than trying to get each individual item.

You can power the Arduino from a computer USB port or via an electric cable that plugs into the 2.1mm power adapter that gives 7-12 volts (you can often find these as local computer stores, often times you can get a generic power adapter that provides different volts and plug combinations). I tend to prefer powering it from USB (either computer or a phone/table charger that has a USB outlet).

Ah, thanks.

The movement would be a cat moving into a box. The motor is actually a small dc powered motor I already have. It's hooked up to a 'timer' right now that runs at set times, but I'd prefer it to go off when it senses the cat, rather than at times. I was thinking like an infrared sensor, since I saw a few tutorials on those already.

I was kind of hoping to power it with the power cord that is coming in to power the motor, but I don't really know how feasible that is.

dwright:
Ah, thanks.

The movement would be a cat moving into a box. The motor is actually a small dc powered motor I already have. It's hooked up to a 'timer' right now that runs at set times, but I'd prefer it to go off when it senses the cat, rather than at times. I was thinking like an infrared sensor, since I saw a few tutorials on those already.

I was kind of hoping to power it with the power cord that is coming in to power the motor, but I don't really know how feasible that is.

OK so first things first

What are you trying to do - exactly ?

You can either buy a general Arduino board and add a motor shield or buy one of the specialised boards with a Motor driver already on it.

What level of precision of movement do you need - are you trying to open a door (for instance) or simply spin a coloured disk ?

Google the model of your motor and provide a link or post the specs on here so we can tell you a suitable driver for it.

regards

Craig

I'm basically trying to put the arduino between the wall outlet and the motor. All I need it to do is allow power to the motor for 1 minute, 10 minutes after the sensor has been triggered.

So basically, it's like an automatic switch that clicks on and allows power, then clicks off and doesn't allow power. There's no need to control the movement of the motor or anything like, just allowing power to it or not based on whether the sensor was triggered.

I am kind of hoping I can cut the power cord, plug it into the wall, plug that into the arduino board, use that for power for the board, and then from the board controls decide whether the motor gets power or not and when.

Hey dwright,

I'm sure you would have but, just in case, I hope you aren't doing something that might end up smooshing your cat! Keep in mind that unless you build in some sort of safety mechanism a motor will keep on going regardless if someone is in the way or no. :wink:

dwright:
I'm basically trying to put the arduino between the wall outlet and the motor. All I need it to do is allow power to the motor for 1 minute, 10 minutes after the sensor has been triggered.

So basically, it's like an automatic switch that clicks on and allows power, then clicks off and doesn't allow power. There's no need to control the movement of the motor or anything like, just allowing power to it or not based on whether the sensor was triggered.

I am kind of hoping I can cut the power cord, plug it into the wall, plug that into the arduino board, use that for power for the board, and then from the board controls decide whether the motor gets power or not and when.

OK so this is a mains operated motor that is currently running and doing whatever it is that needs doing ?

Can you just explain what the whole project is so we can give you a correct approach

So if you already have the motor and it is doing its job operating from the mains then you will need a relay that can be operated by the arduino

Without the specs for your motor i can not tell you what size relay - but the key points you want to look for on EBAY are SSR (Solid State Relay) - essentially this acts as a switch controlled by the arduino

You will then need an Arduino of the appropriate size - if this is the only job you are doing with it then search on ebay for Arduino uno r3

You will need some hookup wires from the Arduino to the SSR and you will need an enclosure to mount it all in

Craig

You said you want to put the arduino between the wall outlet and the motor. But since your original message said it was a small DC motor, I suspect your using a wallwart, thus your output power is really some low level DC voltage, and not 110 AC mains power.

Assuming low DC voltage, the components that you want to put together could be:

  • proximity sensor (google for a PIR motion sensor; sounds like you just need cheap short range sort)
  • an alternate approach to the motion detector would be infrared emitter and detector. If the cat enters a specific entrance way then you could setup the emitter/detector in break-beam manner to be the trigger; google for that circuit example
  • H-bridge to activate the motor, forwards or backwards; google a 754410. You run the wallwart DC power to the h-bridge, and use your arduino code to turn on/off or set forwards/backwards by talking to the h-bridge. The h-bridge runs the power to the motor, but your arduino controls the h-bridge.

It doesn't really need to be anymore complicated than that. Since you indicated your already programmer savvy, I'll leave programming the signal detect coding and h-bridge activation as well as timer control details to you. :slight_smile:

Hope that helps.
Eric

Ok, so I was wrong, the motor has an AC plug.

There's a simple outlet plug, and that's the only power source I have.

All I really want to know is, is it possible to have a plug coming from the outlet (1 plug, not two, socket in America), power the arduino, and then go from there to the motor.

I.e. Wall outlet ---> Arduino ---> motor

One cord/plug/socket/whatever you wanna call it. I know the arduino can't handle wall AC power, so maybe I need a converter, but then will it have enough power for the motor at that point?

OK, so the parts you are looking for are a relay board or a solid state relay wired to break one of the motor wires. The control side of the SSR or relay is controlled by the Arduino. Both are equally functional, the mechanical relay just takes a tiny bit more current and requires an extra power connection from the Arduino, is more noisy (if that matters) and bulkier. Pre-assembled modules are available to do this and you can find "How-to"s. Either way, it needs to be well mounted in a protected enclosure so that all the mains terminals are inaccessible.

The best source of power for the Arduino will be a "wall wart" (eight volt switchmode). You may need a double-adaptor for this and the lead to the relay and motor. The amount of power these together will draw, will be pretty trivial unless you are trying to feed the cat into a blender or something. :smiley:

IR sensors don't work so well at all on cats, and especially the more fluffy species. Ultrasonic rangefinders probably do not work that well either, for the same reason. You probably need an interrupted light beam - a sensor on one side and a light on the other. These can be infra-red and at least the sensor should be down the end of a black tube.

We still want to know exactly what you are doing to the cat?

Combining mains voltages and electronics can be very dangerous if you don't know how to do it safely. A much safer approach would be to use a self-contained product such as a PowerSwitch tail to do the mains voltage switching for you.

I did just see/find the powerswitch tail. It's got a built in relay, which is good, but that still doesn't solve my problem of only having one plug as a power source.

Nothing is happening to the cat. Once the trigger (I guess IR beam won't work, so I'll look into the interrupted light beam) goes off, it runs a small belt that adds cat litter into the bin while taking the used litter out and dropping it into a bucket. The cat literally can't get stuck or smashed or blended or anything because even if they decided to stand on the belt while it was running it would just drop them off the belt into an open area.

The original plan called for using a regular sensor that had been rigged up, but it keeps getting tripped by regular light; that's why I wanted something that would have a timer on it.

In my country we have "double adapters" - you plug it into a power point and you can plug two plugs into it.

We also have power boards on a lead which plug into the power point and have four or six (or more) sockets on them.

In line with the other cautions given previously, it is going to be much easier and safer for you, if you are not entirely familiar with mains wiring, to use readily available modules to perform at least the mains voltage part of your application.

dwright:
I did just see/find the powerswitch tail. It's got a built in relay, which is good, but that still doesn't solve my problem of only having one plug as a power source.

Nothing is happening to the cat. Once the trigger (I guess IR beam won't work, so I'll look into the interrupted light beam) goes off, it runs a small belt that adds cat litter into the bin while taking the used litter out and dropping it into a bucket. The cat literally can't get stuck or smashed or blended or anything because even if they decided to stand on the belt while it was running it would just drop them off the belt into an open area.

The original plan called for using a regular sensor that had been rigged up, but it keeps getting tripped by regular light; that's why I wanted something that would have a timer on it.

Not sure what you are getting hung up on here. I assume you have a mains powerpoint (what country are you in ?). You plug a double adapter, power board whatever - every country i have ever been in has one of these devices - failing that if you live in outer Uzbekistan and they have not modernized - you should be able to get an electrician to come in and swap out the single outlet for a dual outlet for a minimal cost (well maybe a goat and a night of fermented yaks milk if you are in Uzbekistan)

Once you have done that - you plug an AC to 8/9/12V adapter into one outlet and power the Arduino from this
You plug the Power switch into the other one.

You connect the output of the Arduino into the input of the Powerswitch and then outlet from the powerswitch connects into your motor.

Craig

One of my first thoughts of ways of sensing the cats use of the tray was to sound sensors set up to detect the difference between ambient sound level inside the box and that of it scratching in the cat litter, however this may not work in an area where there could be changes in the ambient level outside the box, eg music being played etc. My next thought would be to use vibration sensors to pick up the scratching that the cat makes.

Alternatively and maybe the best would be to raise the "entrance" end of the tray with suitable springs underneath or bunjee cord from above so that the cats weight would operate a small normally open micro switch under the tray.

I would also suggest writing a very simple sketch so that when the cat arrives on the tray the system goes from "off" to a "ready" mode and then as it leaves the tray the switch opens again and the system goes into "activate" mode setting a timer that will then operate the belt once the cat is well clear of the tray. After the replenishing of litter return the unit to the off mode ready for puss's next visit

A thought on the animal behaviour side, is it really necessary to put it into a box ? Cats love going in boxes just for the sheer hell of it, although it may not do so with it being its toilet area, but if it does constantly renewing cat litter could get expensive!