Ideas for "panic" alarm indicators

Thread Starter

izon

Joined Mar 17, 2013
217
Quick question regarding the DC to DC converter. It has a separate pin for NEG connection on
the input voltage and output voltage.... will be OK to just tie those two NEGs together and to
the ground path of the other circuitry?
Thanks !
 

Thread Starter

izon

Joined Mar 17, 2013
217
Just now noticed your schematic shows an L M 7805 at the 24vdc power input and it giving a 5vdc output.
I see this is really a regulator and I was thinking it was a DC to DC converter....the one you linked me to in text on an earlier message as mentioned previously from Digikey.

I looked at the spec sheet on the regulator and I'm not clear on what input voltage it can handle and still yield a 5vdc out.

I now have that. DC to DC converter in place on my board so hopefully that will be ok rather than the regulator.

By the way,the wall wart I have chosen is a regulated supply using a switched mode circuit so it should maintain a pretty solid 24vdc output.

Sorry for the confusion.
 

elec_mech

Joined Nov 12, 2008
1,500
You should be fine connecting the grounds on the DC-DC converter. The one you're using is designed as an isolating supply, but you don't need isolation in this case.

I selected the 7805 simply because it is cheap. However, it will get warm dropping 24V to 5V, so using a DC-DC converter should keep the heat generated, if any, to a minimum.
 

Thread Starter

izon

Joined Mar 17, 2013
217
Hi... I've got most of the components assembled for the project but need to recheck all wiring before installing the ICs and powering up.

I have a question. Will the closing of either SW1 or SW4 result in an output at U3 (ULN2803) pin 18? And the output from pins 17,16
in similar manner from SW2 and SW3? Just want to be sure so my wiring will correspond if it differs from schematic.

I have gotten the MP3 unit with the configuration for "NPN open collector circuit" as you indicated... is this correct? Also is it correct
to have the MP3 unit's power leads directly connected to the + and - 24vdc supply?

That is it for the moment. Here is a link to a page on the MP3 unit and towards bottom right are links to the manual if you need to
refresh your mind on it's specs, etc.
http://www.wolfautomation.com/produ...-system-voice-annunciatorbrpatlite-bsv-series

Thanks for now!
 

elec_mech

Joined Nov 12, 2008
1,500
izon said:
I have a question. Will the closing of either SW1 or SW4 result in an output at U3 (ULN2803) pin 18? And the output from pins 17,16
in similar manner from SW2 and SW3? Just want to be sure so my wiring will correspond if it differs from schematic.
The opening (or the pressing) of SW1 or SW4 will result in pin 18 on U3 to go to ground thus turning on (playing) CH1 of the MP3 player.

izon said:
I have gotten the MP3 unit with the configuration for "NPN open collector circuit" as you indicated... is this correct?
Yes.

izon said:
Also is it correct to have the MP3 unit's power leads directly connected to the + and - 24vdc supply?
As far as I can tell, yes.

So you are close to needing a program then?
 

Thread Starter

izon

Joined Mar 17, 2013
217
Thanks...I made a mistake regarding the switches...I meant if they open rather than close. Thanks for stating it correctly.

I think I just discovered a large boo boo. I think I was disoriented when figuring the pin out on one of the ICs
So may have to do some extensive re wiring on that. Have to recheck and correct.

So, yes I was close to programming but now have to say....stand by till further notice ...thank you!
 

djsfantasi

Joined Apr 11, 2010
9,237
I haven't figured out how to do a proper quote where the quote automatically includes izon said: this, this, this, but I can tell you how to do basic quoting.

  1. Copy and paste the text you want to quote into the new message.
  2. Highlight the message with your mouse (move cursor to one end, hold down left mouse button, and scroll until all text is highlighted).
  3. In the menu above the new message click on Insert (newspaper-looking icon).
  4. Select Quote from drop down menu.
  5. Done.
Used to be easier with the old site - you'd select Quote first then the cursor would automatically be placed between the quote designators and you'd just paste the text.

I've seen other's do a much better job by including the name of the poster of the quoted text, but I haven't been able to figure out how to do that other than manually typing and bolding that portion which seems like a lot of work. Hopefully someone will shed some light on this.
Please forgive my somewhat off-thread information, but I thought I would add to @elec_mech's information, how to easily add the user identification. After the word QUOTE at the beginning of the quote and before the right bracket, insert (manually) an equals sign followed by a quote, the user name, and a closing quote. Like the example below (extra spaces inserted so that it is not recognized as a formatting command):
[ QUOTE="someuser" ]
 

Thread Starter

izon

Joined Mar 17, 2013
217
djsfantiasi.... Thanks so much, glad you chimed in. Only problem is when I want to use it I probably will have forgotten or lost track of where to find the method, ha...
:)
 

Thread Starter

izon

Joined Mar 17, 2013
217
Hi Elec Mech.
Well as near as I can tell, when I thought I was making a mistake, I wasn't.... so two negs make a positive and that means my wiring was correct.... I hope. Duh...

I guess I'm ready for the next step which is programming the PIC so you probably have some questions for me. You will have to walk me through the entire
process since, as you've seen, I can be pretty dense !

