Ideas for "panic" alarm indicators

Thread Starter

izon

Joined Mar 17, 2013
217
OK... I entered the program with just the two lines as you indicated in your last post.
Now I have 0 volts on the ULN2803 pins 1-8
I still have 17-18 volts on ULN2803 pins 12-18 with positive lead on +24vdc.

Now I have 0.47 volt on pins 12-14 of ULN2803 and 1.47 volts on pins 15-18 with the positive
meter lead on +5vdc.

Also measuring between ground and the ULN2803 pins 12-14 I have 3.9 vdc and on pins
15-18 I have 1.29 vdc.

Seems odd there should be a difference in the output on pins 12-14 compared to pins 15-18 to ground, right?
I'm getting more confused so hope you can spot something I'm doing wrong.
 

elec_mech

Joined Nov 12, 2008
1,500
Is anything connected to pins 12-18? If you have the LED's, MP3 module, etc. connected, you'll see odd voltages. If nothing is connected at all, then I might be a little concerned.

Keeping the same two lines of code in the PICAXE, connect the LED's and MP3 module. Does everything remain off when power is applied?
 

Thread Starter

izon

Joined Mar 17, 2013
217
NO... the beacon LED and whatever channel of the MP3 player I touch to 16-18, produces sound.. chime, etc.
They ARE operating at this point! Weird?

Between ground and any of these pins gives me zero voltage. I'm sure hoping I haven't mistaken the pinout
arrangement on any of the ICs or miswired them but then I wouldn't think the earlier code that I wrote for
the switch LEDs would have worked.
In this trial mode, I have all 3 of the "remote" panic button connections jumpered and tied to the +24.
Yes the switch LEDs are permanently wired to the corresponding pins... 12, 13, and 14 but they do NOT
light up now .... odd that they don't light up and yet the beacon LED and any MP3 connectors produce
their result... ie they are on.

UGH... I'm so messed up here but I triple checked all my wiring before I put the boards into the housing
so just don't know where my mistakes might be.
Thanks for hanging in there...appreciate your help greatly.
 

elec_mech

Joined Nov 12, 2008
1,500
Let's try this:

Code:
    LET dirsB = %11111111        ' Make all B pins outputs
    LET pinsB = %00000000        ' Turn off all outputs on port B
    PAUSE 2000                   ' Wait two seconds
    LET pinsB =$FF               ' Turn on all outputs on port B
    PAUSE 2000                   ' Wait two seconds
    LET pinsB = $00              ' Turn off all outputs on port B
    PAUSE 2000                   ' Wait two seconds
    LET pinsB = $FF              ' Turn on all outputs on port B
    PAUSE 2000                   ' Wait two seconds
    LET pinsB = $00              ' Turn off all outputs on port B
Assuming the MP3 sound is less than two seconds long, does the MP3 sound turn on and off? Does the beacon turn on and off. Do the other LED's turn on and off?
 

Thread Starter

izon

Joined Mar 17, 2013
217
Thank you.

I entered your code (copy & paste) and the 3 switch LEDs come on together and go off together as expected
but the beacon and all 3 MP3 player ports are active.. ie light and sound come on and stay on immediately
upon applying power... even after program has run through it's routine twice and finishes, the beacon & MP3 continue on.

BTW... the MP3 output sounds are on/off, on/off and repeats.... one is like a door bell sound... ding, dong, ding, dong....
(these are the default sounds until a voice message is entered once things are working properly)

So oddly, those ports on pins 15-18 are constantly "on" activating whatever is connected to them.
 

Thread Starter

izon

Joined Mar 17, 2013
217
Update

Some interesting readings:
When a program includes turning the switch LEDs on and off, the voltage on ULN2803 pins 12-14 fluctuate between 3 volts on and 3.6 volts off (approx. values)
While this program with only the switch LEDS is operating, the voltages actually fluctuate slightly on pins 15-18 from 0.6 volts to zero volts. (with no load on them)

When I have the above program with the switch LEDs and just one of the MP3 lines included and connected.........the voltage on the connected MP3 line varies
from 0.6 volts to 6.0 volts as the sound repeats.

Now for what might be pointing to a faulty ULN2803 chip.
If my program has pins 14 through 18 going high and low (output pins / PIC pins B.0 through B.4), it should result in changes on the "input" pins 1-5 of the ULN2803 which does happen..

