Show Posts
Pages: [1]
1  Using Arduino / Sensors / What's my best option for a sensor in this situation? on: April 16, 2014, 05:51:42 pm
Greetings all, I posted another thread and got some great advice about a prototype I'm working on for a model railroad project I'm working on with my dad.  Essentially we'll be using an Arduino to do certain things when it detects a train in a certain spot on the track.  But what I'm looking for is advice on the best "sensor" option I have.

I do a lot of work with pinball machines so my first thought was to use an IR transmitter and receiver and shoot the beam across the track.  Pinball Life (the lowest cost pinball parts supplier) sells sets of them for $7 ( ).  I even did some reading and made a simple Arduino sketch to test the opto setup and it works [LED turns on when the beam is present and goes out when the beam is broken--I'd use this to trigger an event] ( ).  The problem is that the optos aren't exactly small or nondescript so they would be hard to disguise on either side of the track.  So I'm looking for some expert advice on if there's a better way to do this?  Perhaps some kind of sensor under the track or something that shoots up through a hole in the track? 

My concern is that something like a light sensor (while probably very inexpensive and easy to wire, which are both big pluses) would get tripped if we ran the trains in a "night scene" or if anyone turned out the lights!

Thoughts? Thanks!
2  Using Arduino / Project Guidance / Re: Arduino for this? Or something else? on: April 15, 2014, 07:58:30 am
Luidr, you going to have to forgive my ignorance on this one but I've never really worked with a separate "board" like this. I have one on order now but I was just curious how something can work *without* the Arduino?  I mean, I have an Arduino, so do I use the Arduino to "program" the Adafruit board?  And then the VS1053 can just run and play the files on certain trigger events?  Or do I always have to have it connected to an Arduino of some sort?  In the tutorial on their page I don't think they show it in "standalone" mode.

I have used an Arduino to "program" an ATTINY85 chip and made a custom PCB for that (to make an LED-dimmer for a coffee table), so I've "burned" a chip before, but there were coherent instructions and examples for me to follow on that one--just wondering if I need to order something like a nano or mini to put this thing in place permanently?
3  Using Arduino / Project Guidance / Re: Arduino for this? Or something else? on: April 14, 2014, 01:17:27 pm
Whoa, this looks promising! Thanks liudr.  I'm going to check out their project with it and see if it will fit the bill!

Very nice of you to get a project going with your dad. Good for you!

As for hardware, neither arduino nor raspberry pi is required for a simple trigger. You can get this following module and hook the opto output to one of the trigger pins. You may want to add some small caps to smooth the rise of the signal so it doesn't trigger too many times. If you are unsatisfied with the result , get a small arduino clone on ebay, such as arduino nano, and program a debounce code and add a guard so when the sound is triggered, it will not be triggered again for a fixed time. Make sure it's long enough so subsequent cars don't all trigger the sound as they pass, unless that's your intention.

I don't have personal experience with this module but one of my clients vouches for it.
4  Using Arduino / Project Guidance / Arduino for this? Or something else? on: April 14, 2014, 11:49:35 am
Greetings all, I just started working on a project with my dad and we would like a smallish device to perform a task.  I naturally thought "Arduino!" but I'm not sure if Arduino is the best method, or if something else (low-cost and small like a Raspberry Pi or something) would be better suited.  So here's what we're trying to do:

We would like to have an opto switch that shoots across a model railroad train track and when the train passes through the beam (thus triggering the switch) a sound file (we don't need a specific file type here--we can go with whatever is easiest) is played.  We could push this sound out to an amp, or simply to a little speaker secreted in the scenery.

We'd need this to be able to be able to run *without* being hooked up to a computer (so standalone).

I'm doing this to spend more time with my Dad as he's getting along in age and I'm getting enjoyment out of the electronics part of it and I'm looking to bring in some, hopefully, simple but cool methods to it!

Thanks in advnace.
5  Using Arduino / Project Guidance / Re: Can I use this MOSFET in my project? on: December 13, 2012, 12:22:18 pm
6  Using Arduino / Project Guidance / Can I use this MOSFET in my project? on: December 13, 2012, 11:40:49 am
Greetings all, I had a little PCB made which just did some PWM via a 10k Pot.  I picked somethign easy because I just wanted to familizarize myself with using the arduino and then using the arduino as a programmer as I had programmed an ATTINY85 do do the PWM.

Afte rhaving the board made and sent to me it works!  I'm totally into this!  But the MOSFET (220 package) is pretty "tall" on the PCB and intereferes a little with turning the pot knob.  So I went looking around and found this MOSFET that is in a DIP4 package ( ).

So it SEEMS like it should work fine for my purposes: logic level gate, can handle 2.5 amps (I am using a regulated 5v supply in and my LEDs draw .8amps when turned "on" all the way).  But I'm concerned about the fact that the MOSFET's data sheet says it can only handle "1.3Watts" as its "Max power dissapation."  The other MOSFET says it can dissapate 75W!  The "RDS" (which I thought was what you used as the "resistance" in any calculation on a MOSFET) is listed as 0.1 Ohm at 5v.

I tried to read some posts about how to calculate if this MOSFET can handle it and I came up with 0.1Watts which doesn't seem right and then a guy at work said he thought I needed 5Watts dissipation.

So I'm coming here to see if someone can tell me exactly what I need to find on a data sheet so I don't melt anything smiley

Again, my project has 5v regulated coming in, passing through the MOSFET (which is being triggered on the gate by the ATTINY85), and then out to the LEDs which draw about 0.8amps when fully on.  These LEDs are in a piece of furniture so it's possible that they would be on full power "all the time" for days on end.

Thanks in advance if anyone can help me understand this because I'm really enjoying this and feel like I'm come so far and then BAM, brick walled because I don't understand this little piece.
7  Using Arduino / Project Guidance / Re: Need help with my first schematic on: November 13, 2012, 11:19:45 am
So like this?
8  Using Arduino / Project Guidance / Re: Need help with my first schematic on: November 13, 2012, 11:09:28 am
Thanks Emi, is that to stop the thing from just resetting when the power fluctuates a bit?
9  Using Arduino / Project Guidance / Need help with my first schematic on: November 13, 2012, 10:46:56 am
Greetings all!  I'm working on a project based on some design advice I got on this forum and I've successfully got the arduino-based project working on my breadboard--I think I'm  ready to move on to the stage of trying to get a PCB made.  I have started working in Eagle and I have made an "attempt" at the schematic.  But, since I am no expert, I wanted to post a screenshot of it and get your thoughts on whether or not I'm good, close, or in real trouble here smiley

The basic concept is that this is just a basic PWM LED dimmer controlled via a 10k linear Pot. 5v power comes in via a sparkfun 5v regulated power supply and it connected to a DC barrel jack. I have programmed an attiny85 (which was AWESOME FUN) from my arduino and it basically adjusts the PWM signal going out on PB0 based on the input result it is taking in from the pot on PB3.  The PWM out enters a mosfet setup and goes out through the molex connector (of which only 2 wires will be used).

My LEDs are drawing about .4amps total (about 40 lights) and they are parallel with their own resistors built in.

So, my questions are:
1). Am I missing anything in this schematic that really jumps out at you.  For example "well, if you don't have an X or a Y or a Z right here the entire thing is going to burst into flames"
2) I originally thought the draw from the LEDs was going to be much higher (like 2 amps)--but since it is only .4amps do I even need the mosfet?  I think the arduino can handle up to 1amp can't it (off VIN power)?  But what about the attiny?