Talk to you soon.
 

Thread Starter

izon

Joined Mar 17, 2013
217
I did insert the three ICs into their sockets and plugged in the AC adapter. Of course at this point I only have my green LED power light on. Nothing smoked so far...maybe forgot to stuff the chips with the right blue smoke, ha.
 

elec_mech

Joined Nov 12, 2008
1,500
Quick and dirty first cut of untested program attached. Simply remove the .txt and you should be able to open in the PICAXE editor. A quick run down:
  1. See if SW1-SW6 is open (or line is damaged/cut)
  2. If yes, then go to appropriate routine
  3. Read potentiometer to get flash rate
  4. Play appropriate MP3 file
  5. Turn on LED module and appropriate signal LED
  6. Wait x time (dictated by pot) while checking to see if reset button is pressed
  7. Turn off LED's and wait x time (again checking to see if reset button is pressed)
  8. Repeat until reset button is pressed.
  9. Once reset is pressed, turn off all LED's and MP3 channel and go back to 1
I'm sure you'll want changes, but this should get you started. I don't know how the MP3 module works - it may repeatedly play the file until we turn it off, in which case we'll need to change the program.
 

Attachments

Thread Starter

izon

Joined Mar 17, 2013
217
Well I haven't gotten to the point of trying your program. I've been wading through some of the PICAXE info and trying to learn it and set up the very, very basic BASIC simple
program they have given.

It is where it tells you to just connect an LED/resistor to one of the outputs (actually I went to the Darlington chip) and transfer the program to the PIC and run it. Well I took
advantage of the 3 LED lighted pushbuttons I have and used those as the output display. I'm thrilled that it worked !... never having attempted anything like this. It shows as
LED on for a second, off for a second and repeat. I added to the program to operate all three switch LEDs in sequence so they all do work.

The problem I do have is that connected my "flashing red beacon" will not light up. It needs 24vdc for power but it will not turn on except when hooked up all by itself.
I've connected an LED/resistor to the same output and it works so there is something about the beacon itself and I suspect it needs more current than the Darlington
can handle??? Here is the beacon from Ebay that I'm using.
http://www.ebay.com/itm/231300054397?_trksid=p2060353.m1438.l2649&ssPageName=STRK:MEBIDX:IT

I measured at 24vdc on the bench, that it draws about 91ma. What is your diagnosis of my problem and how can I resolve it... cheaply as possible???? Well I see the
spec sheet shows it can handle 500ma, if I reading correctly, so that may not be the problem, ugh.

I have not gotten to setting up the MP3 player so have not tried connecting it into the circuitry yet. Still a bit confused on setting it up so will tackle when the
current problem has a solution.

Thanks for your help!
 

Thread Starter

izon

Joined Mar 17, 2013
217
Additional problem besides the previous post..... I have connected the MP3 player to it's + & - 24vdc (black & white wires). Then with nothing in the program addressing the ports it would be using, I can take the blue wire from the player and touch to any of the ports B0 - B3 and it will play it's chime sound from that channel. Actually on the Darlington, I'm touching pins 13-16 and the player sounds.
I guess I don't understand why that those ports seem to be active all the time even without being in the program. And yet the 3 LEDs in the switches operate perfectly and change on / off time just as I program them. Hopefully those pins aren't shorted to ground on that IC. Since I'm never going direct to the PIC, I hope it has been protected via the Darlington chip.
Suggestions welcome.
 

elec_mech

Joined Nov 12, 2008
1,500
izon said:
I'm thrilled that it worked !... never having attempted anything like this.
Congratulations! Glad to hear you're learning from scratch.

izon said:
The problem I do have is that connected my "flashing red beacon" will not light up.
I'd have to see how you're wiring it. In a nutshell, connect +24V power to the red lead of the beacon. Connect the black lead to pin 15 of U3 (ULN2803).

Picture connecting the beacon straight to 24V as you've done. Now picture putting a switch in series with the negative lead. That is what the ULN2803 is doing.

Ah - another thought - be sure the -24VDC line is connected to the -5VDC or more simply put, make sure both 5V and 24 grounds are connected together, otherwise the ULN2803 won't work with your 24V devices.

I'm not sure what is happening with the MP3 module. First make sure the 5V and 24V grounds are connected.

I suspect you haven't programmed pins B0-B3 to do anything - is this correct? If so, they could be 'floating' meaning you haven't told them to do anything so what they do is anyone's guess. You never want to leave pins floating. Try adding these two lines:

Code:
    LET dirsB = %00000000        ' Make all B pins outputs
    LET pinsB = %00000000        ' Turn off all outputs on port B
Hopefully by connecting the blue wire to pins 16-18 on ULN2803 now you'll see nothing happen.

If not, power your MP3 module. Take the blue wire and briefly touch the +24V line. What happens?

Now take the blue wire and briefly touch the 24V ground line. What happens?
 

Thread Starter

izon

Joined Mar 17, 2013
217
Appreciate the congratulations... thanks.

