当前位置:文档之家› 基于Arduino制作的触摸变色台灯(附原理图、PCB板图、实物图、测试流程、源代码)

基于Arduino制作的触摸变色台灯(附原理图、PCB板图、实物图、测试流程、源代码)


with the necessary connecting hardware. The circuit will be using 3 RGB LEDs. These are common-anode Piranha type available here and contains three LEDs within its body. Each color will need a single dropping resistor (220-ohm for green and blue and 330-ohm for Red). We can also add a small LED with a 1k-ohm as an indicator. The IC we are using is an ATMega-328 microchip, available for about $5 here You will also need a 16Mhz resonator for about 35c, also available at the same site. The development and testing of the software is done using the Arduino system, so a suitable 'host' is necessary. I've used an Arduino 'Nano', a Boarduino and a RBBB board and they all work fine.
Image Notes 1. Modern Device's RBBB (with an ATMega328) acting as the host. Then the 328 is moved over to the circuit board when we're ready. 2. A "USB BUB board" to connect to the chip, and to provide power.
Arduino multi-mode lamp with soft touch switch
by qs on April 24, 2009
Table of Contents Arduino multi-mode lamp with soft touch switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Step 2: Getting started
It is a very good idea to put the microchip in a socket. Here, I've used 2 x 16-pin sockets end-to-end, because that is what I have available... The ATMel chip only has 28w empty sockets on the end. In this picture, the LEDs are along the bottom, with a resistor for each of the primary colors. The little pushbutton on the left is for the Reset, although this is not strictly needed. The yellow blob in the center is the resonator. After I've done the preliminary wiring, the circuit (and programming) is tested through jumpers connected to the 'host', an RBBB (Really Bare Bones Board ), also from Modern Devices. This lets me make sure the wiring is correct before we commit the Microchip. The process is quite straightforward - run / test with the host, then simply transplant the IC over to the circuit board.
Intro: Arduino multi-mode lamp with soft touch switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Step 1: What is needed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Step 2: Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Step 3: A quick test... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Step 4: The circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Step 5: The 'Sketch', or program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Step 6: The latest sketch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Intro: Arduino multi-mode lamp with soft touch switch
In this Arduino-based project, we will build a lamp with multiple light displays: color sequencer, dimming light, color chaser, firelight - all selected by a touch bar on the circuit board.
相关主题