Sensor controlled Pet Door , help anyone?

Hi there
I wanted to build a power pet door for 1 of my 3 dogs, the dog in question is not able to use a normal dog door as his eyeballs are too close to his nose, I used a picture of him as my profile pic so you can him "MOJO", he 1 of my 3 rescue dogs. In the winter he sometimes has an accident in the house, not his fault, but I would like him to have free access to the garden when he wants.

So I thought it would be a great idea to build a power dog door that is controlled with 2 sensors, 1 sensor on inside of the door and 1 sensor outside of the door, so when the dogs walk up to the door it opens with a dc motor and stays open for maybe 5 seconds and then closes again with the same dc motor. I thought I could do this and it would be easy, as everywhere you go there are automatic sliding doors, I mean it’s nothing new, but I am getting nowhere,

I have found many chicken coop projects that work with a light sensor but thats not what I need,
is there anyone who can help with this circuit diagram and the code for the Arduino, I have built the door already with the 12v motor and I can make it go up and down with a battery, but then that’s it.

Thanks in advance

I thought I could do this and it would be easy, as everywhere you go there are automatic sliding doors

Those use ping-style sensors that measure distance. They are cheap, and fairly reliable.

They have the added benefit that once you detect that the dog is inside wanting to go out, you can close the door again as soon as the dog is through.

On the other hand, they are dumb. Anything that moves into range will cause the door to open, admitting any wild critter that wants to get warm or dry or cool or wants to eat.

I find that ultrasonic sensors don't work well on my hair or wool shirt.

Have you tried many 'dog sensors'?

IR reflect: IR led shines outward and IR detector looks for reflection.

IR block: IR led on one side and detector on the other, what goes between blocks the light.

You could probably put blinking (use less power) IR leds on a collar and detect that.

Those are cheap and easy ones.

Do you want the door to open only when this particular dog approaches it, and to remain closed when your other two dogs approach it?

If so, you could use an RFID tag, attached to his collar, and an RFID reader at the door.

hi there
below is a list of the parts i have , i think rfid would be a great way to go i could put a chip on each dog collar, but i couldn't even cobble anything together out of all the other stuff, i can purchase rfid shield or parts if someone would help with the code and circuit plan.

Pyroelectric IR Infrared PIR Motion Sensor Detector Module HC-SR501
L298N Dual H Bridge DC Stepper Motor Drive Controller Board Module
Infrared Reflection Module Proximity Switches Sensor Module
5V 1 Channel Relay Module with Optocoupler H/L High Level Triger for Arduino
5V Relay Module Cycle Timer PLC Home Automation Delay Multifunction
2 x InfraRed IR Detector 5V DC Switch for Robotics Arduino Obstacle Sensor
12V Delay Timer Switch Adjustable 0 to 10 Second NE555 Oscillator
induction 12V PIR IR Pyroelectric Infrared Module Adjust Relay Output
ON-ON 3-Terminals Double Pole Dual Throw Toggle Switch 6A 125VAC
Plastic Module Intelligent Light Body Sensor IR Motion Sensing Switch

1 x Arduino UNO R3 board
1 x Mini breadboard shield with mini board
1 x 830 points breadboard
1 x SMD components box
1 x 2pcs buzzer
1 x 4pcs switch
1 x 2pcs digital tube
1 x 2pcs mercury switch or ball switch
1 x 3pcs photoresistor
1 x Potentiometer
1 x Flame sensor
1 x Infrared receiver
1 x LM35 temperature sensor
1 x USB cable
1 x 9V battery clip
1 x IR mini remote control
1 x 1602 LCD module
1 x SG90 9G servo
1 x 5V stepper motor + ULN2003 driver board
1 x 74HC595
1 x 8x8 DOT MATRIX
1 x 15pcs LED red yellow green(each 5pcs)
1 x 15pcs Resistance 220R, 1K, 10K(each 5pcs)
1 x 30pcs male to male jumper wire

i already have a working door with motor, that part was easy, obviously just a prototype to get the coding and circuit sorted, you can see the video, but that idea works on a double toggle throw switch that reverses polarity each time the switch is flipped, but this not the way i would like to have a sensor or f=rfid sensor to open and close the door

That looks like a good list of parts to start with. So long as you don't mind it reacting to anything near the door (like yourself) then the PIR will be good. I think RFID will be better but let's start with what you have.

Start with the PIR detector. Get it wired up to your Arduino [which Arduino do you have? It's not in the list.] and see if you can turn on or off the onboard LED (pin 13) when something is detected. There's lots of tutorials online that show code for this, so I won't add that here.

Next, you will need to get the mechanics sorted. There's no motor in your list and you haven't given us much detail on the door itself. If it's a regular flap door then it needs to be counterbalanced - the motor required to lift the weight of the door will be unfeasibly large. Consider switching to a door hinged like a normal door - then you don't need to lift the weight of the door. A hobby servo could swing such a door with only a little work on linkages. Search online and find a motor you think you can work with. Steppers are possible, but more work. A DC motor can work but I think a servo will be easiest.

Then sort out the power supply - can you get a wall-wart with enough amps to drive the servo? Can you get the wire installed in a permanent way that you and the dogs don't trip over it?

Once you have the mechanics and the power, get some code working to just open and close the door. Driving a servo is simple but maybe you want it to open slowly and close quickly - whatever your installation requires.

Then put the PIR or RFID into the code and train the dogs how to use the door.

"Eyes too close to his nose"? That's not usually a problem - the dog learns to headbutt a normal dog door pretty quickly.