I showed you many different ways to flash your LEDs for your projects but I'm
going to show you how to do it with sound like this right here for your
welder or for thunder and lightning so let's get going with this right now I'm
Tom Kvichak and this is Toms Trains and Things this channel was
created to help other modelers who are need of guidance
in pursuing their dream of building a model railroad and last month I showed
did this scene right here where I have a welder on it there's some lighting on
there but I added a few more things I put a barrel with a flame in it and then
I activate the welder with the sound from a clip that I put on the DFPlayer
mini so let me show you what I've been doing for the last couple of weeks had a
lot of things going on I had to order some parts port I got the wrong parts in
on some of the parts that I use were the wrong ones that didn't work I tried to
optocoupler on it and although an opto coupler works pretty good separating two
circuits I had to sever the connection from one
Pro Mini to the other Pro Mini completely because it was interfering
with the sketch I don't know why it was doing it but as long as the two were
connected the sketch on the second microcontroller didn't work correctly so
what I had to do was give it a high signal for a second and then shut it off
with the relay so nothing was connected and then it worked fine now I have it
set up now you remember the other Pro Mini that I have I did another one
I got a pro mini with the DF player on it and this is this is going to be added
to the display over there but anyway here is what is up there now I have that
on the uno and we're triggering it with this
I found another sensor and this is similar to something that I used it
worked years ago it has a longer range than these right here it's basically the
same thing you have the emitter and the receiver in there but it's amplified a
little bit but anyway this is what I've been working on I'm starting it out the
same way with the building lights coming on
but then the flame and the barrel comes on okay from there I'm transferring it
over to the other microcontroller which has the DF player in there with the with
the sound of the welder and as the weld as the sound goes so does the LEDs for
the welder so once that's finished this will go off will transfer back over to
here and then eventually shut everything else off but the problem that I was
having was when I connected this one directly to this to trigger this one to
start it wouldn't stop there is something about the the two of them
being hooked together that messes up with the sketch so when I was looking
for something to be low and it was high it still started so I had to put a relay
in there okay so the relay resolved the problem I only had one relay so then I
thought well maybe I'll get an opto coupler which is this little thing right
here it's called an opto coupler and it's also referred to as an opto
isolator and it has like a little infrared LED in there the triggers a
transistor you only have the emitter and collector of the transistor and there
you don't have the base and it acts just like a relay but you sever all
connections between the two circuits just like a relay would do when when you
open up the the the circuit it's a lot smaller and a lot cheaper
than the relay the opto-isolator made the problem worse
so it's going back to the relays now I put these two connectors on here for the
relays okay this first one right here is going to be the trigger pin for here
this goes to pin number 4 and as you can see I put the blue wire from here to pin
number 4 and I got ground on both of these on this side here so there's a pin
number 4 right there and then there's the pin over there with the ground on
this side so that will be hooked up to the relay on the other end so that will
start this pro mini here and start this actually this will already be on have
power on it but it'll start the DF player and I'm not quite sure where I'm
going to mount the relay because this is the only really I have right now and I
ordered something that's on a board so I may just put this one on here mount it
somewhere and then run that to for the stop signal for the other micro
controller and here's what I have I I changed the connector for the speaker I
put a smaller one on there to match these over here this is the red I got it
red white and blue for the welder right here okay this is the power coming in
for some reason the raw pin doesn't work on there so I had to put it over on the
VCC pin which is unregulated so I have to make sure that it's the 5 volts from
the other microcontroller feeding over into here so I'll just have
to jump the the connector from the other microcontroller over to here for the
power for this one this is the relay that I got in the Elega starter kit
I had to mount it on a board so I can attach it to
the other board attached it to the board like that and then my wires to the
bottom this is the ground over here this is the common going to the normally open
contact this is the feed in from the trigger pin going to supply into voltage
for the coil and then coming over here to the center contact for the common and
going up to there now I have the relay wired into the
other board been working on this thing for a while now and I think I finally
got it after playing with it for a while I got me a new sensor and all I have to
do is play around with the timing on this for now then I got a new barrel
over here with flames I got some voice in it too and the welders noise triggers
the LEDs
I just have to fine-tune it just a little bit before I put it back on the
layout here's what it looks like underneath I just wish I could find a
better mount than the ones that we got over here there's little white things so
all I got to do is Mount this and then tweak the adjustments on there I tested
it on another one but just like I said in some of my lessons you have to
fine-tune it once you get it up on your layout so I'm gonna have to do that now
that I have this all together when I first started I only had one relay on a
board and luckily I got the LED starter kit and there was a relay in there so I
ended up using that on this project also as you can see this relay right here I
got that in the El ago a lagoon starter kit and I mounted it on a little circuit
board it is a maze of wires and resistors printed circuit board would be
a lot better but then you'd have to design it and that's where I'm lacking
in my knowledge of designing a circuit board for it I don't have all the wires
hooked up to it now but dinner here is how I got it to work I tested it out on
a breadboard actually two red boards like this and then once I got it to
where I needed it I transferred everything over to these
microcontrollers here well when I powered this thing up I'll show to you
in a minute the raw pin which is the one all the way up in the corner I
had that connected to the power on my connector and apparently it's bad power
supply or whatever the the voltage regulator on there is not working so
when I put power on the raw pin nothing happens
I had it all mounted and ready to go and I applied power to it and this board
didn't work so what I'm gonna have to do is come back over here to the VCC pin
and tap into that so that's just plain five bolts on there so it's not not
regulated so I can't put anything greater than five volts on the raw pin I
could put a higher voltage on it and it'll drop it down to five volts right
here there we go we got the light on there so we're good to go
that's all we needed to do right there to get this thing going just to move
that wire over into onto the VCC instead of the raw let me show you where it goes
and goes right here over top of the tunnel portal this holds up the center
of it and then I had to move this this was over here I had this but that's
where I had the board where did I had that glued in there but I had the board
was in the way so once I get it all up in their health set this thing up here
and that keeps this end up so this is this end is down and it just rests on
here and I'm gonna have to do some painting and stuff on some of the other
things there and these are here to hold the wall in place I don't know if I
showed you that in the in a different video but I just have the wall goes up
in place like that and up against those stops and then I got the short piece
right there so we're all ready to put this thing back together and finish it
up okay I got it sitting in place and I'm checking it for clearance and so we
got plenty of room right there the wires are out of the way if I have to I could
wire tie these wires up here and this is the speaker wires up here so we're good
to go on that I got two power wires over here temporary until I run them down to
the bottom but there we go the entire sketch is actually to sketch to sketches
I'm going to put a new page on my website
Tom's trains of things slash projects and I'm gonna have it on there just like
I have for Arduino Made Easy I have Toms Trains and Things slash Arduino for
those on there for the lessons on there I'll have the projects the sketches for
the projects on Toms trains and things slash projects so go take a look at it
on my web page the entire process takes about three and a half minutes from
start to finish so you already saw the lights coming on so I'm gonna keep death
out of it I'm going to show you what I added to it as far as the welding
sequence operated through the sound and I have some more sound effects in there
also so let's go take a look and see what this looks like
For more infomation >> 羅智強》仰德大道 危險的通勤路 - Duration: 5:30.
For more infomation >> 「Power錕」團隊分裂? 粉絲專頁、影片全刪光 - Duration: 3:14.
For more infomation >> How to Get Cat Urine Smells Out of Carpet
For more infomation >> Mercedes-Benz S-Klasse 380 SEC AIRCO SCHUIFDAK TEMPOMAAT 160000KM !!! - Duration: 1:04. 
For more infomation >> Soutěž o mobil - soutěž o telefon | Denisa TV - Duration: 10:18.
For more infomation >> Opel Corsa 1.3 CDTI ECOFLEX S/S COSMO Airco ECC Navigatie Cruise control Stuurverwarm. Rijklaarprijs - Duration: 1:13. 
For more infomation >> Two Syrian children and a victim of the war of Bashar Assad and Russian missiles - Duration: 1:33.
For more infomation >> 8 usages incroyables et méconnus de l'eau oxygénée - Duration: 8:39. 
For more infomation >> X-Men Evolution S02E15 Le facteur X - Duration: 20:23. 


