Help with logic circuit.

Discussion in 'The Projects Forum' started by kipper2k, Nov 3, 2014.

  1. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    Hi All,

    I am working on a circuit that needs to send a logic 1 or 0 to a computer ROM chip by using a photocell attached to an And gate circuit. I have it working with the exception of one major bug.

    I have the 2 pdfs on my website, one is the description and the other is the schematic. The description pdf explains the circuit workings and also what the bug is, any help would definately be appreciated. Obviously i would like the solution to be as simple as possible but beggars can't be choosers.

    The circuit works fine when i use a simple pushbutton switch instead of the optical input but i would like to use the optical feature. Also, should i use a diode on the comparator output to protect it when its output is 0?


    http://www.kipper2k.com/tempry/multiboot_schematic.pdf

    http://www.kipper2k.com/tempry/description.pdf

    Thanks
     
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Don't you need to compare the voltage at the tap of the voltage divider created by the pot and LDR to Vcc/2? You are comparing it to Vcc!
     
  3. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    Hi,

    thanks for the reply, The reason why i want the optical solution is so that i don't need to drill any holes in the case for toggle switches/ buttons etc. I can just mount the photocell inside under the ventilation grill without the need for drilling holes.

    The problem is the ambient light that can change once the computer has actually booted up. Lets assume that i want to boot 1.3 KS, i just place my hand over the photocell mounted in my case and the photocell has been calibrated so that in low ambient light it will produce no output (output is either 0 or 5v from the comparator) and turn on the computer. What i need to do somehow is to shut down or disable the comparator output so it doesn't go high once the computer has booted up so i need a feedback somehow to achieve this and this is where i am stuck

    As i mention in the description, when there is enough light to boot 3.1KS in upper ROM it will remain in that state regardless of ambient light changes so that portion works fine.
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    You obviously missed my point about a deficiency in your circuit design...
     
  5. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    I am not sure what you are saying, The optical circuit i am using is controlled by the light and the output is only 2 states, either on or off so in that respect it is doing its job. how else can it achieve this function and not be affected by changing ambient light once the computer is actually running

    I can post a video of it actually booting up in either mode if it makes it clearer
     
  6. crutschow

    Expert

    Mar 14, 2008
    12,969
    3,218
    You need some sort of signal from the computer indicating it has completed its boot-up. Then you just use an OR or AND gate to inhibit the comparator output with this signal. Can you generate that signal?
     
  7. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    It is impossible for an Light Dependent Resistor in series with a resistor (creating a voltage divider), where the voltage divider is excited by Vcc, to make a voltage as big as Vcc. You are comparing the voltage at the tap of the divider to Vcc. I cannot see how this will ever work. It would work if the inverting input of the comparitor was connected to a voltage much less than Vcc, say Vcc/2.
     
  8. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
     
  9. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    Hi,

    I'll post the video in about 10 minutes
     
  10. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    I dont want to see a video. I want you to explain how the circuit in the box labelled OPTICAL CIRCUIT can possibly work?
     
  11. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    i have that circuit hooked up exactly like in the schematic using the TLC3704 and it works
    check this out for proof...

    http://www.instructables.com/id/Simple-Light-Detector-with-Sensitivity-Control-No/

    I didn't need the 2 x 1k resistor voltage divider as i am working with 5v supply

    I am thinking that mabe using a schmitt trigger inverter and a RC delay circuit could be used to cut off power to the comparator after it has achieved its job
     
    Last edited: Nov 3, 2014
  12. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,786
    825
    The circuit in the Instructable is DIFFERENT than the one on the link to your website. As MikeML pointed out, the latter circuit will not work.

    Which circuit did you build? The second input to the comparator needs a lower voltage than Vcc, which the Instructables circuit accomplishes with a voltage divider.
     
  13. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0

    I dont know how to explain it, here is my computer booting up as described, maybe i have terminology incorrectly described, but it works. I ended up using a 47ohm resistor in place of the trimmer. i didnt use the voltage divider as i wasnt using 9 volts.

    you can see when i cover up the photocell the computer boots 1.3kickstart

    http://www.kipper2k.com/tempry//romboot/romboot.html
     
  14. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0

    Thanks for the reply

    I may be able to pull a signal from the ROM that doesnt exist until after it initialises. I read that a Shmitt trigger inverter with a RC circuit will boot up and have a logic 1 output until the RC circuit completes and then goes low. Do you think its possible that i can feed the output of the trigger to provide power to the comparator just long enough to complete the startup and then shut down , all i would need would be about a half second delay before shutting off the power to the comparator
     
  15. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,757
    1,099
    This should do what I think you want. At power-up the latch Q output will be 1 or 0 depending on whether the LDR is dark or light respectively at the time. The latch output will stay the same if the light level changes subsequently.
    ROM_select.gif
     
  16. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0

    Thanks Alec,

    i will order the parts and give it a go. much appreciated
     
  17. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Actually you do. I find it hard to believe that it works the way you wired it. Wired that way its operation will be very marginal. A temperature change could prevent it from working tomorrow. The Instructables circuit correctly shows the required voltage divider on the inverting input of the comparator.
     
  18. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0

    I was very surprised when it worked using such a very small value resistor as the original schematic called for a 10k pot so when i started going below 100 ohm i was very surprised, i know that there are different resistance levels of the photocells as well. i bought mine from Digikey and the resistance change to light was not as great as the indestructable version.

    @Alec_t
    Is there a 1 element flip flop that satisfies the schematic you posted, rather than using the bigger 2 element, i seen a few but none had the RST pin
     
  19. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
    i found this one, does this look ok ?

    -- ignore... no longer available
     
    Last edited: Nov 3, 2014
  20. kipper2k

    Thread Starter New Member

    Oct 29, 2014
    19
    0
Loading...