Pin 1 changes from zero to +5.0 volts (yet the output pin 18 only goes from 0.6 volts to zero volts.
This is true of pins 1 through 4. (yet output pins 18, 17,16 & 15 only go from 0.6 volts to zero volts)
ULN2803 pin 5 (if included in program to go high and low) goes from zero to +5 volts also and it's output operates the correct switch LED.
Pin 6 (not included in program) remains constant low as expected while the above changes are found on mentioned pins

So to summarize, it seems all input changes occur on the ULN2803 (seems to show PIC is functioning OK) but only output pins 12,13,14 function properly
so only explanation I can see is that the darlington chip isn't working correctly.

If you've carefully waded through all this, I hope you have arrived at same conclusion as I... or what might you suggest ? I would have to order a new
chip from DigiKey I suppose as I didn't order a spare.
 

elec_mech

Joined Nov 12, 2008
1,500
Excellent troubleshooting!

I would agree the problem seems to point to the ULN2803 IC. One way to know for sure is remove one of the LED's, say the one connected to pin 12, and connect the beacon LED to it and see if it operates as we expect. If yes, repeat for one of the MP3 lines. If yes again, then you need a new ULN2803 IC.

If the same problem occurs, then we have an issue with the 24VDC devices. If that is the case, we may need to ask for additional help because I'm running out of ideas.
 

Thread Starter

izon

Joined Mar 17, 2013
217
Thanks for the kind words and thanks for the helpful suggestion of narrowing this problem down..... apparently it is related to the 24 volt devices.

I tried your first suggestion but instead of the beacon turning on and off as does the switch LED, the beacon is constantly on! ugh

Then with all ports B.0 through B.6 in the program turning on and off, I tried connecting (via resistor) the isolated switch LED to each port
which would have driven a 24 volt device...... and the switch LED turns on and off properly!

This proves that the ports on the darlington are working fine when driving an LED that uses a 5 volt supply but not a device using
the 24 volt supply... instead they are on continuously.

So.... how to make the chip think it is driving something like the switch LEDs on those problem ports (pins)???
Would something like an opto isolator work or something behaving like a relay .

Glad to be this far but wishing I wouldn't have to add circuitry which I don't have room for on my board... can squeeze another
into the box though if needed.

Thanks so very much for helping to this point.... will still need your help when all is working to get the code loaded for final desired results.
May be a good thing that we didn't start with trying to use your code and find this problem thinking it was all involved with code....

Will be awaiting your suggestions !
 

elec_mech

Joined Nov 12, 2008
1,500
Is there any voltage across pin 9 and 10 on ULN2803 when power is applied?

I'm running out of ideas. Do you happen to have a breadboard? Can you remove the ULN2803, put it on a breadboard, connect GND to pin 9, 5V to pin 1, and test the beacon on pin 18 (with 24V and 5V GND's connected)?

I'm missing something, but I don't know what. If time allows, I'll attempt some testing at home this evening just to make sure I'm not losing my mind.
 

Thread Starter

izon

Joined Mar 17, 2013
217
Progress...

I experimented with an opto isolator chip. I connected the LED side with a 120 ohm resistor from +5
and the other end to pin 15 of the darlington (the one that drives the beacon).

Then I connected the opto receiver side with the black beacon lead wire on one pin and the red
beacon wire to +24 volts... it WORKS !

I also tried the MP3 player in parallel with the beacon just to check it out and it also sounds at the
same time the beacon comes on.

I had so many loose wires around while experimenting that I think I blew out one pair
of the 4 section opto chip.

