3-PIN 7SEG DISPLAY
Many times we have used 7-segment displays in our projects but we have had difficulty working with arduino uno because we would have many pins to use, so I have designed this project to work only with 3 pins and be able to control up to 3 or 4 7-segment display modules.
Supplies
SCHEMATIC DIAGRAM
As with any project, we will first see the schematic diagram to be able to analyze it and understand its operation.
FUNCTIONING
This 7-segment display module can be used with any microcontroller or Arduino whose input is 5V - DIN - GND and its output is 5V - DOUT - GND
DIN is the serial data input that our Arduino will send to control these displays with only 1 pin we can control more than 4 display modules and this module in turn allows to expand more display in serial mode by connecting the DOUT with the DIN.
For this project we have used the W2811 chip that controls the intelligent RGB strips but now instead of controlling the RGB we will control the segments
My design has 7 segments, that is, from A to G and the point.
You can see the video of operation here:
WS2811
WS2811 - Driver for RGB LEDs.
3-channel LED driver, its internal includes intelligent digital port data input circuit and signal reconfiguration amplification circuit.
Technical characteristics:
• Power supply voltage: 6V - 7V.
• Operating temperature: -40C° +85C°.
• Output voltage: 12V.
• Built-in 24V voltage regulator tube, just add a resistor to IC VDD pin when voltage is below 24V.
• The gray levels of each pixel of 256 levels, and the refresh rate reaches to 2KHz / s.
• Send data at speeds of 800 Kbps.
ARDUINO TEST CODE COUNT OF ( 0-9 )
#include <Adafruit_NeoPixel.h> // importa libreria
// Primer parametro = cantidad de pixeles en la tira
// Segundo parametro = pin de conexion a Arduino
// Tercer parametro:
// NEO_KHZ800 800 KHz velocidad de datos (WS2812 y nuevos)
// NEO_KHZ400 400 KHz velocidad de datos (WS2811 y mas antiguos)
// NEO_GRB flujo de datos en orden GRB (WS2812 y nuevos)
// NEO_RGB flujo de datos en orden RGB (versiones mas antiguas)
Adafruit_NeoPixel tira = Adafruit_NeoPixel(3, 2, NEO_RGB + NEO_KHZ800); // creacion de objeto "tira"
// con una cantidad de 8 pixeles, sobre pin 2 de Arduino y configurado para WS2812
void setup(){
tira.begin(); // inicializacion de la tira
tira.show(); // muestra datos en pixel
}
void loop(){
tira.setBrightness(17); // brillo global para toda la tira
//for(int i = 0; i < 3; i++){ // bucle para recorrer posiciones 0 a 7
// cada pixel en color azul (posicion,R,G,B)
tira.setPixelColor(0, 255, 255, 255);
tira.setPixelColor(1, 255, 255, 255);
tira.setPixelColor(2, 0, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 0, 255, 255);
tira.setPixelColor(1, 0, 0, 0);
tira.setPixelColor(2, 0, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 255, 0);
tira.setPixelColor(1, 255, 255, 0);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 255, 255);
tira.setPixelColor(1, 255, 0, 0);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 0, 255, 255);
tira.setPixelColor(1, 0, 0, 255);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 0, 255);
tira.setPixelColor(1, 255, 0, 255);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 0, 0, 255);
tira.setPixelColor(1, 255, 255, 255);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 255, 255);
tira.setPixelColor(1, 0, 0, 0);
tira.setPixelColor(2, 0, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 255, 255);
tira.setPixelColor(1, 255, 255, 255);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 255, 255, 255);
tira.setPixelColor(1, 0, 0, 255);
tira.setPixelColor(2, 255, 0, 0);
tira.show(); // muestra datos en pixel
delay(1000);
tira.setPixelColor(0, 0, 0, 0);
tira.setPixelColor(1, 0, 0, 0);
tira.setPixelColor(2, 0, 255, 0);
tira.show(); // muestra datos en pixel
delay(1000);
// breve demora de medio segundo
//}
//tira.clear(); // restablece todos los pixeles en apagado
}
ELECTRONIC COMPONENTS
3 WS2811
3 CAP 1206 100NF
3 RESISTOR 1206 100R
1 RESISTOR 1206 220R
7 RESISTOR 0805 2K
7 RESISTOR 0805 10R
7 MMBT3906 PNP
35 LEDS 5MM BLUE
1 SPINDLE 90°
1 PCB
FEATURES
CONTROL WITH ARDUINO AND PIC
SERIAL DATA SENDS
EXPANDABLE MODULES
VIN 5V
I MAX 140mA per module
pcbs connectable to each other
EasyEda
Here we will see the creation of the PCB and design and we will be able to see how it will look in 3D
JLCPCB
Once the pcb is designed, we will send our friends from JLCPCB to manufacture our PCB.
5pcbs only $2
JLCPCB number 1 PCB manufacturing company worldwide professional pcbs and excellent finish.
GERBER PCB:
https://mega.nz/file/WFgDUTCL#LLngIZF73Lf2cGm9vP-BvET51hIcJsxVjtlC5bAV13I