Problem with simple circuit.

maaca

New Member
I'm trying to do a prototype board using the toggle commands. Done it on a breadboard using axe029 into a 20m2. I'm using an audio detector from E-Bay which goes high at 3.0volts when active for 2 seconds. I am using four detectors in total. The problem is the circuit becomes what I believe to be very capacitive. Just touching a wire will set it off. Sometimes even a finger close to the circuit will do the same. The circuit in general, is very unstable and when the toggled pin goes high, it will then after a short time go low. Of course this pin should stay high until toggled again. Ive tried using a bypass capacitor on each output but that didn't help. Have a 104 cap across the 5v dc battery input. Can anyone help me on this ?. Thanks .

Code.
#picaxe 20m2
main:

if pinC.1=1 then
toggle c.2
pause 5500 'This pause allows time for the detector to go low.
endif

if pinc.5=1 then
toggle B.0
pause 5500
endif

if pinB.1=1 then
toggle B.2
pause 5500
endif

if pinB.3=1 then
toggle B.4
pause 5500
endif

goto main
 

hippy

Technical Support
Staff member
Your code looks okay, your principles sound, so it may well be a hardware issue.

If your modules have their outputs disabled when not activated that would cause the input pins to float, to become hyper-sensitive, and that could give rise to the behaviour you are seeing.

If that's the case then a 10K resistor between each of the input pins and 0V should solve that problem - Anything between 1K and 47K would probably work for a quick test.
 

maaca

New Member
Your code looks okay, your principles sound, so it may well be a hardware issue.

If your modules have their outputs disabled when not activated that would cause the input pins to float, to become hyper-sensitive, and that could give rise to the behaviour you are seeing.

If that's the case then a 10K resistor between each of the input pins and 0V should solve that problem - Anything between 1K and 47K would probably work for a quick test.
Thank you sir. I will try to do that tonight and let you know.Very grateful for your help.
 

maaca

New Member
Thank you Hippy on the breadboard it has worked a treat. I am extremely grateful as I can move on now and build the circuit. Many thanks.
 
Top