Help with logic circuit.

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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
 

MikeML

Joined Oct 2, 2009
5,444
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!
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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!
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.
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
You obviously missed my point about a deficiency in your circuit design...
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
 

crutschow

Joined Mar 14, 2008
34,282
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?
 

MikeML

Joined Oct 2, 2009
5,444
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.
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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.
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
i have that circuit hooked up exactly like in the schematic using the TLC3704 and it works
I dont want to see a video. I want you to explain how the circuit in the box labelled OPTICAL CIRCUIT can possibly work?
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:

djsfantasi

Joined Apr 11, 2010
9,156
i have that circuit hooked up exactly like in the schematic using the TLC3704 and it woerks


check this out for proof...

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

http://www.instructables.com/id/Simple-Light-Detector-with-Sensitivity-Control-No/
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.
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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.

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
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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?

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
 

Alec_t

Joined Sep 17, 2013
14,280
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
 

MikeML

Joined Oct 2, 2009
5,444
...I didn't need the 2 x 1k resistor voltage divider as i am working with 5v supply...
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.
 

Thread Starter

kipper2k

Joined Oct 29, 2014
19
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.

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
 
Top