Maybe you could suggest a resistor size for current limiting on the opto input side (if the 120 ohm isn't best).
Is it going to be OK to connect the beacon or an MP3 line right across the output or do I need a resistor
on one side of that portion?

Soo ... after your suggestions to the above, I will begin assembling a 4 channel opto isolator onto the
board but need to order a new chip.

Thanks very much !
 

elec_mech

Joined Nov 12, 2008
1,500
I'm still bothered the ULN2803 isn't working as expected. Yesterday was a wash, so I'll try to get into my shop this weekend and run some tests to make sure I didn't royally screw up.

The optoisolator is too small to provide the current to the MP3 player. According to the quick-start guide, the MP3 could use up to 3.5W which translates to 3.5/24 = 150mA. The LTV-847 has an absolute max rating of 50mA. I'm not sure about the beacon since there is no current information given.

If we want to skip the ULN2803, I suggest a logic-level MOSFET. These are voltage-controlled devices and these I have used for controlling different voltages with a PICAXE successfully. Aside from the MOSFET, you don't need any additional parts. The BS270 should work nicely, handles up to 400mA and runs 50 cents each at Digikey. I do suggest separating the beacon and MP3 player if you weren't planning on that already which means two MOSFET's. At 50 cents, I'd buy a few extra just in case, plus you can add other parts later if needed.
 

Thread Starter

izon

Joined Mar 17, 2013
217
Hi,

Thanks for your reply.

I would strongly oppose not using the ULN2803 since that is what came with the PICAXE kit with it's ready made PC board, socket and device. It would
toss out that board as it would need a new layout to place and wire the MOSFETs. I'd feel like I'm starting all over .

What spec are you actually referring to when you say the LTV-847 can handle a max current of 50ma? On DigiKey I see among the several "filters"
is a column for Max DC current forward as well as one for "Current output per channel". I'm guessing the latter is the one to be concerned with, right?

Looking through their choices, it shows only a 50ma and 80ma choice for output per channel. And non of the 80ma are stocked and don't know the price.

Now regarding the current draw of the various devices connecting to the additional LTV-847 opto isolator as I was suggesting using.

I wish the MP3 player had clearer info on it's current draw rather than have to derive it from the wattage consumed. I agree that way comes up with around 150ma.
I've called the factory tech support in California and they could not pin anything down at all. Also called the distributor and all they could do is refer to the spec sheets
which puts you back at square one.
Interestingly, I tried two separate ammeters in my shop to arrive at a better idea. First I operated an item of electronics that used an AC Adapter rated at a max of
100 ma. Upon measuring with two different meters, it consumed about 7-8 ma. Since I had the same value with both meters, I can assume the readings are correct.
The meter has two low amp ranges (manually selectable) 200ma and 20ma. Both range settings gave the same results.

Then with the MP3 player operating with a loud sound, I measured it's current draw with both meters. They both came up with 7.ma ! Much less than calculated value.

I also checked the current draw of one of the switch LEDs.... it was 16ma with both meters.
And I checked the current draw of the beacon LED (has multiple LEDs in it)... it was just under 60ma.

Sooooo one of those rated at 80ma should handle these. Odd that with the beacon operating for hours and hours and drawing around 60ma, that it wouldn't have
destroyed the chip which supposedly can handle only 50ma.

So I'm confident on the readings on the LEDs but still a bit unbelievable on the MP3 player value.
The smallest fuse I have here is 125ma. I placed it in series with the MP3 player operating and it did not blow.
Not a great test but if it drew closer to 150ma, it may have... of course the figures are supposedly when maxed out
so again not real clear.

I'm still thinking of a higher rated opto isolater as I had been suggesting. Or.... could the FETs be driven by the darlington on those 4 outputs of concern
in the same board space of my 16 pin opto?

Back to you....BTW have an enjoyable Memorial Day weeked.
 

elec_mech

Joined Nov 12, 2008
1,500
On hindsight, the MP3 power is referring to the power feeding it - all we are concerned with is triggered the channels which should consume next to no power, so we should be okay there. Sorry, been a long week and my mind is a bit fried.

The beacon is going to require more than the standard LTV-847 can handle.

Again, I'll try to do some experimenting this weekend on a ULN2803 or equivalent and see if I encounter the same problems (and hopefully come to a solution). :)
 

Thread Starter

izon

Joined Mar 17, 2013
217
On hindsight, the MP3 power is referring to the power feeding it - all we are concerned with is triggered the channels which should consume next to no power, so we should be okay there
I'm not quite sure what you are saying here. If it says it consumes 3.5 watts and it is operating at 24 volts.... then why isn't it drawing about 150ma through the output of the optocoupler?
Did you have a typo there when referring to "triggered the channels"... maybe you could rephrase your thoughts there so I might be able to grasp what you mean.

Then if you are saying there is minimal current drawn through the optocoupler via the MP3 player (I measured 7-8ma), the only other concern would be the
beacon of 60ma, which the IC mentioned in previous post from Mouser, should be able to satisfy the requirements, right?

Note: I also measured the current from the 24v supply through the white lead wire on the MP3 player. That measured about 11ma which isn't a concern
with our discussion but does make me wonder where they come up with (calculated) a current draw of 150ma.

P.S. I just dug out my old reliable analog VOM and confirmed the beacon draws about 60ma
and the MP3 player about 7 or 8 ma when a channel is producing sound. Sooo.... seems like
those figures should be the ones to work with.


Thanks again.
 
Last edited:

elec_mech

Joined Nov 12, 2008
1,500
I'm not quite sure what you are saying here. If it says it consumes 3.5 watts and it is operating at 24 volts.... then why isn't it drawing about 150ma through the output of the optocoupler?
Did you have a typo there when referring to "triggered the channels"... maybe you could rephrase your thoughts there so I might be able to grasp what you mean.
You're supplying 24VDC directly to the MP3 player which is where the 3.5W comes from. You are not supplying power to MP3 module through the switches. The switches simply tell the MP3 what to do. Not to say some current doesn't pass through the switches as you've measured.

60mA is awfully close to the max current of the 80mA components you're looking at. I'd still suggest a logic-level MOSFET.

I had a few minutes to test a ULN2803 with 5V and 24V yesterday. I tied the grounds together and connected them with pin 9 of the ULN2803. I them hooked up an LED on pin 18 to work with 5V (using a 330Ω resistor) and another LED on pin 11 to work with 24V (using a 2.2kΩ resistor). I connected 5V to pin 1 and pin 8. Both LED's came on when 5V was applied and both remained off when 5V was removed.

I'm not sure why the MP3 and beacon aren't working as expected. I could draw up the example I mentioned above and you could try it with your setup to confirm operation if you'd like. Otherwise, you can use one of alternate solutions we've discussed.
 

Thread Starter

izon

Joined Mar 17, 2013
217
I guess it might be good to step back and review a bit.

Referring to messages #86 and #87. I have never replaced ULN 2803 after determining it may be faulty.

Let me review by posting the latest readings I get on ULN2803 (still the original)
(recall that the simple program on the PIC is turning all 7 outputs on for 4 seconds and off for 1 second)

Pins 1 through pin 7 give a reading of 4.9 volts when they are high (on) and 0.2 when low (off).... as expected.

Pin 8 is negligible since it isn't in the program and Pin 9 is, of course, at ground.

Pins 12, 13, 14 (the switch internal LEDs) are all at 0.6v when on and 3.7v when off.....as expected.

Pins 15 through 18 (all are related to using the 24volt devices) are about 0.6 to 0.9 when on as well as when off with NO LOAD attached.
Pins 15 through 18 read about 0.6v when on but read 5.8vots when off, WITH LOAD.
the load I've used is an external LED with a series 2.2k resistor to +24 volts...... AND the LED is ON CONSTATLY ! ???

Before going on any further, I have to order a new UL2803 and then see if there are any changes.

Will get back to you when I've received the new chip and check the results.

Thanks very much!
 

Thread Starter

izon

Joined Mar 17, 2013
217
Parts arrived. I replaced the ULN2803 but still had the same issue with the 24 volt devices being on continuously. I even found that an LED + resistor would not turn off when connected to the 24
volt supply just as the other devices did. I know you found different results but I have no explanation. Has to be something peculiar... I've checked and rechecked ground connections and that both
supplies grounds are tied together. On the positive side, I installed and wired in another 16 pin DIP socket for the new optocoupler (with the 80ma rating). I have the 4 outputs of the ULN2803 (pins 15-18) going to the ISP845X optocoupler inputs.

PTL... the button lights, the red beacon light and the MP3 player all work properly !!!! when connected via the new optoisolator.
I've been at this so many hours and now am too tired to give a more detailed report .. but for the heck of it, I pressed the cancel / reset button within the 4 seconds in the cycle that everything is operating and the button press made no change ..???? So don't know whats up with that. As recommended by the mfr. I put a 250ma fuse in line with the 24vdc to the MP3 supply. After a correction to the reset situation, I hope to get some help on downloading and trying the main code.

Oh... on that new optoisolator, I use 150 ohm resistors on the input LEDs to the 5vdc supply. Is that an acceptable value?

Thanks for now....
 

Thread Starter

izon

Joined Mar 17, 2013
217
Hello elec mech,

Hope you will have a chance to help me out regarding my previous message. I noted you had the reset button at a different location on a previous schematic. Hopefully I can still use the NO button. From searching a bit, sounds like this particular
chip doesn't have a reset pin and only way to do so may be to interrupt DC supply to the PIC.

Thanks again for your time and help.. it is very much appreciated !
 
Top