Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
xiemeiping committed Nov 7, 2022
1 parent bc4f1bd commit 1a4d41e
Show file tree
Hide file tree
Showing 166 changed files with 3,693 additions and 0 deletions.
69 changes: 69 additions & 0 deletions docs/source/component_74hc595.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. _cpn_74hc595:

74HC595
===========

.. image:: img/74HC595.png

Do you ever find yourself wanting to control a lot of LEDs, or just need more I/O pins to control buttons, sensors, and servos all at once? Well, you can connect a few sensors to Arduino pins, but you will soon start to run out of pins on the Arduino.

The solution is to use "shift registers". Shift registers allow you to expand the number of I/O pins you can use from the Arduino (or any microcontroller). The 74HC595 shift register is one of the most famous.

The 74HC595 basically controls eight independent output pins and uses only three input pins. If you need more than eight additional I/O lines, you can easily cascade any number of shift registers and create a large number of I/O lines. All this is done by so-called shifting.


**Features**

* 8-Bit serial-in, parallel-out shift
* Wide operating voltage range of 2 V to 6 V
* High-current 3-state outputs can drive up to 15LSTTL loads
* Low power consumption, 80-µA max ICC
* Typical tPD = 14 ns
* ±6-mA output drive at 5 V
* Low input current of 1 µA max
* Shift register has direct clear

**Pins of 74HC595 and their functions:**

.. image:: img/74hc595_pin.png
:width: 600

* **Q0-Q7**: 8-bit parallel data output pins, able to control 8 LEDs or 8 pins of 7-segment display directly.
* **Q7’**: Series output pin, connected to DS of another 74HC595 to connect multiple 74HC595s in series
* **MR**: Reset pin, active at low level;
* **SHcp**: Time sequence input of shift register. On the rising edge, the data in shift register moves successively one bit, i.e. data in Q1 moves to Q2, and so forth. While on the falling edge, the data in shift register remain unchanged.
* **STcp**: Time sequence input of storage register. On the rising edge, data in the shift register moves into memory register.
* **CE**: Output enable pin, active at low level.
* **DS**: Serial data input pin
* **VCC**: Positive supply voltage.
* **GND**: Ground.

**Functional Diagram**

.. image:: img/74hc595_functional_diagram.png


**Working Principle**

When MR (pin10) is high level and OE (pin13) is low level,
data is input in the rising edge of SHcp and goes to the memory register through the rising edge of STcp.


* Shift Register

* Suppose, we want to input the binary data 1110 1110 into the shift register of the 74hc595.
* The data is input from bit 0 of the shift register.
* Whenever the shift register clock is a rising edge, the bits in the shift register are shifted one step. For example, bit 7 accepts the previous value in bit 6, bit 6 gets the value of bit 5, etc.


.. image:: img/74hc595_shift.png

* Storage Register

* When the storage register is in the rising edge state, the data of the shift register will be transferred to the storage register.
* The storage register is directly connected to the 8 output pins, Q0 ~ Q7 will be able to receive a byte of data.
* The so-called storage register means that the data can exist in this register and will not disappear with one output.
* The data will remain valid and unchanged as long as the 74HC595 is powered on continuously.
* When new data comes, the data in the storage register will be overwritten and updated.

.. image:: img/74hc595_storage.png
71 changes: 71 additions & 0 deletions docs/source/component_7_segment.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. _cpn_7_segment:

7-segment Display
======================

.. image:: img/7_segment.png
:width: 200
:align: center

A 7-segment display is an 8-shaped component which packages 7 LEDs. Each LED is called a segment - when energized, one segment forms part of a numeral to be displayed.

* Each of the LEDs in the display is given a positional segment with one of its connection pins led out from the rectangular plastic package.
* These LED pins are labeled from "a" through to "g" representing each individual LED.
* The other LED pins are connected together forming a common pin.
* So by forward biasing the appropriate pins of the LED segments in a particular order, some segments will brighten and others stay dim, thus showing the corresponding character on the display.

**Features**

* Size: 19 x 12.7 x 13.8mm(LxWxH, include the pin)
* Screen: 0.56''
* Color: red
* Common Cathode
* Forward Voltage: 1.8V
* 10 pins
* Pitch: standard 0.1" (2.54mm)

**Common Cathode (CC) or Common Anode (CA)**

