Дата на обновяване:07.09.2012

   ПЧЕЛАР / ЕЛЕКТРОНЧИК - пробвай-сам.bg

     Страница за пчеларство, пчеларски и ел.  разработки, представени като статии

Комютърът на пчелина | Нестандартни кошери | Пчеларски сайтове | Пчеларски инвентар | Размисли и идеи за пчеларството Физиотерапия, Апитерапия, Фитотерапия | Книги, Списания, РС, Интернет |  Пчеларски технологии |  Видове мед  | Пчеларски хумор

Сезонни и месечни задължения на пчеларя | Пчеларски статии на руски език | Малки Oбяви свързани с пчеларството

Информация, която е полезна за начинаещия пчелар | Използване на автомобила ... не само за предвижване - видеоклипове

 

 

 
Информация  от  ОБЛАСТЕН  ПЧЕЛАРСКИ  СЪЮЗ  - ПЛЕВЕН

 

 

Полезна и забавна информация за начинаещи с ел., радио и електронен характер, част от която с приложение и в пчеларството

- Електронни схеми, радиосхеми и устройства удобни за повторение от начинаещи;

- Снимки на фигурки изработени от електрически, разноцветни кабели. Други ел. снимки;

- Детски любителски набори - радиоконструктори за сглобяване на радиоприемници наричани играчки;

- Детекторни радиоприемници, техни модели;

- Сувенирни радиоприемници - играчки, някои от тях предназначени за ученици;

- Модулни набори - радиоконструктори от типа "Електронни кубчета" или "Мозайка" с които се работи без поялник и се захранват с батерии;

Информация за електрически и електронни компоненти и устройства, някои от които приложими и в пчеларството

- Токозахранващи устройства. Стабилизатори, преобразуватели, удвоители на напрежение;

- Импулсни стабилизатори на напрежение. Инвертори на напрежение;

- Устройства за дозареждане и компенсиране на саморазряда на акумулаторни батерии;

- Релета за време. Процедурни часовници. Схеми с ИСх 555;

- Цветомузикални устройства. Светлинни ефекти;

- Схеми за регулиране и поддържане на температура;

- Измерване на топлинния режим на радиоелектронна апаратура. Електронни термометри;

- Мрежови трансформатори. Опростени методики за изчисляването им. Електрожен;

- Зарядни устройства за Ni-Cd акумулатори;

- Устройства за имитиране гласовете на животни и птици. Мелодични звънци;

- Уреди, пробници, индикатори, генератори, тестери, измервателни приставки за любителската лаборатория;

- Металотърсачи, включително такива за откриване на метални предмети и кабели;

- Схеми на устройства, приложими за и около автомобила;

- Схеми на устройства с приложение на оптрони;

- Измерване на относителна влажност. Прецизен влагорегулатор. Поддържане на влажността на въздуха;

- Регулатори и сигнализатори за ниво на течност;

- Регулатори на мощност и на обороти;

- Опростено изчисляване на повърхността на радиатори за полупроводникови елементи;

- Схеми за управление на стъпков двигател, включително четирифазен. Енкодер/Валкодер, някои от които реализирани със стъпков двигател;

- Мощни, широколентови, операционни усилватели. Логаритмичен и антилогаритмичен усилвател;

- Електронни реле - регулатори. Реле - регулатор за лек автомобил. Стенд за проверка на реле - регулатори;

- Променливотоков регулатор. Стабилизатор за променлив ток. Ферорезонансен стабилизатор;

- Електронни схеми и устройства приложими в медицината;

- Няколко светодиодни индикатора. Икономичен светодиод. Светодиодна стрелка;

Практически приложими ел. устройства с учебна цел, реализирани с PIC16F84A, PIC16F88, PIC16F628 ... Arduino и др.

Подобряване със свои ръце възпроизвеждането на звука в дома, офиса, автомобила - subwoofer и други варианти

Радиоелектронни сайтове | Електронни библиотеки

 

 Разработки     Главна (съдържание на статиите)                         
Собствено Търсене

 

 



 

Светодиодный куб 5х5х5 на Arduino Управление LED осуществляется при помощи контроллера Arduino. (5x5x5 LED куб със светодиоди. Управлението на LED куба се  осъществява с помощта на контролера Arduino.)

 

В этой статье описана сборка светодиодного куба 5 х 5 х 5, который управляется при помощи Arduino и вся конструкция располагается на печатной плате.


