light sensor chicken door

Discussion in 'Microcontrollers and Programming' started by andyaraya44, Nov 28, 2016.

  1. andyaraya44

    andyaraya44

    Joined:
    Nov 28, 2016
    Messages:
    2
    Likes Received:
    0
    i am trying to build a light operated chicken door. i have a programmable ATTiny85 connected to an H-bridge to operate the motor. there are two cut off switches to stop the motor (placed between the tiny85 outpu and H-bridge input) when the door gets to open and closed position. i was hoping to stop power running through the H-bridge and motor when the switched are activated. there is a 5v voltage regulator from a 9v battery to run the components. i have written a program but it is not operating as i would have hoped (obviously not the right program). when one of the switches is activated the motor actually speeds up, not stops. i am not sure how to set the sensitivity of the light sensor to make the motor turn the opposite direction as well as the program to make it work.
     

    Attached Files:

    andyaraya44, Nov 28, 2016
    #1
    1. Advertisements

  2. andyaraya44

    NMNeil

    Joined:
    Oct 3, 2014
    Messages:
    48
    Likes Received:
    6
    I can't see any diodes or caps on the breadboard?.
     
    NMNeil, Nov 28, 2016
    #2
    1. Advertisements

  3. andyaraya44

    andyaraya44

    Joined:
    Nov 28, 2016
    Messages:
    2
    Likes Received:
    0
    hi mate.
    no, there are not any caps or diodes. i am a newbie to all this stuff and am learning by taking bits from 2 different arduino projects starter kit (light theramin and zeotrope) and they are not used in either of those. its a very steep learning curve. where would they go and how would they help? the code is also a mix of the two (as best as i can understand). its all trial and error. any help, advise or suggestions would be greatly appreciated.
    thanks
    andy
     
    andyaraya44, Nov 29, 2016
    #3
  4. andyaraya44

    tedstruk

    Joined:
    Jan 7, 2012
    Messages:
    376
    Likes Received:
    6
    Location:
    Toledo Washington
    Try this... dedicate your system. Power circuit here... switching circuit here... controlling circuit here....
    might help... it looks like you are trying to make everything go all at once... that is only done in solid state electronics, and that usually means bypassing anything dedicated(power system, switching, or controllers)
     
    tedstruk, Dec 20, 2016
    #4
  5. andyaraya44

    AnalogKid

    Joined:
    Jun 10, 2015
    Messages:
    1,663
    Likes Received:
    474
    Location:
    Ohio - GMT-5
    FIRST (yes, all caps) draw a schematic. Show every signal connection, and use Vcc and GND symbols for the power out of the regulator. Assign a reference designator to every component. Doing this up front could turn 50 posts into 10.

    It might be that you built something that can't work by design. Once the schematic is up, we can review your basic plan and your circuit.

    To paraphrase Rear Admiral Joshua Painter in "The Hunt For Red October": An engineer don't take a dump, son, without a schematic.

    ak
     
    AnalogKid, Dec 20, 2016
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. randy1kenobi@gmail.com

    HELP! Anyone have an old "Fun Chicken" vending machine or schematics?

    randy1kenobi@gmail.com, Feb 14, 2006, in forum: Electronic Repair
    Replies:
    7
    Views:
    1,362
    randy1kenobi@gmail.com
    Feb 17, 2006
  2. randy1kenobi@gmail.com

    HELP! Anyone have an old "Fun Chicken" vending machine or schematics?

    randy1kenobi@gmail.com, Feb 14, 2006, in forum: Electronic Repair
    Replies:
    0
    Views:
    1,048
    randy1kenobi@gmail.com
    Feb 14, 2006
  3. N Cook

    JVC HR A630 VCR chicken or the egg ?

    N Cook, Aug 19, 2006, in forum: Electronic Repair
    Replies:
    1
    Views:
    532
    N Cook
    Aug 20, 2006
  4. DrJack

    Automatic chicken coop door opener

    DrJack, Jul 30, 2011, in forum: Electronic Projects
    Replies:
    14
    Views:
    6,356
    duke37
    Jul 31, 2011
  5. Supercap2F

    Chicken Coop Door Opener

    Supercap2F, Aug 5, 2014, in forum: Electronic Projects
    Replies:
    92
    Views:
    5,718
    KrisBlueNZ
    Oct 7, 2014
  6. chris duluk
    Replies:
    2
    Views:
    240
    Tha fios agaibh
    Jan 21, 2016
  7. beerzinnss

    use a PIR sensor as a light sensor switch

    beerzinnss, Sep 26, 2016, in forum: Electronic Projects
    Replies:
    4
    Views:
    339
    beerzinnss
    Sep 27, 2016
Loading...