LDR CIRCUIT ONLY WORKING ON 08m2 Proto Board

#1
For some time I have been trying to get an LDR CIRCUIT to work independent of the picaxe proto Board but for some unknown reason it is simply not working. Thus far I have built three circuits hoping that what ever oversight may have occured would be corrected. But all to no avail, pin 2 is suppose to be going high but it is remaining low and pin0 is just blinking continually. I hae tried programming the Picaxe 08M2 WITH BOTH Logicator Flow chart and THE Yenka software programming system but the results have been the same. As mentioned Pin 0 continues to blink and Pin 2 which is expected to be going high is remaining low. When the IC is placed on the Proto board it would work as it is suppose to. My conclusion is that Iam overlooking something that is very basic, but I just dont seem able to detect what it is. Iam presently trying to sort out how to upload the flow progrm that Iused. This may take awhile.
 

nick12ab

Senior Member
#2
It sounds like your circuits are allowing the Serial In pin (pinC.5) to go high. Please make sure that you have the download circuit (or at least the 10k pull-down) connected to the Serial In pin.

If that doesn't fix it, then no further help can be given until you provide more information about your circuit - that means some good photos as well.
 
#3
Hi Nick
The resistor Iam using is a pull up resisor should I proceed to insert a 10K resistor between pin5 and ground. I am having a little difficulty converting my picture of the circuit to a suitable file format for the time being.
 

nick12ab

Senior Member
#4
The resistor Iam using is a pull up resisor should I proceed to insert a 10K resistor between pin5 and ground.
You should remove the pull-up as that will make the potential difference on the input pin 2.5V (if the 2 resistors are equal) and the Serial In pin is TTL so that counts as being high.

I am having a little difficulty converting my picture of the circuit to a suitable file format for the time being.
Why? All cameras take JPGs (which you can upload directly on to the forum) and if you set it to use the RAW format then you would have installed whatever software came with the camera to read these files.

Attachment is instructions on how to upload a file.
 

Attachments

#7
Bozambo here again

I am making another effort to up load schematic of LDR circuit.
It appears as though I was successfull, Ihope it is clear.
However since yesterday Ihave tried adding a 10K RESISTOR to the serial download pin sending it to ground now pin 0 has stoped blinking but pin 2 is still not going high
 

Attachments

Last edited:
#10
I am making another effort to up load schematic of LDR circuit.
It appears as though I was successfull, Ihope it is clear.
However since yesterday Ihave tried adding a 10K RESISTOR to the serial download pin sending it to ground now pin 0 has stoped blinking but pin 2 is still not going high
Did you print off the circuit then scan it!?

I increased the variable to 128 and pin2 still not going high
Bo
Have you tested the circuit with a multimeter to see what the voltage on the ADC pin is?
 

hippy

Technical Support
Staff member
#11
I increased the variable to 128 and pin2 still not going high
Bo
Perhaps change your flowchart so you can see what the value of 'x' is, check that it is changing when the light level changes.

What voltages do you have on the analogue input pin when light and dark ?
 

hippy

Technical Support
Staff member
#13
The number returned by READADC can be calculated by -

Nadc = Vin * 255 / Vpower

So, assuming a 5V supply -

Dark: .24v = A reading of about 12
Light: 1.5 to 2.25 = Readings of about 76 to 114

So all your 'x' values should be below 128, the LED should light all the time rather than being off all the time as it was before.

You could try 'x < 40' and that should work. If not then there's something else with your circuit or program / flowchart. Does Yenka generate a Basic language program which can be examined ? Maybe go back to Logicator and see if that works with 'x < 40'.
 
#15
Ijust tried adjusting the variable to x < 40 and it is still not working.

Could I BE REFERED TO A SAMPLE CIRCUIT THAT WORKS. IT is instructive to note that the LDR INTERFACING CIRCUIT IN MANUAL # 3 DOES NOT SHOW THE 10K/22K RESISTORS BEING CONNECTED TO THE LDR EXAMPLE CIRCUIT
 

Technical

Technical Support
Staff member
#16
See the 'minimum operating circuit' in part 1 of the manual. As the name suggests, this is the minimum operating circuit for any PICAXE circuit.
 