Видео работы светодиодного куба:

 


Разработка куба и материалы
Я видел много проектов светодиодных кубов, и основной их проблемой является управление большим количеством светодиодов при помощи маленького количества контактов. Во многих проектах для этой цели использовались сдвиговые регистры. Основной их проблемой является время, требуемое на сдвиг всех битов и проблемы возникающие из-за него. Мне это не понравилось, и я решил нарисовать свою схему.
Я использую 5 дешифраторов по 3-8 линии на каждый (также они известны как демультиплексоры), чтобы преобразовывать двоичный сигнал с 5-битного параллельного входа в 25-битный параллельный выход, который управляет светодиодами. Особенностью этих дешифраторов является то, что высокий уровень сигнала может быть одновременно только на одной из 25 линий. Если на пяти контактах Arduino 01010 (10 в двоичной системе), дешифраторы принимают этот сигнал и выводят его на свой 10 контакт. Всего их 25 с номерами 0-24.
В схеме также используются NPN транзисторы, на катодах каждой плоскости куба.
Куб собран на специальной печатной плате изготовленной на заводе, что позволило избежать большего количества проводов. Всего проект обошелся в $100.
Предварительно удостоверьтесь, что ваши дешифраторы дают высокий уровень сигнала на один из выводов, а на все остальные низкий, т.к. есть микросхемы, которые дают низкий уровень сигнала на один вывод, а высокий на все остальные.
Посмотреть предварительные наброски схемы и таблицу


Сборка куба


Первый шаг - это изготовления куба из светодиодов. Я купил дешевые светодиоды с очень короткими выводами, и мне пришлось использовать дополнительный провод.


Я просверлил в доске отверстия 5мм с расстоянием между ним 2.5 см. Светодиоды вставляются в эти отверстия и соединяются вместе. Таким образом делается 5 слоев.


Когда все 5 слоев готовы, их надо соединить. Расстояние между слоями должно быть 2.5 см, чтобы куб не был сплющенным или растянутым. От катода каждого слоя приведите вниз куба по проводу, который затем будет впаян в плату. Всего такой куб насчитывает около 300 точек пайки.


Макет схемы
Для подключения куба я использовал кабель CAT5, т.к. он дешев и доступен. Я собрал схему на макетной плате. Выберите угол куба который будет считаться точкой начала отчета и подключите к его аноду вывод 0 дешифратора. Следующим анодом считается ближайший анод по оси X, а когда они закончатся, используйте аноды по оси Y. Я использовал резисторы по 150 Ом между дешифратором и столбцом.


Для подключения катодов используется NPN транзистор. Используйте резистор между базой транзистора и Arduino. Подключаете 1вывод транзистора к GND, 2 к Arduino, 3 к катоду.


Программа для Arduino
После того, как куб подключен к прототипу схемы, необходимо напивать программу.
Код разбит на 4 основных части:
LEDs.h:
Содержит номера всех контактов и массивов.
DisplayBasics.pde:
Содержит несколько основных «формы» в кубе, для использования в модели.
Patterns.pde:
Содержит образцы программ отображения, которые можно увидеть на видео в начале статьи.
LEDCubePCB.pde:
Это окончательный вариант моего кода. Номер исполняемой программы изменяется в зависимости от положения потенциометра.

 
Расширение функциональности
Для того, чтобы светодиодный куб был ещё лучше, необходимо изменять программу отображения, неперепрошивая микроконтроллер. Для переключения программ я решил использовать перемычки, а для изменения длительности программы потенциометр. Но я забыл, что при использовании перемычек необходимо подтягивающее напряжение. Его можно получить путем использования подтягивающих резисторов.


Печатная плата
Я разработал эту схему и печатную плату в Eagle. К статье прилагаются исходники в формате Eagle, которые можно редактировать. При проектировании печатной платы обратите внимание на размер отверстий, особое внимание уделите проводам.
Плата была изготовлена на заводе на заказ. Если вы не можете изготовить плату на заводе, вы можете сделать её при помощи ЛУТа или фоторезиста.


Производство и сборка печатной платы
Чтобы отправить проект на производство, необходимы файл сверловки и Gerber файлы. Я не умею их делать, но следуя инструкциям в интернете смог сделать и их. Эти файлы прилагаются к статье. Обратите внимание, что перемычки теперь подключены к GND и работают за счёт внутренних подтягивающих резисторов Arduino.


