I'm working on a research project where one aspect of the work involves allowing some subjects (individual wild birds) to have access to supplementary food, while denying others. Practically, I'm designing a bird feeder that will open only for birds that carry an RFID tag. I got a few RFID boards from a fellow scientist and, currently, I have the boards recognizing an RFID at the antenna, which is great.
But, I don't know how to make everything work together - I need the stepper motor to turn (this will open a door on the feeder) when a signal is detected, and go back to it's original position when signal is no longer detected, and also log the time of visit and RFID number.
Crucially, I need the feeder to work autonomously in the field, therefore it has to be powered by a battery and be reasonably energy-efficient.
I have failed until now to get the motor (Nema 17 Stepper Motor Bipolar 2A 59Ncm, with Qunqi L298N Motor Drive Controller) in all my attempts.
I would be greatly appreciative of any sort of help: code, sketches, advice, ideas, anything. I'm a complete novice at Arduino, but am hoping that with some advice, due to the relative straightforward-ness of what I'm asking the board to do, I'll be able to put together a working prototype.
An L298 is a poor choice for any stepper motor and it is certainly not capable of providing 2 amps.
A stepper motor is a poor choice for a battery powered project because they are very inefficient. What are you planning to use the stepper motor for? A diagram of the project would be useful.
If you are just opening and closing a door then a simple low-geared DC motor with limit switches should be sufficient and would have the advantage that it would only draw power when the motor runs. You will, in any case, need at least one limit switch with the stepper motor.
A hobby servo would be even simpler for opening and closing a door as it would not need limit switches. However it would draw a small current when idle unless you add extra circuitry to turn off its power (which is not very difficult).
What I'm trying to do is have the motor or servo open a small door by turning radially a fraction of a full revolution (hoping I can program the exact desired fraction after trial and error) when an RFID signal is detected, then turn back when the signal is no longer detected in order to close the door. The motor will have to turn the same exact fraction of a revolution every time, of course, so the door won't be left half open after a few runs. So, as you mentioned, limit switches may be necessary. I have several potential designs for this mechanism, and they all require the motor to do the same function.
It sounds to me like a low-geared DC motor might really be a great option here. What do you recommend I use as a power source if I go that route? Also, do you have any info on how I would go about connecting it all together (board, battery, and motor) and coding it to work in concert with RFID signal detection?
What I'm trying to do is have the motor or servo open a small door by turning radially a fraction of a full revolution (hoping I can program the exact desired fraction after trial and error) when an RFID signal is detected, then turn back when the signal is no longer detected in order to close the door. The motor will have to turn the same exact fraction of a revolution every time, of course, so the door won't be left half open after a few runs. So, as you mentioned, limit switches may be necessary. I have several potential designs for this mechanism, and they all require the motor to do the same function.
It sounds to me like a low-geared DC motor might really be a great option here. What do you recommend I use as a power source if I go that route? Also, do you have any info on how I would go about connecting it all together (board, battery, and motor) and coding it to work in concert with RFID signal detection?
Thanks again!
O
If I discovered such a device, and had a card to make the door operate when I waved the card around, I would see how long the door would operate while I waved the card. A day, a week? An hour?
Paul_KD7HB:
If I discovered such a device, and had a card to make the door operate when I waved the card around, I would see how long the door would operate while I waved the card. A day, a week? An hour?
I think this is the first time I have seen one of your Posts that I cannot understand
ToxostomaRufum:
What do you recommend I use as a power source if I go that route? Also, do you have any info on how I would go about connecting it all together (board, battery, and motor) and coding it to work in concert with RFID signal detection?
The power supply has to be chosen to suit the motor you choose.
To provide bi-directional control of a DC motor you need a h-bridge motor driver between the Arduino and the motor. The Pololu website has several examples.
I have never used an RFID device.
Break your project into a series of small learning steps. Write separate short programs for each part and don't try to amalgamate them until you get all the parts working separately. The examples that come with the Arduino IDE probably cover most of the techniques you will need.
Paul_KD7HB:
If I discovered such a device, and had a card to make the door operate when I waved the card around, I would see how long the door would operate while I waved the card. A day, a week? An hour?
Paul
The idea is that the door will open immediately when a bird fitted with an RFID tag lands on it (signal is detected), and close immediately when it leaves (no signal detected). Crows are clever, but a durable feeder design will deter them and other nuisances.