Mobile phone Bluetooth remote control high power dimming color LED lamp design

1 Introduction

With, on October 30, 2012, Philips sold the latest high-tech Hue series of LED lights on the AppleStore, and only sold it to Apple. The Hue series will be fully customizable and can be mixed with 16 million colors of light through a red, blue and green primary color LED in a light bulb. The whole process is completely controlled by the app on the iPhone. This has led to new thinking on the development of intelligent light control, and relevant domestic people have also conducted research. Considering that Hue adopts WiFi wireless control, and domestic WiFi is not popular, this study adopts more common Bluetooth technology, uses mobile phone Bluetooth and MCU communication to generate adjustable duty cycle PWM wave signal to control LED drive circuit to realize LED dimming and DIY coloring.

2. Pulse width (PWM) dimming technology

PWM dimming is a dimming technique that uses a simple digital pulse to repeatedly switch the LED driver. The application's system only needs to provide wide and narrow digital pulses to simply change the output current to adjust the brightness of the LED. The advantage of PWM dimming is that the dimming range is large. As long as the bandwidth is sufficient, any analog value can be encoded using PWM. PWM dimming can accurately control the brightness of the LED while ensuring the chromaticity of the LED illumination.

2.1 Pulse Wide (PWM) Dimming Principle

The human eye is visually inert, and the duty ratio is adjusted at a fixed frequency to achieve LED brightness adjustment. As long as the dimming ratio, that is, the PWM wave frequency is greater than 200 Hz, the human eye will not feel the flicker of the LED. The specific dimming is realized by controlling the brightness of the LED to control the brightness of the LED. From the viewpoint of electric power, it is to control the effective value of the current in a certain period. This method does not change the magnitude of the voltage and current while changing the magnitude of the current rms, thus ensuring the luminosity of the LED, which is not possible with analog dimming and thyristor dimming.

2.2 duty cycle

The duty cycle is the ratio of the time that a high level takes up within one cycle. The square wave has a duty cycle of 50% and a duty cycle of 0.5, indicating that the positive level takes 0.5 cycle.

Ts is the pulse period and Tw is the pulse width

Duty cycle Ï„ = Tw / Ts & TImes; 100.

The interpretation of the duty cycle can be summarized as follows:

1) In a series of ideal pulse sequences (such as a square wave), the ratio of the duration of the positive pulse to the total pulse period.

2) The ratio of the time taken by the pulse to the total time during a continuous working period.

3) In the periodic phenomenon, the ratio of the time of occurrence of the phenomenon to the total time.

That is, the ratio of the effective time of the circuit to release energy to the total release time.

2.3 dimming ratio

The dimming ratio is calculated as follows:

Foper=operating frequency, Fpwm=dimming frequency, dimming ratio=Foper/Fpwm

In fact, it is the minimum effective duty ratio of dimming, such as Foper=100khz; Fpwm=200Hz, the dimming ratio is: 100k/200=500.

3. Bluetooth module

3.1 Bluetooth technology foundation

The founder of Bluetooth is the Swedish company Ericsson. Bluetooth technology is an open global specification for wireless data and voice communications. It is based on low-cost short-range wireless connections and establishes a special connection between fixed and mobile device communication environments. Data sharing between mobile phones via Bluetooth has become common sense, turning mobile phones into remote controls brings infinite convenience to people's lives. [1]

Bluetooth technology consists of three parts, including Bluetooth radio technology, Bluetooth protocol stack and Bluetooth interoperability.

3.1.1 Bluetooth Radio Technology

Bluetooth radio works globally 2 . 4 GH zISM (industrial, scientific, medical) frequency band, supports full-duplex transmission, using IEEE802.15 protocol. Bluetooth device is ready to use, anti-interference ability, easy to use [2]

3.1.2 Bluetooth protocol stack

The Bluetooth stack contains a software stack and a hardware stack. The Bluetooth hardware protocol stack is provided by Bluetooth hardware, and the Bluetooth software protocol stack is implemented by software. The Bluetooth software stack provides the Java Bluetooth API for use by program openers.