Начните сборку с резисторов и панелек, а сам куб паяйте в последнюю очередь. Все компоненты использованы в обычном выводном корпусе, поэтому монтаж достаточно пост. Паяйте плату чистым жалом, соблюдайте температурный режим и не перегревайте компоненты. Я использовал разъемы для всех микросхем.
Готово!
После сборки платы загрузите программу в Arduino и проверите её. Если схема работает неправильно, перепроверите правильность подключения и сборки куба.


Скачать файлы Eagle, Gerber и исходники ПО


Оригинал статьи на английском языке (перевод: Александр Касьянов для сайта cxem.net)


LED Cube with Arduino and custom PCB
This instructable details the design and building process for a 5 x 5 x 5 LED cube, controlled with an Arduino, which resides on a custom printed circuit board.

Additional information, photos, and videos can be found on my website.

The finished product is shown in the video below:

Step 1Design concept and materials
I have seen many designs for LED Cubes, and they all share the same problem: How to control so many LEDs with so few pins. Many designers choose to utilize shift registers, which uses a serial load with parallel output. I was not to fond of this idea, primarily because of the time needed to shift all bits and the possible resulting trailing effect, so I started from my own drawing board, see attached.

My design uses 5 x 3-8 line decoders (also known as DEMUX) to convert a 5-bit parallel binary output to a one-hot 25-bit parallel output, which drives the columns of LEDs. "One-Hot" means that only one of the 25 output pins will be "hot" at any given moment. If the five output pins of the arduino are: 01010, this is the number 10 in binary. The decoders take interpret this signal and in turn power on output pin number 10 of the 25 columns (numbered 0-24). See the attached design for illustration.

As many other LED cubes do, my design also uses NPN transistors to switch the cathodes of each plane of the cube.

My design also includes a custom designed Printed Circuit Board, to eliminate the many unsightly wires that would otherwise be needed.

Materials:

Part No. Description Vendor Quantity Each Total
74HC238 3-8 Decoder eBay 5 $0.70 $3.50
LED 5mm Diffused Blue LED eBay 125 $0.09 $11.25
RES 150 Ohm Resistor 30 $0.05 $1.50
2N4401 NPN Transistor RadioShack 5 $0.20 $1.00
POT 10k Ohm Trim-Pot RadioShack 1 $1.49 $1.49
Arduino Arduino SparkFun 1 $30.00 $30.00
PCB PCB + Shipping AdvancedCircuits 1 $51.42 $51.42

Grand Total: $100.16

Second Thoughts: Be sure to get one-HOT decoders, many will have every output high, but the one selected output LOW. This is the opposite of what we want here. Be CERTAIN to check the truth table in the data sheet of whatever chip you purchase.

Step 2Cube Construction

The first step is to construct the cube of LEDs. My LEDs were very cheap and the leads were incredibly short. This is why I used additional wire, which worked out very nicely.

Firstly, make yourself a wooden jig to hold the LEDs when you solder. I spaced mine 1" apart. Solder all the CATHODES (-) together in the plane.

Once you have all 5 planes done, its time to go up! Use a 1" spacer between the planes as you solder. Be sure you run enough wire vertically for all 5 planes, and then some extra.

Done? Congratulations! You just made about 300 solder joints!

Second Thoughts: Upon completion, it appears that the Cube leans, and thats because it does. When attaching the planes to the vertical wires, I attached to the same side of the LED lead each time. To avoid this, alternate which side of the lead you attach to the vertical wire.


Step 3Prototype Circuit

Once you have the cube constructed, solder test leads to each anode and cathode set. I used cat5 cable, purely because it is cheap and available. If you don't have any spare wire, go to your local telephone system installation company and ask to buy their scrap, you can probably get it for less than 30 cents a foot.

Assemble the circuit (as described in the pdf) on a bread board. Choose a corner of the cube to be the origin, and connect that anode to output 0 from the decoders. The next anode will be in the alleged X direction, and then you go to the next row down (output number 5) you will have moved in the alleged Y direction. Don't forget resistors! I used 150 Ohm resistors in series with each column (between the decoder and the column)

To wire up the cathodes, use the NPN transistors and switches to ground. You need to use a resistor between the base pin and the output from the arduino. If you have never used transistors before, they are fairly straightforward: for an NPN type, the two outer leads are like the two terminals of a simple switch. The center lead is the signal that, when HIGH, completes the circuit. Thus connect pin 1 to ground, pin 2 to arduino ouput, and pin 3 to the cathode plane of the cube.