There are two types of pin connection: Common Cathode (CC) and Common Anode (CA).
As the name suggests, a CC display has all the cathodes of the 7 LEDs connected when a CA display has all the anodes of the 7 segments connected.


* Common Cathode 7-Segment Display

.. image:: img/segment_cathode.png
:width: 500

* Common Anode 7-Segment Display

.. image:: img/segment_anode.png
:width: 500

**How to Know CC or CA?**

Usually there will be label on the side of the 7-segment display, xxxAx or xxxBx. Generally speaking xxxAx stands for common cathode and xxxBx stands for common anode.

.. image:: img/7_segment.png
:width: 250

.. image:: img/7_segment_bs.png

You can also use a multimeter to check the 7-segment display if there is no label. Set the multimeter to diode test mode and connect the black lead to the middle pin of the 7-segment display, and the red lead to any other pin except the middle one. The 7-segment display is common cathode if a segment lights up.

You swap the red and black meter heads if there is no segment lit. When a segment is lit, it indicates a common anode.


.. image:: img/7_segment_test.JPG
:width: 600


**Display Codes**

To help you get to know how 7-segment displays(Common Cathode) display Numbers, we have drawn the following table.
Numbers are the number 0-F displayed on the 7-segment display; (DP) GFEDCBA refers to the corresponding LED set to 0 or 1.

.. image:: img/segment_code.png

For example, 01011011 means that DP, F and C are set to 0, while others are set to 1. Therefore, the number 2 is displayed on the 7-segment display.

.. image:: img/7segment_2.png

33 changes: 33 additions & 0 deletions docs/source/component_avoidance_module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. _cpn_avoid:

Obstacle Avoidance Module
===========================================


.. image:: img/IR_Obstacle.png
:width: 400
:align: center

* **VCC**: Power supply, 3.3 ~ 5V DC.
* **GND**: Ground
* **OUT**: Signal pin, usually high level, and low level when an obstacle is detected.


The IR obstacle avoidance module has strong adaptability to environmental light, it has a pair of infrared transmitting and receiving tubes.

The transmitting tube emits infrared frequency, when the detection direction encounters an obstacle, the infrared radiation is received by the receiving tube,
after the comparator circuit processing, the indicator will light up and output low level signal.

The detection distance can be adjusted by potentiometer, the effective distance range 2-30cm.

.. image:: img/IR_module.png
:width: 600
:align: center








78 changes: 78 additions & 0 deletions docs/source/component_breadboard.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

.. _cpn_breadboard:

Breadboard
==============

**What is a "solderless" breadboard?**

.. image:: img/breadboard.png
:width: 600
:align: center

A breadboard is a rectangular plastic board with many small holes in it. These small holes allow you to easily insert electronic components to build circuits. Technically speaking, these breadboards are known as solderless breadboards because they do not require soldering to make connections.

**Features**

* Size: 163 x 54 x 8 mm
* 830 tie points breadboards: 630 tie-point ic-circuit area plus 2x100 tie-point distribution strips providing 4 power rails.
* Wire size: Suitable for 20-29 AWG wires.
* Material: ABS Plastic Panel, Tin Plated Phosphor Bronze Contact Sheet.
* Voltage / Current: 300V/3-5A.
* With Self-Adhesive Tape on the Back

**What is in the breadboard?**

.. image:: img/breadboard_internal.png
:width: 600
:align: center

The inside of the breadboard is made up of rows of small metal clips. When you insert the leads of a component into the holes of the breadboard, one of the clips catches it. Some breadboards are actually made of clear plastic, so you can see the clips inside.

**What do the letters and numbers on a breadboard mean?**

.. image:: img/breadboard_internal2.png
:width: 500
:align: center

Most breadboards have some numbers, letters and plus and minus signs on them. Although the labels will vary from breadboard to breadboard, the function is basically the same. These labels allow you to find the corresponding holes more quickly when building your circuit.

The row numbers and column letters help you to precisely locate the holes on the breadboard, for example, hole "C12" is where column C intersects row 12.


**What do the colored lines and plus and minus signs mean?**

.. image:: img/breadboard_internal3.png
:width: 500
:align: center

The sides of the breadboard are usually distinguished by red and blue (or other colors), as well as plus and minus signs, and are usually used to connect to the power supply, known as the power bus.

