Shop OBEX P1 Docs P2 Docs Learn Events
What would you recommend? — Parallax Forums

What would you recommend?

ZanZan Posts: 6
edited 2010-07-01 07:45 in BASIC Stamp
Howdy!

I'm new to the world of electronics, so please go easy on me.

I'm working in a research lab. My employer has instructed me to build for him a LED lighting apparatus that allows me to control the pulse rate of the LEDs - a LED strobe light. The reason why I have to build this strobe light, vs. buy a strobe light is because I need to be able to swap different LEDS / resistors in and out easily for short tests. The idea I proposed to the boss is that I build myself a frequency controller, and then a "lamp" on a breadboard - that way I can easily swap LEDs in and out without creating anything permanent. Once these initial tests have been completed, I can try working on something a little more permanent.

I have plenty of time to physically construct the lamp, but until only Tuesday to form a parts list and schematics / a plan for him.

The boss knows that I am far from an expert working with electronics. And, since I know I'm not an expert, I thought it would be wise to turn to someone who might be one.

A friend told me to look at a stamp from Parallax. I was looking at the "BASIC Stamp Activity Kit." I need to pulse my LED strobe over a wide range of frequencies, from 1 Hz - 100+ Hz. If I could get incremental accuracy to one decimal place, that would be even better. Would this stamp do what I need it to do?

I am thinking I need to buy a bread board or two, LEDs, resistors, and a A/C to D/C power supply. This is more or less what I need to build a simple LED array, right? On top of this, I need something to control the pulse rates of the LEDs. This is where I need your help.

What would you recommend?

Thanks guys!

EDIT:

I forgot to mention: it would be best if the frequency of the pulse rate can be changed "quickly" as well. If I could just turn a knob or plug the unit into a computer to change the pulse rate, that would be fantastic.

