Shop OBEX P1 Docs P2 Docs Learn Events
trying to make a strobe circuit and program — Parallax Forums

trying to make a strobe circuit and program

Masters69Masters69 Posts: 3
edited 2007-05-22 20:29 in Learn with BlocklyProp
·I am currently working on a project for my electronics class and am working on a project that is using the bs2 and board of ed. i am trying to make a strobe circuit and program that will take music and judging by its frequency and amplitude and apply htat to the strobes in brightness and when they turn on and off.
i would appreciate any help i could recieve.

thank you

Post Edited By Moderator (Chris Savage (Parallax)) : 5/11/2007 5:18:34 PM GMT

Comments

  • edited 2007-05-09 20:58
    That sounds like a pretty interesting project. Responding to volume is going to be pretty easy. Frequency is a little trickier. Here's a hardware overview.

    For volume, you'll need:

    Microphone -> amplifier -> low pass filter -> ADC -> BASIC Stamp

    For the strobe, you'll need:

    BASIC Stamp -> isoltation -> relay, solid state relay, etc.

    The low pass filter will convert the audio signal to a DC signal that indicates the amplitude. The BASIC Stamp can use the ADC to convert these DC measurements to values its program can work with. Based on these values, the program will control the strobe. You'll need isolation circuits and then somethign to control the light.

    For frequency with the BASIC Stamp, you might want to consider low pass, high pass, and maybe bandpass filters similar to the ADC subsystem above to measure singal strength in several frequency ranges.

    There are also digital techniques for examining frequency ranges, but you'd need to switch to the Propeller Microcontroller to get the processing speed required.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • Masters69Masters69 Posts: 3
    edited 2007-05-11 17:02
    thanksd very much is tehre any programs that are possiley allready written or that are basic for this kind of application
  • edited 2007-05-11 19:48
    Yeah, there are lots of examples out there. In terms of Stamps in Class resources, the best place to start would be LED control from What's a Microcontroller, Chatpers 2 and 3, and ADC0831 reading from Basic Analog and Digital, chapter 3. Both books are free PDF downloads from:

    http://www.parallax.com/html_pages/downloads/siccurriculum/documentation_sic_curriculum.asp

    The first step would be to use the ADC0831 potentiometer voltage measurements to control the LED blink rate. Then, expand from there. At some point, you will ned up replacing the LED with the strobe subsystem discussed in the 5/9/2007 1:58 PM post. Make sure to ask me how to gang up ADC0831 A/D converters without chewing up a lot of BASIC Stamp I/O pins when you are ready to start using more than one.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • Masters69Masters69 Posts: 3
    edited 2007-05-22 17:32
    I recently changed my circuit to use lm 358's too be used as preamps and also as the amplifier how would i apply the the violtage to the bs2 and the relay and isolation circuits so i could use strobes as apposed to leds?

    thanks again Chris
  • edited 2007-05-22 20:29
    I'm assuming you'll be using an SSR (solid state relay) to switch your strobe on/off. The SSR gets, say, 0 or 5 V signals from the BASIC Stamp (or from your buffer circuit), and then opens or closes the current path to the device that needs to get power. The type of SSR output needs to be matched to the strobe's supply voltage/current requrements, and its input needs to be matched to the BASIC Stamp's output, or your buffer's output. Some SSRs can be run directly by the BASIC Stamp microcontroller pin. Others need buffering because of the SSR's current requirements, and others (especially conventional inductive relays - not SSRs) need drivers because they take a lot of current to magnetically throw a switch.

    The Basic Analog and Digital text introduces an opamp buffer in Chapter 1. That's one thing you can use to drive some relay inputs. Others can be driven directly by the BASIC Stamp, and others still require optocouplers or drivers with diode protection to prevent damaging BASIC Stamp I/O pins. Whether or not the LM358 will work for your particular setup depends on the opamp's output current limitations and the relay's input current requirements. You'll have to get the datasheets for both devices. For example, go to www.national.com. Then, type LM358 into the search field, and then download the datasheet from their product page. As you go through the electrical characteristics, there's a note about an absolute maximum output current limit of 40 mA, which you should stay well below, so maybe plan on not more than 20 mA. If you plan on getting closer to that 40 mA, you'll have to take a look at the rules for power dissipation, operating temperature, and so on. You may want to get some additional guidance from your instructor on those details.

    So, then you have to look at your relay's datasheet and find out how much current its control input takes to make its switch throw. If it exceeds the LM358's output current limitations, you'll either want to go shopping for a different output amplifier or a different relay.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
Sign In or Register to comment.