Breadboard assembly digital selection machine using circuit diagram

Single chip microcomputer STM32L151CCU6
1206 side full color side light

Overview:

First, the circuit principle

1. The circuit schematic circuit is shown below. This work can randomly select a number from 0 to 90; it is characterized in that during a selection process, the digital sequence displayed by the digital tube gradually becomes slower until it stops and the result is obtained.

2. The circuit principle circuit is mainly composed of a voltage controlled oscillator and a digital display, supplemented by a button operation circuit and a sound prompt circuit.
ICl is a phase-locked loop integrated circuit. 4O46, only its voltage controlled oscillator function is used in this circuit. When the operation button ANL is pressed, the input voltage of the 9th pin of the 4O46 will gradually change from high to low; this voltage controls the internal oscillator of the 4O46 to output a clock pulse signal whose frequency gradually becomes slower and finally stops oscillating. This pulse signal is input to the 4O33 counter/decoder, and the digital tube is driven to display the output result. When the frequency of the clock pulse signal is high, the digital tube quickly displays the 10 digital sequence of “O” to “9”; as the frequency of the clock signal gradually decreases and finally reaches zero, the last digit displayed by the digital tube will stop at 0~9. In one of the numbers, a result of the selection is generated. Since the frequency of the clock signal is a few hundred hertz at the beginning, the operator cannot control the result of the last number generated by the button, and the obtained number can be considered to be random.

3. When the button operation circuit is used, the button switch AN is pressed, and the power supply voltage is applied to the 9 pin of the 4O46 through the resistor R4, and the voltage rises rapidly; the voltage controlled oscillator operates. After releasing AN, due to the action of the integral circuit composed of R3 and C2 on the foot, the voltage on pin 9 gradually decreases until the voltage is zero; at this time, the pulse frequency outputted by the voltage controlled oscillator gradually decreases until it reaches zero. The selection process of this circuit is about 3 seconds; the values ​​of the integration circuits R3 and C2 can be changed to obtain different speeds of change. The function of the resistor R4 is to prevent damage to the switch by the charging current of the capacitor C2 each time the push button switch is pressed.

4. The sound cue circuit and the power supply voltage stabilizing circuit output the pulse from the 4-pin, in addition to the output to the 4O33, and also output to the input terminal of the phase comparator I of the 3-pin. One end of a piezoelectric ceramic piece YD is connected to the output end of the phase comparator I of the 2-pin, and the other end is grounded to monitor the working state of the voltage controlled oscillator.

Second, the assembly machine can be assembled on one-half of the breadboard. As shown below.
The push button switch AN should be 1Omm in length and can be directly inserted into the bread hole; the piezoelectric ceramic sounding sheet is also packaged and can be directly inserted into the breadboard; as shown in the following figure.



Third, the selection random verification experiment Theoretically, the number generated by the circuit is random. But this conclusion needs to be tested by experiment.
It is recommended to verify that the circuit has achieved the design expectations through experiments with at least 5OO operations. The test method is to first make an experimental record table, as shown in the following table.


A total of 1OOOO selection experiments were performed, and the number of occurrences of each of the numbers 0 to 9 was recorded in Table 1; the results were recorded in "positive" characters. After the experiment is completed, count the total number of occurrences of each number; then calculate the percentage of each number as a total.
Finally, the experimental results are evaluated. A normal use of the numbering machine requires 1 O numbers to be selected with the same probability. In the total of 1OOOO experiments, if the most selected number and the selected minimum number differ from the average of 1OO by no more than 50%, the work can be considered successful. If one of the numbers is selected a number that is significantly lower or much higher than the average of 1OO, the work is unsuccessful.

Fourth, the production center problem
1. The digital selection mechanism that began with the initial idea of ​​the digital selection machine is relatively simple, and its circuit is shown in the figure below.



In the process of high-speed counting, 4O33 theoretically turns to display O~9 ten digits, but it looks like a number: 8. The work lacks authenticity and interest and is unsatisfactory.
Thus, using the 4O69 voltage-controlled oscillator, a circuit that achieves a slower effect on the display number appears, as shown in the following figure.




After the circuit is completed and successfully run, random verification is performed. Found the number "1"
The number of occurrences is significantly less than other numbers.
In the total number of experiments of 100 times, only 19 times occurred.
The reason is: 7-segment digital tube is different for 1O digital lighting tube segments, and the total current of power supply is also changing at any time; because the power supply has internal resistance, the operating voltage of the circuit fluctuates with the generation of different numbers. The number 1 shows that the current is small, the power supply voltage is high, and the probability of stopping vibration is small.
The electrolytic capacitors in parallel with the power supply of 47OOμF are still present, and the unfairness of the selection result still exists.

2. A solution through the timing circuit In order to solve the above problem, a timer circuit is used to solve the generation time of the selection result; for example, a 2 second timer composed of 4O6O can be added, so that each selection process is fixed within 2 seconds. The results. The random number verification experiment proves that the circuit design is feasible.

3. The multi-digit number selection machine can be designed and fabricated to drive multiple single-digit displays with multiple clock pulses, or to drive a multi-digit display with one clock pulse.

SC/APC Fiber Optic Fast Connector

Sc/Apc Fiber Optic Fast Connector,Fiber Optic Adaptor Fast Connector,Fiber Quick Connect Kit,Sc Fiber Optic Fast Connector

Ningbo Fengwei Communication Technology Co., Ltd , https://www.fengweicommunication.com