Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Locking Cat Feeder


  • Please log in to reply
8 replies to this topic

#1 Grummle

Grummle

    New Member

  • Members
  • Pip
  • 2 posts

Posted 11 April 2011 - 04:45 PM

I have two cats. A stupid one and a smart one. We use a automatic feeder so we don't have to get up at 5am to feed them.

The smart one has figured out if its persistent enough it can get the feeder to rotate. The only thing holding back the tray from spinning is the motor/gears. The stupid one hasn't and so goes hungry half the time :(

I'm actually posting this looking for a road map for this project a simple 3-4 line statement of how any one of you would do it. After all goolge only helps if you have something to search for.

Currently my plan is to use a netdunio to monitor voltage to the motor and trigger the servo to 'unlock' when the motor is started and when the motor is stopped trigger the servo back to 'locked'.

Measured voltage at the motor is ~5.2v. I was hopping to do an event handler for a Digital I/O pin to save power. (might be talking out of my rear here)

I've been playing with Chris Seto's servo class and I can move servos around, I just need to figure the best way to monitor the motor voltage.

#2 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 14 April 2011 - 12:29 AM


Currently my plan is to use a netdunio to monitor voltage to the motor and trigger the servo to 'unlock' when the motor is started and when the motor is stopped trigger the servo back to 'locked'.

Measured voltage at the motor is ~5.2v. I was hopping to do an event handler for a Digital I/O pin to save power. (might be talking out of my rear here)

I've been playing with Chris Seto's servo class and I can move servos around, I just need to figure the best way to monitor the motor voltage.


Well this may be way too simple, but why not just use a solenoid as a brake and wire the solenoid in parallel with the motor?

Of course then you don't need a Netduino for control, but you could use it for something else like making a noise to call your cats to dinner ;-)

#3 ItsDan

ItsDan

    Advanced Member

  • Members
  • PipPipPip
  • 101 posts

Posted 14 April 2011 - 03:55 PM

I'm actually posting this looking for a road map for this project a simple 3-4 line statement of how any one of you would do it. After all goolge only helps if you have something to search for.


I'd handle this by getting a dog :)

Would it be easier to lock the tray or to perhaps have a servo attached flap cover the dish except during feeding time?
Follow the adventures of the Box of Crappy Surplus

Total BOCS Traveled Distance: 9708 miles | States Visited: 5
Track the Box

#4 Grummle

Grummle

    New Member

  • Members
  • Pip
  • 2 posts

Posted 23 April 2011 - 06:15 PM

Ok newbie question. There are two leads to the motor obviously. If I wanted to hook the netduino into this to monitor when the voltage goes from 0 to ~5v what would be the best way? What pins would be best to use the analog or the digital? Thanks in advance for the hand holding.

#5 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 23 April 2011 - 11:50 PM

Any variable voltage (IE, not 3.3V OR 0V inclusive) needs to be measured through an analog pin. You may need to use a voltage divider to drop the voltage to a level between 0V and 3.3V. Look for a voltage divider calculator to find the correct values of the 2 resistors. Please note, if you are tapping off a motor lead like that, you may need to use some form of circuit protection. Motors are noisy and may wreck havoc on the Netduino if the sampling circuit is not correctly done.

#6 JonnyBoats

JonnyBoats

    Advanced Member

  • Members
  • PipPipPip
  • 155 posts
  • LocationPhillips, ME

Posted 24 April 2011 - 01:28 AM

Ok newbie question. There are two leads to the motor obviously. If I wanted to hook the netduino into this to monitor when the voltage goes from 0 to ~5v what would be the best way? What pins would be best to use the analog or the digital?

Thanks in advance for the hand holding.


One good way to interface to the Netduino is with an opto-isolator (see http://en.wikipedia....i/Opto-isolator ). Basically it is a led coupled to a photo-sensor that outputs a voltage when the LED is on. You hook the LED side in parallel with the motot and the photo-sensor side directly to a digital pin on the Netduino. Generally one just uses an opto-isolator IC that costs a dollar or two.

The beauty of an opto-isolator is that if you make a mistake like plugging the led side into a wall outlet you just blow out the IC; none of the harmful high voltage makes it through to the output side to damage the Netduino.

Here is an example of one (http://www.jameco.co...roductId=113929 ) that you can get for 35 cents. Think of it as super cheap insurance.

#7 Luke Cummings

Luke Cummings

    Advanced Member

  • Members
  • PipPipPip
  • 38 posts
  • LocationCalgary, AB

Posted 26 April 2011 - 06:57 PM

Any variable voltage (IE, not 3.3V OR 0V inclusive) needs to be measured through an analog pin. You may need to use a voltage divider to drop the voltage to a level between 0V and 3.3V. Look for a voltage divider calculator to find the correct values of the 2 resistors.

Please note, if you are tapping off a motor lead like that, you may need to use some form of circuit protection. Motors are noisy and may wreck havoc on the Netduino if the sampling circuit is not correctly done.


The netduino's MCU AT91SAM7X512 pins are 5V tolerant so even though they only output 3.3V they can handle up to 5V as an input, that being said I wouldn't let the netduino look at an inductive load like chris says. Your just asking for trouble. Instead I would recommend prying open the control board to look for a digital signal (5V or less) that represents the motor action. To do this you will need a multimeter, just trigger the motors and start probing around for the signal.

Cheers!
Cheap, Fast, Good... Pick two

#8 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 27 April 2011 - 09:55 AM

The netduino's MCU AT91SAM7X512 pins are 5V tolerant so even though they only output 3.3V they can handle up to 5V as an input, that being said I wouldn't let the netduino look at an inductive load like chris says. Your just asking for trouble. Instead I would recommend prying open the control board to look for a digital signal (5V or less) that represents the motor action. To do this you will need a multimeter, just trigger the motors and start probing around for the signal.

Cheers!



For the record, I was merely answering the analog input portion of the question.. For monitoring voltage on a line driving a motor, you do want to use some form of isolation... You could even use a non-invasive current sensor.

#9 Chris Seto

Chris Seto

    Advanced Member

  • Members
  • PipPipPip
  • 405 posts

Posted 27 April 2011 - 10:38 AM

The netduino's MCU AT91SAM7X512 pins are 5V tolerant so even though they only output 3.3V they can handle up to 5V as an input, that being said I wouldn't let the netduino look at an inductive load like chris says. Your just asking for trouble. Instead I would recommend prying open the control board to look for a digital signal (5V or less) that represents the motor action. To do this you will need a multimeter, just trigger the motors and start probing around for the signal.

Cheers!



For the record, I was merely answering the analog input portion of the question.. For monitoring voltage on a line driving a motor, you do want to use some form of isolation... Logic level and motors don't mix...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.