#17
I have been looking at that minimum operating circuit' in part 1 of the manual several times for the day. I have tried it out for the entire week. But Iam just not able to get it to work. There has to to something Iam missing or just not seeing.Seeing that you'll have done this you'll walked this road. To simplify matters all Iam asking for is a copy of of an LDR CIRCUIT that I can follow easily and as I said in an earlier post that the Picaxe Manual on Interfacing Circuits has an EXAMPLE of an LDR CIRCUIT But it ommits the inclusion of the two resistors to the Serial download pin.
Any help in this regard would be greatly appriciated.
 
#18
I said in an earlier post that the Picaxe Manual on Interfacing Circuits has an EXAMPLE of an LDR CIRCUIT But it ommits the inclusion of the two resistors to the Serial download pin.
This one?

Seeing that you'll have done this you'll walked this road. To simplify matters all Iam asking for is a copy of of an LDR CIRCUIT that I can follow easily and as
You have multiple and claimed to be identical circuits and only one works. How are we supposed to help without pictures?
 
#19
Please note that an attachment was included in an earlier post. However Iam going to try to upload another one. This is a PCB
Ihave made several like this and had toabandon them all because they were not working properly
 

Attachments

Last edited:
#21
Hi Hippy
What you are showing is exactly what the circuit on the Proto Board consist of and that is why the LDR circuit is WORKING ON THE BOARD. What Iam doing is building a PCb circuit for the LDR without the sterio socket, on a PCB and Iam somehow not connecting the resistors correctly. Could it be that I have to include the sterio socket on all circuits that are constructed.Looking forward to hearing from you.
 
#22
Hi Nick
I just responded to your post and did not notice you had an attachment. But that's it allrightthe circuit without the inclusion of the resistors attached to the Download pin.
 

hippy

Technical Support
Staff member
#23
Could it be that I have to include the sterio socket on all circuits that are constructed.
We recommend fitting the download interface to all PICAXE circuits. Without the interface the ability to diagnose and debug problems and issues will be greatly reduced, it will, as here, be near impossible to tell what a PICAXE is doing or why program code does not work as expected.
 
#24
Please note that an attachment was included in an earlier post. However Iam going to try to upload another one. This is a PCB
Ihave made several like this and had toabandon them all because they were not working properly
Your decoupling capacitor free, download circuit free PCB with incorrectly wired EEPROMs didn't work for those reasons.

You need at least a connection between that Serial In pin and 0V or else operation will be unreliable at best.
 
#25
From what you'll are saying am Ito believe that it is imperative to include a decoupling capacitor, and a download circuit on each PCB.
in order to have them working correctly .
As I was focusing on this issue I came across the 08M2 Motherboard module am Ito believe also that that is what needs to be constructed in order for each Picaxe project to work.
 
Last edited:

hippy

Technical Support
Staff member
#26
From what you'll are saying am Ito believe that it is imperative to include a decoupling capacitor, and a download circuit on each PCB.
in order to have them working correctly .
They are not imperatives, but it is recommended that both are included. This is the case with any PICAXE-based circuit no matter how it comes about.

What is imperative is that the Download Serial In pin is pulled to 0V to enable correct PICAXE operation.
 
#27
Thanks for the insight shared on getting my project working. One thing remains however ie. In order to pull the serial download In pin to 0
do I simply run a connection from pin 5 to 0 or do I need to use a resistor in series ( 10 K ) going to 0.
 
#28
Thanks for the insight shared on getting my project working. One thing remains however ie. In order to pull the serial download In pin to 0
do I simply run a connection from pin 5 to 0 or do I need to use a resistor in series ( 10 K ) going to 0.
If you don't want to use the download socket or program the PICAXE in-circuit, you can connect it directly to 0V.
 

hippy

Technical Support
Staff member
#29
In order to pull the serial download In pin to 0 do I simply run a connection from pin 5 to 0 or do I need to use a resistor in series ( 10 K ) going to 0.
It is recommended to use a resister ( 10K is commonly suggested but anything from 1K to 47K is probably okay ), but it is possible to connect directly to 0V if prepared to accept the risk that some adverse event may turn that pin into an output which may then cause damage. The chance of such an event would however likely be quite low.

It's like asking should you wear a crash helmet while walking in the street. You probably do not need to but if a small meteor hit you on the head you might wish you had. But then it's not likely to happen.

Wear a crash helmet - fit a resistor - and you don't have to worry either way.
 
Top