Step 4Programming with Arduino
Once the Cube is wired up to your prototype circuit, write some test code!

One clever function I developed to efficiently realize the output to the decoders is documented below, and also found in the code attached. This is where some bitwise black magic obviously occurs.

/**
* Displays the anode column with the given number value; [0, 24].
*/
void displayNum(int num){
//constrain the argument to be between 0 and 24 inclusive.
num = constrain(num, 0, 24);

/*
* AND: selects the bit, the bit at weight will be 1 if the pin is to be high
* >>: shifts the selected bit to the end of the word, making the value a 0 or 1
* first result is lsb
* digitalWrite: write the approptiate result (HIGH or LOW)
* to the appropriate decoder pin
*/
for(int weight=1, pin=0; pin < DECODER_BITS; weight*=2, pin++)
digitalWrite(decoderPins[pin] ,(num & weight) >> pin);

//delay, this is the absoloute minimum time the light will be displayed.
//ensures adequate delay for decoders as well.
delayMicroseconds(MICRO);
}


The rest of the code I used is attached here as well. This is broken into 4 main pieces.

LEDs.h:
Contains all pins definitions, and arrays containing pins for swift iterations.
DisplayBasics.pde:
Contains a few basic "shapes" in the cube, for use in patterns.
Patterns.pde:
Contains patterns which the cube can display. Each is documented in the code, and can be seen in the video in the intro step of this instructable.
LEDCubePCB.pde:
This is the final version of my code, and its setup() and loop() functions. you will notice that I choose which pattern to display at reset based on the position of the potentiometer (discussed next step). I would encourage a better way to change patterns, also discussed in the next step.

Step 5Add-ons


To make the LED Cube more functional as a standalone piece of decor, settings need to be adjustable on the fly, and not by re uploading code each time you want to change the pattern.

One add-on I used was a potentiometer, whose analog reading was directly related to the delay time of the animation, as seen in the video.

Second Thoughts:

Another intent I had was to use jumpers to select which pattern to display--this can be seen on the PCB design. however, I never tested this concept, and forgot that a pin reading is unstable without a reference voltage. If you try this, you will probably need a pull up resistor configuration. Whatever you do, don't do what is shown on the PCB design, and do test it.

Also, as cheap as they are, potentiometers are versatile, and a second one could easily be used as a pattern selector.
Step 6PCB Design



I designed this circuit and PCB in Eagle, which is free PCB design software, available at www.cadsoftusa.com . I have attached the eagle files for your reference or reuse, but as stated previously, some re-working my be desired.

If you are new to PCB design, it is easy and fun! One good tutorial can be found at the instructable titled "Turn your EAGLE schematic into a PCB" .

Second Thoughts:
One thing to watch out for when designing a PCB is the size of the drill holes. Most parts in the library are good, but be sure to check wire connections, like those of the anode columns.

Also, if you like the project, but not the cost of the professionally fabricated PCB, you could also easily create this on a perfboard , or even use a toner transfer do make your own PCB while still using Eagle .

EDIT: The attached eagle files have been fixed for the jumper issue, they now jump to GND instead of VCC


Step 7PCB Manufacture and assembly

To send a design out for manufacture, you will first need to create a drill file and gerber files. This area is not my specialty, but the instructable "Professional PCBs almost cheaper than making them at home" nails it, follow the instructions to a T and you will have no problems.

EDIT: Due to a few requests, I have attached the gerber files needed by the manufacturer to this page. Please notice that the issue with the jumpers has been fixed in this version. (they now jump to GND, which will work by using the arduino internal pull-up resistors.

Finding a manufacturer:
I got my PCB fabricated at Advanced Circuits , and here's why:
1. US Based: Don't get me wrong, I order TONS of components Hong Kong direct, the postman is used to seeing Chinese stamped padded envelopes in my box, but matters here is that when I am antsy for my board to arrive, I DON't have to wait three weeks for shipping!

2. $33 each. yup, just $33 per board for standard spec orders. Whats the catch? Minimum order of 3, see below.

3. STUDENT DISCOUNT! Advanced Circuits will let you order only one of their $33 each special for students!

4. Free DFM check, basically it makes sure your drill and gerber files are correct before you give them any money.

5. Free surprise with each order, its popin good ;)

Assembly:
Begin soldering components with the lowest profile, meaning height. Start with resistors, then the IC sockets, ... , and finish with the cube itself last.

