NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Project Help and Ideas » ledarray with switch function
May 27, 2011 by escartiz |
Hi, i am trying to build a led array consisting of only 15 columns and 5 rows instead of the 24 from the led array panel project, so i will have some free pins, what i like to do is use those free pins to act as switches. I have the following code working very accurate to real time to have my led array panel act as a counter.
What I like to do is when ever i get a total of 30 seconds or a minute i like to power a 24v buzzer that will act as an alarm to alert every 30 seconds intervals. Also at the same intervals a 120v solenoid should be powered to open a gate. I believe i can accomplish this with the available free pins. both the alarm and the solenoid need to be powered for only a second or so every 30 sec. for what i have been reading and watching in some of the tutorials i think i will have to use mosfets connected to the mcu free pins and the external power sources to act as switches but I still have no good clue what to do, i am learning at a slow phase and don't understand many technical definitions. if someone could give me some advice and point me in the right direction I'll appreciate it. |
---|---|
May 28, 2011 by Ralphxyz |
Hi escartiz, my advise is to start simple. Start with the basic bread board setup. and add a mosfet and led then get the led to light off the mosfet this can use the same power supply. Then do the buzzer with the 24v power supply. Then do the solenoid. Do all of these separately using different pins. Then after everything is working start to combine them. Start with lighting a led, you can use the Nerdkit motor tutorial as a guide for all of these. Ralph |
May 28, 2011 by escartiz |
Hi Ralph thanks for your advise, I have now two pins turning leds every 30sec increments :) these is what i wrote inside main() based on the led blink tutorial DDRD |= (1<<PD6); DDRD |= (1<<PD7); and inside the loop
thanks, now i have to manage the external powers with the mosfet to replace the leds for the buzzer and solenoid, I am reading again the NK guide. I just realized i had read about these before but now that i am reading it again I begin to understand it a lot more. I wasn't paying attention the first time |
May 28, 2011 by escartiz |
ok I connected the 2n7000 mosfet to the board, based on the motors and mcu tutorial
everything seems to be working fine. every 30sec intervals i get about 4 volts displayed in the voltmeter, i will try now with external power instead of that from the board looking at the 2n7000 datasheet I see a "60v max rating". Now my question is those that mean i can power the mosfet left pin "source" with up to 60v???? Sorry if these is a stupid question, I suppose I should have understood this by now from watching the tutorial and the datasheed info but I am very confused and cannot understand many technical definitions and values. I guess my next step is to:
Please correct me if I am wrong. I am afraid of damaging my NK by making a wrong connection |
May 29, 2011 by Ralphxyz |
escartiz, make sure and use a common ground for all power sources! Can you draw out a wiring diagram? Ralph |
May 29, 2011 by escartiz |
|
May 29, 2011 by escartiz |
thanks a lot Ralph. I tried it and its working. I was missing the common ground and it wasn't working until I saw your last reply :) I was reading other post and I came a cross a suggestion to use a relay after the mosfet for the 110v AC solenoid? would that be correct for the next step? |
Please log in to post a reply.
Did you know that you can turn a $20 digital scale into a live weight sensor using our kit with a few extra parts? Learn more...
|