Connect with us

light sensor chicken door

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

Scroll to continue with content
  1. andyaraya44


    Nov 28, 2016
    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:

  2. NMNeil


    Oct 3, 2014
    I can't see any diodes or caps on the breadboard?.
  3. andyaraya44


    Nov 28, 2016
    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.
  4. tedstruk


    Jan 7, 2012
    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)
  5. AnalogKid


    Jun 10, 2015
    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.

Ask a Question
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.
Electronics Point Logo
Continue to site
Quote of the day