3.1.3 Bluetooth Interoperability

Bluetooth interoperability includes three aspects: 1 universal access profile defines device management functionality; 2 service discovery application profiles define service discovery content; 3 serial profiles define interoperability devices and analog serial cable capabilities 3.2 HC- O6 Bluetooth module

BC04 external 8M Flash, with EDR module HC-06 for civilian grade, compatible with HC-04 industrial grade. Among them, the TX pin of the HC-06 module is connected to the P3.0 pin of the STC15F204EA microcontroller, and the RX pin is connected to P3.1. The HC-06 module receives the data sent from the mobile phone, and then communicates with the MCU through the serial port TR and TX pins.

Bluetooth 2.0 with EDR, 2Mbps-3Mbps modulation, built-in 2.4GHz antenna, external 8Mbit FLASH, low voltage 3.3V operation (3.1V~4.2V) 30~40MA fluctuation when pairing, pairing completed communication 8MA, optional PIO control standard HCI port (UART or USB), digital 2.4GHz wireless transmit, CSR BC04 Bluetooth chip technology, adaptive frequency hopping technology, Bluetooth Class 2 power level, operating temperature -25 to +75, co-wave interference 2.4MHz, launch The power is 3dBm and the effective control distance is 10m.

4. Mobile APP design

4.1 Bluetooth connection related program design

First, initialize the local Bluetooth device and establish the LocalDevice class, including obtaining the local device instance, Bluetooth name, setting the discovery mode, and obtaining the discovery agent. Create a public int BTS_Init() function to implement Bluetooth initialization judgment, find the default Bluetooth device, and turn on Bluetooth.

Start the Bluetooth device search, create a public voidBTS_StartScan() class function, start looking for the slave Bluetooth device, register the search function, and create a public int BTS_ConnectToDevice(String DeviceAddress) class function to connect to a specified Bluetooth device.

Create a public int BTS_SendDates (Stringbuffer) class function to send the string to the connected Bluetooth device, create a public int BTS_Finish () class function to end the Bluetooth communication, and finally create a BroadcastReceiver privatefinal BroadcastReceiver mReceiver = newBroadcastReceiver () to receive the ACTION_FOUND broadcast.

4.2 Control signal related program design

First create a class publicclass PwmcontrolAcTIvity extends AcTIvity{} for the control signal, which contains the class function public voidonCreate(BundlesavedIn stan ceState){} that creates the interface, and sends the control signal class function public void onStop TrackingTouch(SeekBar seekBar){}.

Create class class InitThread extends Thread{}, implement resource loading thread, create public InitThread(PwmcontrolActivity act){} function for conversion between four signals, realize public void run() thread body interface with Bluetooth program, The class function public booleanonKeyDown(int keyCo de, KeyEvent event) used for software exit.

5. Single chip control signal design

5.1 hardware circuit design

System block diagram shown in Figure 1, the hardware circuit uses STC15F204EA microcontroller as the main controller, CH-06 Bluetooth module TXD and MCU 11 pin P3.0 connection, RXD and P3.1 connected to achieve Bluetooth serial communication connection, from P1.0, P1.1, P1.2, P1.3 four ports output four-way adjustable duty cycle PWM signal, using an L298 chip to isolate the MCU control signal and LED power supply drive, avoiding the load capacity of the MCU Weak shortcomings to achieve high power LEDs.

Hardware circuit design system block diagram

white Color paraffin wax Fluted Candle  also called velas, bougies, house hold candles, the candles surface with lines. Very beatiful .usually packed by color polybag. as client design, we also can design for client.

and 6pcs in polybag ,and 25bag/.ctn the weight 30-75g per piece to africa countries.

different market need different candles size ,we can supply best price as popular size 

the shipment in the 30days after get the depsoit .





Fluted Candle

Fluted Candle,Large Fluted Candle,White Decor Fluted Candle,Bright Fluted Candles

Shijiazhuang Zhongya Candle Co,. Ltd. , https://www.zycandlefactory.com