I've pretty much done most everything you've suggested and understand exactly what you mean at each point.
Yes, I have both supply grounds tied together. I understand that the outputs on the ULN2803 are essentially being placed at ground when triggered.

Below is the type of code I've been using which operates the switch LEDs just fine. I've typed in your two
lines as you see and hope that is accurate.
Just for the heck of it, I used the ohmmeter (with power off) and checked resistance from the discussed
outputs of ULN2803 and they all check in the megaohm range so no shorts to ground.

If I take the beacon LED red and tie to +24vdc and touch the black to common ground, it operates.

Now the results after entering your two code lines and leaving the existing ones gives me the switch
LEDs working yet. However touching the blue MP3 wire to any of the 12-15 pins on the ULN2803
still gives a continuous sound from the player ! ?

Interestingly, now I can connect the beacon LED red wire to +24vdc and touch the black wire to
ANY of those outputs (12-15) and it lights up... continuously !!! ???

Sooo seems that at least the beacon LED will work on it's correct output but at this point it stays
on which may be part of the programming code not being set up right.

Still confused why all 4 of those outputs now are functional all the time ... code again?

Thanks for the help... we are making progress!
See code lines below: BTW I'm assuming the lines to the right on each code line are just commentary and not needed for the code.
OOps... you asked.... if I touch the MP3 wire to ground, it sounds, if I touch it to +24vdc,
it does NOT sound and if I touch it to +5vdc it does also sound... little strange there.

main:

LETdirsB=%00000000
LETpinsB=%00000000
highB.5
pause100
lowB.5
pause500
highB.4
highB.6
highB.5
pause1000
lowB.4
pause500
highB.6
pause500
lowB.6
pause500
goto main
 

elec_mech

Joined Nov 12, 2008
1,500
I'm a little confused by the explanation. With the code you posted above, the switch LED's work as expected?

Move the LET commands above Main: - they only need to be executed at start-up, not while within a program loop.

I'm not sure why you're testing the beacon and MP3 on pins 12-15. The MP3 blue line should go to one of the following pins on the ULN2803: 16, 17, or 18. Does the MP3 sound if you connect the blue line to one of them? Try connecting them with the power off/removed first, then apply power. Something squirrelly could be happening if you're making intermittent connections while power is applied.

The beacon should be connected to pin 15 on ULN2803. Again, do this with the power removed, then apply power and let us know what happens.

I assume the code you posted isn't exactly what is in the program? There are no spaces between pause and 500, high and B.5, etc.

As your code stands now, the MP3 and beacon should remain off if connected as mentioned above.

Not sure what last high B.6 is supposed to do. It is high from previous lines, so you could remove it and one pause 500 and replace the second to last pause 500 with pause 1000.

To eliminate everything, try running just the two LET commands I gave you and nothing else with the blue MP3 wire connected to pin 18 and the beacon connected to pin 15. Use a meter and verify a) there is 0V between GND and pins 1-8 on the ULN2803. Also verify you see no voltage between 24V or 5V and pins 12-18.

Comments are not critical to code operation, but I strongly suggest you add comments to each and every line of code - while a bit tedious, you'll know exactly what each line does later when you have to go back and review it down the road should the client want you to make changes. It is a good habit to get into at the start.
 

Thread Starter

izon

Joined Mar 17, 2013
217
So sorry.... made several mistakes in my remarks.
Regarding the switch LEDs.... I haven't really checked that they are behaving as I thought I had them programmed but guess I meant at least they are responding to
some code directions so the LEDs and the PIC/ULN7803 are working properly on those pins..12, 13, 14.

You are correct asking about me referring to those pins regarding the MP3 player and beacon behavior....... I should have been referring to them as pin 15 = beacon
and 16,17, 18 are the MP3 player outputs. I used the wrong identification on the pins being used but the action is still much like I said with all of them seemingly
triggered continuously.

But.... you are again correct in pointing out my programming code... was just sorta messing around with it and didn't double check to see that it made sense..... just
was excited to see that the LEDs would go on and off in some sort of pattern without caring what the code really showed..... yes forgot the spaces on some lines, etc.
or else in my rush to copy n paste, it got messed up.

Well there is one problem after the tests you asked me to make. I cleared all code except using your two lines. I connected the MP3 player and beacon as you directed.
Both of them are constantly on once I power up the unit.
There is no voltage from GND and pins 1-8 on ULN2803 ... there is no voltage between the 5 vdc line and pins 12-18 BUT there is around 17-18vdc between the 24volt
positive line and pins 12-18. (approx. the difference between 24 and 5 volts) The 24 volt line reads about 23.25 volts.

Sooo what is the meaning of that ?
Thanks..
 

elec_mech

Joined Nov 12, 2008
1,500
Okay, I'm an idiot. The PICAXE program uses 1 to designate outputs, not 0. Try the following two lines only and re-measure 1) GND to pins 1-8, 2) 5V to pins 12-18, and 3) 24V to pins 12-18.

Code:
    LET dirsB = %11111111        ' Make all B pins outputs
    LET pinsB = %00000000        ' Turn off all outputs on port B
 
Top