I used all through hole components, so assembly is pretty straightforward. If you've never soldered on a PCB before, here are the keys:

1. Use a good, clean iron. Clean your tip with tip tinner and a wet sponge.
2. Heat the PART*.
3. Apply solder to the BASE OF THE HOLE.
4. Allow solder to seep into hole before removing heat. (about a half second)

*Be cautious not to overheat components containing semiconductors, as they are easily damaged by heat. I used sockets for all DIP chips (decoders)
To make the LED Cube more functional as a standalone piece of decor, settings need to be adjustable on the fly, and not by re uploading code each time you want to change the pattern.

One add-on I used was a potentiometer, whose analog reading was directly related to the delay time of the animation, as seen in the video.

Second Thoughts:

Another intent I had was to use jumpers to select which pattern to display--this can be seen on the PCB design. however, I never tested this concept, and forgot that a pin reading is unstable without a reference voltage. If you try this, you will probably need a pull up resistor configuration. Whatever you do, don't do what is shown on the PCB design, and do test it.

Also, as cheap as they are, potentiometers are versatile, and a second one could easily be used as a pattern selector.
Step 6PCB Design
I designed this circuit and PCB in Eagle, which is free PCB design software, available at www.cadsoftusa.com . I have attached the eagle files for your reference or reuse, but as stated previously, some re-working my be desired.

If you are new to PCB design, it is easy and fun! One good tutorial can be found at the instructable titled "Turn your EAGLE schematic into a PCB" .

Second Thoughts:
One thing to watch out for when designing a PCB is the size of the drill holes. Most parts in the library are good, but be sure to check wire connections, like those of the anode columns.

Also, if you like the project, but not the cost of the professionally fabricated PCB, you could also easily create this on a perfboard , or even use a toner transfer do make your own PCB while still using Eagle .

EDIT: The attached eagle files have been fixed for the jumper issue, they now jump to GND instead of VCC


Step 7PCB Manufacture and assembly
To send a design out for manufacture, you will first need to create a drill file and gerber files. This area is not my specialty, but the instructable "Professional PCBs almost cheaper than making them at home" nails it, follow the instructions to a T and you will have no problems.

EDIT: Due to a few requests, I have attached the gerber files needed by the manufacturer to this page. Please notice that the issue with the jumpers has been fixed in this version. (they now jump to GND, which will work by using the arduino internal pull-up resistors.

Finding a manufacturer:
I got my PCB fabricated at Advanced Circuits , and here's why:
1. US Based: Don't get me wrong, I order TONS of components Hong Kong direct, the postman is used to seeing Chinese stamped padded envelopes in my box, but matters here is that when I am antsy for my board to arrive, I DON't have to wait three weeks for shipping!

2. $33 each. yup, just $33 per board for standard spec orders. Whats the catch? Minimum order of 3, see below.

3. STUDENT DISCOUNT! Advanced Circuits will let you order only one of their $33 each special for students!

4. Free DFM check, basically it makes sure your drill and gerber files are correct before you give them any money.

5. Free surprise with each order, its popin good ;)

Assembly:
Begin soldering components with the lowest profile, meaning height. Start with resistors, then the IC sockets, ... , and finish with the cube itself last.

I used all through hole components, so assembly is pretty straightforward. If you've never soldered on a PCB before, here are the keys:

1. Use a good, clean iron. Clean your tip with tip tinner and a wet sponge.
2. Heat the PART*.
3. Apply solder to the BASE OF THE HOLE.
4. Allow solder to seep into hole before removing heat. (about a half second)

*Be cautious not to overheat components containing semiconductors, as they are easily damaged by heat. I used sockets for all DIP chips (decoders)


Step 8Done!
Once your custom board is assembled, test it out! Upload the code and snap on your arduino.

For more pictures, descriptive videos, and more projects, check out my website at:
https://sites.google.com/site/andrewmontag/personal-projects/led-cube

Comments? Questions? Post-em!

Second Thoughts:
If the lights don't act as you anticipate, first check that your decoder pins are placed properly, as indicated in the PDF of step 1. Swapping bits will mess it up big time.


http://www.instructables.com/id/LED-Cube-with-Arduino-and-custom-PCB/?ALLSTEPS

cxem.net

Материалите подготви за сайта:

Иван Парашкевов

e-mail: ivanparst@dir.bg

 

         главна страница                   горе

 

 
 
СТАТИСТИКА
    

Copyright2007  Design by