基于Arduino制作的触摸变色台灯(附原理图、PCB板图、实物图、测试流程、源代码)
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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
Image Notes 1. Sensor wires - detects when they are touched.
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.
Step 3: A quick test...
If you're really impatient, you can actually run the program with just the IC, and the resonator! Just add a 5v source and Presto! There is light!
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.
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
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.
Step 2: GBiblioteka Baidutting 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 28pins so we'll have a few 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.
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.
All the functions are done in software, including the touch sensor, which is a unique feature.
Step 1: What is needed?
We will be going the minimalist way for this project, filling the board with just a microchip, the LEDs, a handful of resistors and some capacitors, all for under $10, along
Image Notes 1. Sensor wires - detects when they are touched.
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.
Step 3: A quick test...
If you're really impatient, you can actually run the program with just the IC, and the resonator! Just add a 5v source and Presto! There is light!
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.
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
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.
Step 2: GBiblioteka Baidutting 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 28pins so we'll have a few 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.
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.
All the functions are done in software, including the touch sensor, which is a unique feature.
Step 1: What is needed?
We will be going the minimalist way for this project, filling the board with just a microchip, the LEDs, a handful of resistors and some capacitors, all for under $10, along