When building a circuit, it is common to connect the negative terminal to the blue (-) column and the positive terminal to the red (+) column.


**How are the holes connected?**

.. image:: img/breadboard_internal4.png
:width: 500
:align: center

As shown in the diagram, each set of five holes in the middle section, columns A-E or F-J, is electrically connected. This means, for example, that hole A1 is electrically connected to holes B1, C1, D1 and E1.

It is not connected to hole A2 because that hole is in a different row with a separate set of metal clips. It is also not connected to holes F1, G1, H1, I1 or J1 because they are located in the other "half" of the breadboard - the clips are not connected across the middle gap.

Unlike the middle section, which is grouped by five holes, the buses on sides are electrically connected separately. For example, the column marked blue (-) is electrically connected as a whole, and the column marked red (+) is also electrically connected.

**Which electronic parts are compatible with breadboards?**

.. image:: img/breadboard_pins.jpg
:width: 600
:align: center

Many electronic components have long metal legs called leads. Almost all components with leads will work with a breadboard. Components such as resistors, capacitors, switches, diodes, etc. can be inserted in any of the rows, but ICs need to be arranged across the middle gap.






25 changes: 25 additions & 0 deletions docs/source/component_button.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _cpn_button:

Button
==========

.. image:: img/button.png
:width: 400
:align: center

Buttons are a common component used to control electronic devices. They are usually used as switches to connect or break circuits. Although buttons come in a variety of sizes and shapes, the one used here is a 6mm mini-button as shown in the following pictures.
Pin 1 is connected to pin 2 and pin 3 to pin 4. So you just need to connect either of pin 1 and pin 2 to pin 3 or pin 4.

The following is the internal structure of a button. The symbol on the right below is usually used to represent a button in circuits.

.. image:: img/button_symbol.png
:width: 400
:align: center

Since the pin 1 is connected to pin 2, and pin 3 to pin 4, when the button is pressed, the 4 pins are connected, thus closing the circuit.

.. image:: img/button2.jpg
:width: 600
:align: center


74 changes: 74 additions & 0 deletions docs/source/component_buzzer.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. _cpn_buzzer:

Buzzer
=======

.. image:: img/buzzer1.png

A buzzer or beeper is an audio signaling device commonly used in computers, printers, copiers, alarms, electronic toys, automotive electronics, telephones, timers, and other electronics.

**Features**

* Oscillation Frequency: 2.3±0.3KHz
* Operating Voltage: 3 ~ 6VDC
* Rated Voltage: 5 VDC
* Current Consumption: MAX.25mA
* Sound Pressure Level: MIN. 85dB
* Tone Nature: Constant
* Operating Temperature: -20 ~ +45℃
* Storage Temperature: -25 ~ +60℃
* Dimension: Φ12.0 x H9.5mm
* Weight (MAX): 2.0 gram
* Housing Material: ABS( Black )


**Active Buzzer or Passive Buzzer**

Buzzers can be categorized as active and passive ones. Turn the buzzer so that its pins are facing up, and the buzzer with a green circuit board is a passive buzzer, while the one enclosed with a black tape is an active one.

.. image:: img/buzzer.png
:width: 600

The difference between an active buzzer and a passive buzzer:

* An active buzzer has a built-in oscillating source, so it will make sounds when electrified.
* But a passive buzzer does not have such source, so it will not beep if DC signals are used; instead, you need to use square waves whose frequency is between 2K and 5K to drive it.
* The active buzzer is often more expensive than the passive one because of multiple built-in oscillating circuits.

**How to Know Anode or Cathode?**

With a + in the surface represents the anode and the other is the cathode.

.. image:: img/buzzer_plus.png

You can also check the pins of the buzzer, the longer one is the anode and the shorter one is the cathode. Please don’t mix them up when connecting, otherwise the buzzer will not make sound.

.. image:: img/buzzer_pin.png

**Electrical Symbol**

.. image:: img/buzzer_symbol.png


**Demensions**

Unit: mm

.. image:: img/buzzer_size.png
:width: 700


**Active Buzzer Frequency Response Curve**

.. image:: img/buzzer_curve.png

**Passive Buzzer Frequency Response Curve**

.. image:: img/buzzer_curve_passive.png







0 comments on commit 1a4d41e

Please sign in to comment.