Okay, here is a screenshto of where I'm at after my first attempt!
10  Using Arduino / Project Guidance / Basic info about a LED PWM "dimmer" circuit at ~3amps on: November 01, 2012, 02:26:53 pm
Greetings all,

I am working on what (I hope at least) I think will be a pretty basic setup.  But, since I am pretty new to Arduinos (about a month) I wanted to ask a question about this specific project.  Basically I want to be able to PWM a large number of LEDs and I'm not sure how it interacts with the Arduino chip.

My ultimate project goal is to program an ATtiny85 to read a Pot and then set the LED level accordingly.  I am predicting the project could use up to 100 LEDs which draw about 33mA each at 5v (resistors are alrady embedded in these LED Lamps).  So, since it is possible to have all the lights on at the same time, doesn't that mean that I'd need way more Amperage (100x33mA = 3300mA = 3.3Amps) than the Arduino can handle?

I eventually want to move the ATTiny85 onto its own PCB and then use a PoT for the "dimming" (via PWM).  So what I'm asking here is what kind of technology do I need to research to allow more amperage into my project?  I bough a cheap 5v 4a wall wart style PSU from ebay that I was planning on using to power the project.  So do I need to use something like a transistor to allow the higher amperage to draw off the 5v on the PCB (from the wall wart) and avoid the ATtiny85?

I guess I'm asking what will I need to prepare for to turn what is one of the most basic beginner-level tutorials (PWM LED dimming with a PoT) to work at a much higher draw from the LEDs.

My completely inexperienced thought process was that I would need some kind of 5v voltage regulator capable of handling like 4Amps (since I imagine the $4 wall-wart PSu from ebay is not regulated), some caps to smooth that, a PoT, the ATtiny85, the LEDs and something (transistor? relay? MOSFET?) that can handle controlling these LEDs other than the ATTiny85?

Am I on the right track here?

11  Using Arduino / Project Guidance / Can arduino do this and, if so, what's my study path? on: October 20, 2012, 05:23:28 pm
Greetings all!  I am completely new to Arduino (just finished my first version of the "Blink" program smiley ) and I want to know if Arduino can do the following.  If it *can* I'd like to know so that after I finish my first tutorial guidebook I'll know what kind of tutorials or knowledge to seek out!

Okay, so what I'm working on is a coffee table with LEDs in it.  Basically it will be a 2'x4' rectangle with about 75 LEDs placed in the table underneath a glass sheet.  What I'd like to be able to do though is write some sketches that control what lights are lit at certain times.  So I'd like to be able to turn on all 75 lights, or cycle through the lights one at a time, or have the lights "chase", or light half of them, or blink a just the ones on the outer perimeter of the table, etc...

I think I'm asking if the Arduino can control many more lights than it has outputs?  I think pinball machines do this my using what's called a "light matrix" where they have up to 64 lights controlled by only 16 wires in an 8x8 setup. Does the Arduino allow for anything like this?

If so, what is this called so I know what to start studying!
Pages: [1]