Post Edited (Zan) : 6/26/2010 8:35:23 PM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-06-27 04:08
    Take a look at the 555 timer chip. It can be set up to work in many ways and can be 'programmed' using resistors and caps to pulse at almost any rate you need within reasonable limits and you didn't specify them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • JonathanJonathan Posts: 1,023
    edited 2010-06-27 14:39
    If the frequency range you need is really limited to ~ 100 hZ, the Stamp can do that, especially as that would be all it is doing (from your description). All you would need then is a transistor that can switch the LED's. How many and what current rating are the LEDs? If they aren't too large and there aren't too many, you can use a Darlington array chip like the ULN2003 for the transistor.

    The 555 describded above can also do the job, but you will need to be able to measure the frequency range, as in with a meter. The 555 can have the frequency changed via a potentiometer, or with the Stamp you could program the frequency. How accurate does the frequency need to be?

    Jonathan

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • ZanZan Posts: 6
    edited 2010-06-27 16:34
    It would be best if I could get the frequency accurate to 1/10 of a Hz. I predict the majority of my tests will run between 1 and 100 Hz.

    I am looking at building a 24w lamp for this thing to control, roughly 650 LEDs.

    Now that I've put more thought into this lamp idea the boss has assigned me, the concept of using a computer instead of a "pure frequency controller" seems to be appealing. I would be able to attach a light sensor to the computer and write a program to control the LED lamp accordingly, right?

    My understanding of how transistors work is limited. Transistors act like a switch, in a way, to control a high power line? I noted that the micro controller runs off a 9V battery, whereas the lamp will run off a 24 w power supply. The transistor would control the power flow of the PS to the LEDs, right?

    Another question I have is: would it be possible to control multiple separate lamps with one micro controller? Say if lamp A pulsed at 10 Hz and lamp B pulsed at 12 Hz?

    Sorry if my noobness is making you wince, but I am grateful for your help!
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-06-27 18:40
    >>> Now that I've put more thought into this lamp idea the boss has assigned me, the concept of using a computer instead of a "pure frequency controller" seems to be appealing. I would be able to attach a light sensor to the computer and write a program to control the LED lamp accordingly, right?<<<

    Yes and no. A computer is a bad interface for light sensors and LEDs since it typically isn't designed for this. This means that you'll likely need some form of intermediate control device that communicates between your PC and end device, in this case LED lamp. For a crash course in this area, see the following site & related book: www.tigoe.net/pcomp.

    >>>My understanding of how transistors work is limited. Transistors act like a switch, in a way, to control a high power line? I noted that the micro controller runs off a 9V battery, whereas the lamp will run off a 24 w power supply. The transistor would control the power flow of the PS to the LEDs, right?<<<

    Yes, this is the basic idea. Here is an article that should help you to understand better: www.parallax.com/dl/docs/cols/nv/vol1/col/nv6.pdf.

    >>>I am thinking I need to buy a bread board or two, LEDs, resistors, and a A/C to D/C power supply. This is more or less what I need to build a simple LED array, right? On top of this, I need something to control the pulse rates of the LEDs. This is where I need your help.<<<

    You can very easily build a simple "proof of concept" model with the activity kit alone. However, you'll really need more time from your boss before giving him a parts list & schematic. If it can't wait past Tuesday, then I highly suggest that you contact one of the Parallax affiliated consultants that has sufficient experience to get you started. I say this because what your proposing is doable, but having the answers to your questions in such a short time is an unreasonable request of your boss. There are too many factors to consider for somebody that is just getting started.
  • ZanZan Posts: 6
    edited 2010-06-28 02:32
    Thanks, Kevin.

    My apologies for confusion; when I said "computer" earlier, I was referring to the micro controller. I was thinking that I could program the micro controller so that when the light sensor detects a change in the ambient lighting, the LED light would be able to adjust accordingly.

    That article you posted did help. Thank you for that.

    I will be contacting Parallax on Monday to discuss the potential of the kit and what I might need extra. I am also meeting with a colleague who knows more about circuitry than I do (although not an expert in the field, he knows more than me).

    I am grateful for your help! I'll let you know how things turn out.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-06-28 04:32
    Okay, not a problem.

    Just a note on the kits. The activity kit contains the manual & parts for the "What's a Microcontroller" course. It's great kit, and you can't really go wrong with it. However, if you have a bit more to spend, you might want to look at the discovery kit. It includes the same course materials, but it has a slightly more flexible board that can accept different BS2 modules. There is a comparison here: www.parallax.com/tabid/234/Default.aspx.

    Both are great kits, just different. If you want to look at the WAM manual, you can find it here: www.parallax.com/go/WAM.

    Another board that you may want to consider is the Professional Development Board. It is the most fully featured of the Stamp compatible boards offered by Parallax. This board does come as part of a kit (StampWorks), but the kit is not really the best "first step". However, if you're going to be doing a lot of BS2 based development over the long term, the features are a very nice upgrade over the other boards.

    But definitely talk to Parallax.
  • IroneIrone Posts: 116
    edited 2010-06-28 09:02
    How Ya Doin'? Just an addition on my part. If your boss is anything like any of the bosses I have had they would like a 45 cent chip over a 150 dollar program. With a 45 cent 555 chip, a few resistors, a capasitor and a eight or twelve position dip switch your problem seems within reach. You must use the formula: f = 1.44·divided by·(R1 +2*R2)*C to·set your frequency.

    The 555 chip likes R1 to be around 5k ohms. If you use that and use 10k ohms for R2 with a .1uF capasitor your frequency should be 576 Hertz. You can use higher or lower frequencys by changing R2. You can also change the frequency by altering the capasitor.

    The 555 chip can not use 24 volts as the power. It likes 9 volts or 12 volts up to a maximum of 15 volts. It will run with a voltage regulator though. A 7509 regulator will work if your 24 volts is stable. If it is bouncy put in a 330uF capasitor on the feed side and a .1uF after it to even it out. The 555 will work better if you put a .1uF capasitor between the input and ground close to the chip. With 9 volts as your source and most LED's using 1.8 volts to run them you have 7.2 volts left over. General LED's use 10 or 15 milliamps for longest life so 7.2 / .015 = 480 ohms. The standard resistor·is 470 ohms which is close enough.

    If you must have 24 volts to power up the LED's you can use a transistor. Most transistors will support 40 volts and give you 100 or 200 milliamps. These are style 92. There are even high power transistors that support higher amperage ratings. I have one on my grill, but that is another story. With 24 volts the resistor for the LED must also change. 24 volts minus 1.8 volts leaves 22.2 volts you have to divide it by .015 amps which leaves 1480 ohms as your resistor.A 1.5k is close enough.

    Casey

    P.S. This chip was designed by Hans R. Camenzind in 1970 and it is still in use today.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • ZanZan Posts: 6
    edited 2010-06-28 12:31
    I present both options to my boss on Tuesday. Thanks for your help, guys.
  • tedbeautedbeau Posts: 48
    edited 2010-06-30 13:39
    Irone said...

    How Ya Doin'? Just an addition on my part. If your boss is anything like any of the bosses I have had they would like a 45 cent chip over a 150 dollar program. With a 45 cent 555 chip, a few resistors, a capasitor and a eight or twelve position dip switch your problem seems within reach. You must use the formula: f = 1.44·divided by·(R1 +2*R2)*C to·set your frequency.

    The 555 chip likes R1 to be around 5k ohms. If you use that and use 10k ohms for R2 with a .1uF capasitor your frequency should be 576 Hertz. You can use higher or lower frequencys by changing R2. You can also change the frequency by altering the capasitor.

    The 555 chip can not use 24 volts as the power. It likes 9 volts or 12 volts up to a maximum of 15 volts. It will run with a voltage regulator though. A 7509 regulator will work if your 24 volts is stable. If it is bouncy put in a 330uF capasitor on the feed side and a .1uF after it to even it out. The 555 will work better if you put a .1uF capasitor between the input and ground close to the chip. With 9 volts as your source and most LED's using 1.8 volts to run them you have 7.2 volts left over. General LED's use 10 or 15 milliamps for longest life so 7.2 / .015 = 480 ohms. The standard resistor·is 470 ohms which is close enough.

    If you must have 24 volts to power up the LED's you can use a transistor. Most transistors will support 40 volts and give you 100 or 200 milliamps. These are style 92. There are even high power transistors that support higher amperage ratings. I have one on my grill, but that is another story. With 24 volts the resistor for the LED must also change. 24 volts minus 1.8 volts leaves 22.2 volts you have to divide it by .015 amps which leaves 1480 ohms as your resistor.A 1.5k is close enough.

    Casey

    P.S. This chip was designed by Hans R. Camenzind in 1970 and it is still in use today.

    Just adding my two cents, while I agree the 555 with an R/C circuit will let you vary the strobes of the LED I think it might be a little difficult to adjust the timing within 1/10 of·a Hertz. Also the OP said he wanted to be able to quickly change the strobe speed. Pulling capaciters and resisters and replacing with new ones seems to me to be a little bit of a hassle. I would suggest making a chart of cycle times based on the range of ressisters and capaciters, showing the Hertz achieved for each R1, R2 anc C value. If your going to do 100's of different settings, this could get frustrating. Granted you could use a Pot in place of one of the resisters but then you don't have any way to know what your strobe Hertz setting is without some type of meter to read the pot resistance.
    I think the basic stamp setting would be more efficient in the long run. There are people here that will gladly help with the programming portion of the project.

    ·
  • electrosyselectrosys Posts: 212
    edited 2010-06-30 21:35
    This is a simple circuit schematic·for the 555 idea!

    attachment.php?attachmentid=71587
    568 x 230 - 5K
  • wiresalotwiresalot Posts: 40
    edited 2010-06-30 23:38
    What do you guys use to draw the diagrams?

    Thanks,

    wiresalot
  • IroneIrone Posts: 116
    edited 2010-07-01 03:24
    How Ya Doin'? Nice schematic. I am old though and in place of 100n I call it .1uF, 10n I call .01uF and 1n I use .001uF. He said he was just new and this will make our answers come out even.

    Casey

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I fish, therefore I lie!
  • electrosyselectrosys Posts: 212
    edited 2010-07-01 07:45
    Hello Casey,
    Yes, I have also add a few more capacitors and a selector to have different and higher Hz as well, and I use it sometimes as a handy tools.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.