Discolight effect with bass beat control using PIC
Description: The PIC microcontroller is capable of controlling a motor after each beat, with the option to bypass certain beats using pushbuttons. The rotation speed and duration can also be adjusted within specified limits to prevent register overflow or underflow. These settings are stored in EEPROM, ensuring that they are retained even after a power shutdown. A beat consists of a series of vibrations, which trigger interrupts for the PIC. To avoid multiple triggers, a counter is implemented in the code that disables the response to a beat for 200 milliseconds following the first interrupt. A 180-millisecond delay is generally sufficient when using the amplifier's output or line out as the music source; however, a 200-millisecond delay is necessary when using a microphone due to the influence of room echo. After constructing the hardware, precise adjustment of trimmers is essential. Without careful experimentation, the PIC may fail to recognize every beat due to low amplification levels or may trigger multiple actions from a single beat. The original circuit that converts bass beats into pulses was designed by Dan Fraser and updated by Tomi Engdahl. The line-out control was replaced with a microphone input, and the 555 circuitry was removed in favor of a software solution. The unique aspect of this project lies in the software developed for the PIC microcontroller. An Automatic Gain Control (AGC) circuit eliminates the need for potentiometers for sensitivity adjustments, which have been substituted with trimmers. The microphone is integrated into the control electronics, reducing potential background noise by eliminating the need for an external placement. The arrangement of the lens, lamp, and parabola must be carefully selected to achieve sharp beams, highlighting the importance of optical design. A barrier positioned in front of the lamp prevents white light from passing through the lens.
The described circuit utilizes a PIC microcontroller to manage motor operations based on audio input, specifically targeting beat detection. The system architecture includes an input stage that captures audio signals, typically from a microphone, which is then processed to identify beats. The microcontroller is programmed to interpret these beats as interrupts, allowing for responsive motor control.
To ensure reliable beat detection, the implementation of a debounce mechanism is crucial. The 200-millisecond delay following the first detected beat serves as a safeguard against false triggers caused by noise or reverberation in the environment. This timing can be adjusted based on the specific characteristics of the audio source, with the system calibrated to respond optimally to the expected signal amplitude.
The EEPROM functionality is essential for maintaining user-defined settings, such as motor speed and duration, across power cycles. This feature allows for a user-friendly experience, as the system can recall previous configurations without requiring reprogramming. The choice to use trimmers instead of potentiometers for sensitivity adjustments streamlines the design, as trimmers provide a more compact and stable solution for fine-tuning the gain of the microphone input.
The optical components, including the lens and parabola, are designed to focus light effectively, enhancing the visibility of the output beam. The placement of the barrier serves to optimize light transmission through the lens, ensuring that only the desired wavelengths are utilized in the final output. This meticulous attention to optical alignment is critical for applications that depend on precise light projection.
Overall, the integration of hardware and software in this project exemplifies a well-thought-out design that prioritizes functionality, reliability, and ease of use, making it suitable for various applications where motor control is synchronized with audio cues.The PIC can control the motor after every beat or its possible to bypass some beats. It can be done by pushbuttons. Rotation speed and rotation length can be adjusted too. Settings are limited between values to prevent possible register overflow-underflow. These values are saved in EEPROM so after shut-down the settings dont lost. A beat consist o f a series of vibrations (dont know the correct English word for that-sorry) so the PIC gets a few interrupts. To prevent multi-triggering theres a counter written into the code which disables reaction to beat for 200msecs after the first interrupt.
180msec delay is enough if you are using amplifiers output (or line out) as music source. I had to increase it to 200msec because i use microphone and the rooms echo influences operation. After you successfully built the whole hardware you need to adjust the trimmers very precisely. If you dont experiment a few times with adjusting them then its possible that the PIC will not recognise every beat because of the small amplification level. Or, it will do several things at only one beat. So you have to find the best adjustment. The original circuit which converts bass beat into pulses is from Dan Fraser (updated by Tomi Engdahl ).
I only replaced the line-out control with microphone and removed the 555 circuitry because of the software solution. The very-own in this project is the software for the PIC microcontroller. Because of the AGC circuit theres no need for potentionmeters for sensitivity adjust. I replaced them with trimmers. Now the microphone is on the control electronics because theres no need to place it outside the box and the possible noises from the surroundings are reduced.
You have to choose the distance between Lens-Lamp-Parabola to get sharp beams. Its all about optics. That little wall (hindrance) before the Lamp doesnt let the white light to passthrough the Lens.
The bootloader is compatible with all USB PIC devices, including PIC18F4550, PIC18F4455, PIC18F2550, PIC18F2455, PIC18F4553, PIC18F4458, PIC18F2553, and PIC18F2458. However, since the bootloader is designed for the Microchip demo board, its configuration may not be suitable for specific projects. For...
C1 is a charge pump capacitor. This works as a voltage doubler. When TxD is negative voltage, C1 is charged through D7 from GND. If TxD carries out turn-on, since it will become positive voltage, the voltage charged in C1...
GTP USB PIC Programmer (Open Source). This project includes the GTP USB (not plus or lite). The schematic, photos, and PCB have been developed by PICMASTERS.
The GTP USB PIC Programmer is an open-source device designed for programming PIC microcontrollers via...
An EEPROM is a type of non-volatile memory, which means it is used for permanently storing digital data without any power supply. EEPROM stands for Electrically Erasable Programmable Read-Only Memory. The advantage of this type of ROM is that it...
C code for a PIC frequency counter operating up to approximately 50 MHz. The project utilizes an HD47880 LCD for display purposes and employs Timer 1 to count the edges of the input signal.
This frequency counter project is designed to...
An isolation transformer and a variable auto transformer, very much like a Variac. Fuse 1 protects against gross overload. Lamp 1, across the Fuse 1, is a red incandescent pilot lamp and it lights up in the event of a...
Remotely check the temperature of various items, specifically the repeater site at GB3PY. This system utilizes a radio to receive requests for the current temperature and sends the results back to the user. Requests are made using DTMF tones, and...
A real analog synthesizer to build using easy to get components, capable of a wide range of sounds. The two oscillators can be detuned for that classic synth sound. Dual oscillator mono synth. Really easy to build using just 1...
The WWVB signal is broadcast as a 60 kHz carrier that is AM modulated with a time code frame that is updated once per minute. The data rate is one bit per second. Along with time code information, the data...
We use cookies to enhance your experience, analyze traffic, and (if you allow) serve personalized ads.
By clicking Accept All, you agree to our use of cookies.
Learn more