Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

need help with alarm circuit [toggle output]

wozzzzza

Junior Member level 3
Junior Member level 3
Joined
Dec 10, 2008
Messages
31
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,288
Activity points
1,485
been out of electronics too long and ant work this one out now.
i want to build a circuit, an alarm circuit, that will toggle armed and unarmed with 2 separate high inputs, e.g. one input goes high for half a second to turn it on and another input goes high for half a second that turns it off. no matter how many times a high pulse is sent to the on input, the alarm will remain armed and vica versa.
another n/c input to trigger the alarm out for 5 seconds, so when this input is open circuit it will trigger the alarm output for 5 seconds only when the circuit is armed. after 5 seconds waits for another alarm input.
how can i build something like this easily??

MODERATOR ACTION:
  • Added relevant information on title
 
Last edited by a moderator:
Hi,

I probably would use a small microcontroller. (maybe a 8 pin one is sufficient)
* less parts
* faster building the hardware
* flexible with modifications
* best accuracy
* small

but ... one needs to write the software. ... though it´s a simple task.

Klaus
 
Sim[ple block coding of a micro, suggest Arduino Nano board. Or use 8 pin ATTINY85
(you would use a Nano board to program it).

1727884341390.png


This is a possible working example, but logically the off input I do not seem to understand. Is the off
pin to terminate an ongoing on alarm after the .5 sec ?

The above is mBlock, a free programming utility, you drag and drop the blocks to describe your
desired program, and mBlock converts it to C code used to program the board/chip.


Regards, Dana.
 
Using a popular invert-gate oscillator I built an alternating beeper that you might be able to adapt. A hex inverter IC sounds sufficient. A slow oscillator enables and disables the fast oscillator. Each time you click the switch starts a sequence.

4 invert-gates make alternating beeper (click switch to begin).png


Link for above schematic. Click to:

1) Navigate to falstad.com/circuit,
2) Load my schematic into the animated interactive simulator,
3) Run it on your computer.

tinyurl.com/23f6624g

Use your mouse to click the switch open and closed.
 
Last edited:
Hi,

I probably would use a small microcontroller. (maybe a 8 pin one is sufficient)
like suggested above Arduino Nano board. Or use 8 pin ATTINY85 ???

This is a possible working example, but logically the off input I do not seem to understand. Is the off
pin to terminate an ongoing on alarm after the .5 sec ?

Regards, Dana.
on pin to arm the alarm, off pin to disarm alarm e.g. car alarm, on to turn on, off to turn off and alarm will only trigger when armed and off will also turn off when triggered.
 
This will sound alarm for min 5 sec, after than stay off until alarm off button pushed.

1727912917174.png



Regards, Dana
 
What does the alarm signal go to led, piezo.....?

Arduino Nano board :

1727950889378.png


Download and install Arduino IDE : https://www.arduino.cc/en/software
mBlock uses the Arduino programmer utility to talk to board and program it. Board can also
be used to program an ATTINY85 in case you want to use that instead of board. That
process looks like : https://solosodium.github.io/2017-08-07-program-attint85-with-arduino-nano

Board is easiest to use as it has onboard regulator for chip, has onboard xtal that gives accurate
timing for delay/wait command in mBlock, cheap (~ < $ 3), breadboard friendly.

1727951286658.png


mBlock down load and install : https://s.makeblock.com/download/pc-windows

USB cable

I will post project later so you can use that as basis to get started.

Note I advised mBlock for programming in case you are not a C coder. Its the easiest way
of getting up and running on straight forward projects like this. Has advantage once you
learn block programming there are several variants out there with common and different
capabilities, like Tuniot for web based wifi solutions (you would use ESP8266 or ESP32
boards in that case), Nodered, Visuino, Flowcode. Learn one they are all similar.

In post #7 I trashed the kings English :

This will sound alarm for min 5 sec, after than stay off until alarm off button pushed.

When on button pushed alarm will come on for a minimum of 5 sec, and stay on until
off button pushed is how it should have read.

Regards, Dana.
 
Last edited:
What does the alarm signal go to led, piezo.....?


Regards, Dana.
relay and a horn. i guess the output of the chip will goto a 547 transistor to power the relay.

so i will go out tomorrow and get an arduino nano development board and a 10uf capacitor, ATTiny85 IC 8 pin DIP8
a 5v regulator for PSU.
anything else i need?

so the ATTiny85 connects to the arduino nano development board for programming, once programmed the ATTiny85 is used by itself, right?
 
so the ATTiny85 connects to the arduino nano development board for programming, once programmed the ATTiny85 is used by itself, right?

Yes, you first using Arduino IDE program new firmware into Nano to make it function as a programmer.
I supplied link earlier.

If you drive relay should be done like this (schematic is focus of posted image) :

1727954868190.png



Regards, Dana.
 
Project attached.

Note if you use ATTINY85 you have enough GPIO to add a flashing led
when alarm is on. Easy to add. Obviously can be added to Nano as it has
a lot more GPIO.

By the way, just a thought, if you wanted to make a talking alarm take a look
at this :


The above uses Snap4Arduino block programming, very similar to mBlock.


Regards, Dana.
 

Attachments

  • Two Button Alarm.zip
    54.9 KB · Views: 19
Last edited:
Programming ATTINY85 with Nano board, just google that. Its a process of
changing firmware in Nano board to turn it into a InSystemProgrammer.

There are approaches using (eliminate need for Nano) :

1728038199725.png


And appropriate driver, but its tricky to get this running under windows. involves using
Zadig to force driver behavior.


Regards, Dana.
 
First settings, "hide stage", turn that off.

You then you have to pick the old Nano board from the board selection, click add, lower left
on screen. Search at top, enter "nano", and pick the old board.

1728214451224.png




Regards, Dana.
 
First settings, "hide stage", turn that off.

You then you have to pick the old Nano board from the board selection, click add, lower left
on screen. Search at top, enter "nano", and pick the old board.

View attachment 194436



Regards, Dana.
now i come up with this and cant work out how to get it fixed
 

Attachments

  • mblock.jpg
    mblock.jpg
    293.9 KB · Views: 10
before that i cant even burn boot code, ive got the following errors. it reads the board ok when i get board info, followed instruction on that website above and dont work when i go an burn boot loader, i have both the windows iot core and attiny packages there.
 

Attachments

  • mblock4.jpg
    mblock4.jpg
    219 KB · Views: 10
  • 20241007_202435.jpg
    20241007_202435.jpg
    1.8 MB · Views: 10

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top