For more infomation >> X-Men Evolution S02E17 Jour d'expiation - 2ème partie - Duration: 20:18.
For more infomation >> X-Men Evolution S02E16 Jour d'expiation - 1ère partie - Duration: 20:16.
For more infomation >> Grâce au soutien d'un chien d'assistance un joueur de NBA revient plus fort ! - Duration: 4:13. 
For more infomation >> vlc record 2018 07 07 13h22m16s dvd D - Duration: 2:27. 
For more infomation >> vlc record 2018 07 07 13h53m10s dvd D - Duration: 0:56.
For more infomation >> Toyota Land Cruiser V8 4.5 D-4D Executive 5p. Full options + personalize pack - Duration: 1:10.
For more infomation >> vlc record 2018 07 07 13h32m20s dvd D - Duration: 1:54.
For more infomation >> X-Men Evolution S02E14 Opération Renaissance - Duration: 20:24.
For more infomation >> vlc record 2018 07 07 13h28m14s dvd D - Duration: 1:24.
For more infomation >> X-Men Evolution S02E11 La danse des ombres - Duration: 20:23.
For more infomation >> Toyota Hilux Dubbele Cabine 2.4 D-4D 4WD Executive Automaat 5-persoons grijs kenteken UNIEK en NIEUW - Duration: 1:12.
For more infomation >> X-Men Evolution S02E10 Le manipulateur - Duration: 20:22. 
For more infomation >> Mazda 6 Sportbreak 2.2D Skylease+ / Navi / Xenon / PDC - Duration: 0:55.
For more infomation >> Peugeot Partner 170C 1.9 D Avantage - Duration: 1:10.
For more infomation >> Peugeot 208 ACTIVE 1.4VTI 95PK 5-D - Duration: 1:13. 
For more infomation >> F-35, UFFICIALE: ESTESA VITA OPERATIVA, IL CACCIA VOLERÀ FINO AL 2070 - Duration: 2:56. 
For more infomation >> HELENE FISCHER: DARAUF HABEN IHRE FANS SCHON DIE GANZE ZEIT GEWARTET! - Duration: 2:47.
No comments:
Post a Comment