Disclosure of Invention
The utility model discloses a remedy prior art not enough, provide a simple structure, convenient to use's infant's intelligent building blocks programming remote controller.
The utility model discloses a realize through following technical scheme:
the utility model discloses an infant's intelligence building blocks programming remote controller, its characterized in that: the device comprises a controller, and an external crystal oscillator circuit, a reset key circuit, a chip mode selection switch circuit, a program debugging port circuit, a power supply filter circuit, a JDY-40 wireless module circuit, a programming module contact circuit and a start key circuit which are respectively connected with the controller.
The controller is further connected with a Type-C interface circuit, and the Type-C interface circuit is connected with the charging protection circuit and the voltage stabilizing circuit.
The lithium battery protection circuit is provided, one end of the lithium battery protection circuit is connected with the battery wiring terminal, and the other end of the lithium battery protection circuit is connected with the controller.
The controller adopts STM32F103RET6 singlechip.
The STM32F103RET6 singlechip is provided with a No. 1 pin VBAT as a power input pin, and No. 5 and No. 6 pins as chip external crystal oscillator pins and is connected with an external crystal oscillator circuit; the number 8, 9, 10 and 11 pins PC0-PC3 are programming module signal transmission ports and are connected with a programming module contact circuit; pin number 12 is grounded; the No. 13 pin is connected with VDDA of the power supply filter circuit; no. 14 pin PA0, No. 15 pin PA1, No. 16 pin PA2 and No. 17 pin PA3 are signal transmission ports of the programming module and are connected with a contact circuit of the programming module; pin No. 18 is grounded, and pin No. 19 is connected with 3.3V voltage; pins 20, 21, 22, 23, 24, 25, 26 and 27 are programming module signal transmission ports and are connected with a programming module contact circuit; the No. 28 pin is a boot1 pin and is connected with a chip mode selection switch circuit for switching chip modes; the No. 31 pin is connected with GND, and the No. 32 pin is connected with 3.3V voltage; pin 33 is connected to the SET pin of the JDY-40 module circuit and is used for setting the JDY-40 module mode; pin 34 is connected with the CS pin of the JDY-40 module circuit and is used for setting the chip selection function of the JDY-40 module; no. 41 PA8 pin is a starting key pin, is connected with a starting key circuit, and starts logic operation at low level; no. 42 and No. 43 pins are serial port communication ports and are used for debugging programs; no. 44 pin and No. 45 pin are USB data transmission lines and are connected to the Type-C interface circuit; 46 is STM32 chip program debugging port, and is connected with the program debugging port circuit; pin No. 47 is connected with GND, and pin No. 48 is connected with 3.3V voltage; pins 49, 50, 55 and 56 are STM32 chip program debugging ports and are connected with a program debugging port circuit; the No. 60 pin is BOOT0 and is connected with a chip mode selection switch circuit for switching chip modes; pin 63 is connected to GND, and pin 64 is connected to 3.3V voltage.
The beneficial effects of the utility model are that, this infant's intelligent building blocks programming remote controller can realize remote combination programming module logic, and remote control intelligence building blocks programming controller carries out corresponding action, and programming module logic running state instructs functions such as, makes things convenient for the infant to observe. The understanding of the children on the sequence logic and conditions is enhanced, and the interest and the playability are increased. The controller can control whether to start executing the combined programming module or not by starting the key. The programming module in the remote controller and the infant intelligent building block program the communication mode of the remote controller.
The scheme has 8 programming module position spaces, the logic combined by 8 programming modules can be supported at most, and the arranged programming modules can sequentially run. Different programming modules are identified through the analog quantity value of the IO port, the receiving and sending states of signals and the transmission of sensor values are controlled through the analog quantity value, and the logic operation state of the current programming module can be indicated.
Detailed Description
The attached drawing is a concrete embodiment of the utility model.
The utility model discloses an infant's intelligent building blocks programming remote controller, including the controller to and the outside crystal oscillator circuit of being connected respectively with the controller, reset button circuit, chip mode selection switch circuit, program debugging mouth circuit, power filter circuit, JDY-40 wireless module circuit, programming module contact circuit, start button circuit.
The controller is further connected with a Type-C interface circuit, and the Type-C interface circuit is connected with the charging protection circuit and the voltage stabilizing circuit.
The lithium battery protection circuit is provided, one end of the lithium battery protection circuit is connected with the battery wiring terminal, and the other end of the lithium battery protection circuit is connected with the controller.
The controller adopts STM32F103RET6 singlechip.
U1 is STM32F103RET6 singlechip, pin VBAT No. 1 is power input pin, and pins 5 and 6 are chip external crystal oscillator pins and are connected with external crystal oscillator circuit; the number 8, 9, 10 and 11 pins PC0-PC3 are programming module signal transmission ports and are connected with a programming module contact circuit; pin number 12 is grounded; the No. 13 pin is connected with VDDA of the power supply filter circuit; no. 14 pin PA0, No. 15 pin PA1, No. 16 pin PA2 and No. 17 pin PA3 are signal transmission ports of the programming module and are connected with a contact circuit of the programming module; pin No. 18 is grounded, and pin No. 19 is connected with 3.3V voltage; pins 20, 21, 22, 23, 24, 25, 26 and 27 are programming module signal transmission ports and are connected with a programming module contact circuit; the No. 28 pin is a boot1 pin and is connected with a chip mode selection switch circuit for switching chip modes; the No. 31 pin is connected with GND, and the No. 32 pin is connected with 3.3V voltage; pin 33 is connected to the SET pin of the JDY-40 module circuit and is used for setting the JDY-40 module mode; pin 34 is connected with the CS pin of the JDY-40 module circuit and is used for setting the chip selection function of the JDY-40 module; no. 41 PA8 pin is a starting key pin, is connected with a starting key circuit, and starts logic operation at low level; no. 42 and No. 43 pins are serial port communication ports and are used for debugging programs; no. 44 pin and No. 45 pin are USB data transmission lines and are connected to the Type-C interface circuit; 46 is STM32 chip program debugging port, and is connected with the program debugging port circuit; pin No. 47 is connected with GND, and pin No. 48 is connected with 3.3V voltage; pins 49, 50, 55 and 56 are STM32 chip program debugging ports and are connected with a program debugging port circuit; the No. 60 pin is BOOT0 and is connected with a chip mode selection switch circuit for switching chip modes; pin 63 is connected to GND, and pin 64 is connected to 3.3V voltage.
STM32 external crystal oscillator circuit: the partial circuit provides an external crystal oscillator signal for the SYM32 controller, and comprises an 8M crystal oscillator Y1, two 22pF filter capacitors C1 and C2 are connected to two ends of a crystal oscillator Y1, and a 1M resistor R1 is arranged at two ends of the crystal oscillator, so that the circuit is more stable.
Reset button circuit: the key S1 is connected in parallel with the capacitor C3, and then connected in series with the resistor R2, the resistor R2 is connected with the controller, the resistor R2 is a pull-up resistor of 10K, when the key S1 is disconnected, the RESET end is at a high level, and when S1 is pressed, the RESET end is at a low level, so that the chip is RESET.
Chip mode selection switch: the selection switch S2 is connected to the BOOT0 and BOOT1 of the controller via the resistor R5 and the resistor R6, respectively, and the selection switch S2 is a 2P toggle switch, and when the BOOT1= x BOOT0=0, the operation mode is normal, and the BOOT1=1 BOOT0=1 is started from the built-in SRAM, and this mode can be used for debugging.
Program debugging port circuit: the part is used for debugging STM chip programs, each line (except J TCK) is provided with a pull-up resistor of 10K, and the pull-up resistor is connected with a power supply; j TCK is connected with a pull-down resistor R11 of 10K, and the pull-down resistor is grounded.
The charging protection circuit: the partial circuit uses a TP4056A linear lithium battery and a constant current/constant voltage linear charger, and has the functions of protecting the positive and negative electrodes of the battery in a reverse connection mode and protecting the positive and negative electrodes of an input power supply in a reverse connection mode. LIGHT1 and LIGHT2 in the circuit are two LED LIGHTs controlled by pins No. 7 and No. 6 of TP 4056. LIGHT1 is on and LIGHT2 is off during charging; LIGHT1 goes out and LIGHT2 LIGHTs when charging is completed. The VBUS end is a 5V power supply input and comes from a Type-C interface. Pins 1 and 3 are grounded, and pin 2 is grounded through a 1.2K resistor R15. Pin No. 5 is connected with the anode of the battery. Pin 8 is connected to 5V input.
Lithium battery protection circuit: the integrated circuit comprises a DW01 chip and an 8205A chip which are connected with each other, wherein pins 1 and 3 of DW01 are respectively connected with pins 5 and 4 of 8205A, pins 5 and 6 of DW01 are connected with a battery connecting terminal, pin 5 of DW01 is also connected with a power supply through a diode D1, and pin 6 and pin 7 of 8205A are also connected with the battery connecting terminal. (1) The lithium battery normally works: when the lithium battery is between 2.5V to 4.3V, both pin 1 and pin 3 of DW01 output high level, and 2 pin voltage is 0V according to 8205A schematic diagram, pin 1 and pin 3 of DW01 are connected with pin 5 and pin 4 of 8205A respectively, and it can be known that both MOS tubes are in a conducting state, and at the moment, the negative electrode of the lithium battery is communicated with a singlechip circuit power ground P _ and the lithium battery supplies power normally (2) overcharge protection control: when the voltage of the lithium battery is increased to 4.4V, DW01 considers that the voltage of the lithium battery is in an overcharged state, immediately controls 3 pins to output 0V, and 8205A chip G1 has no voltage to cause the MOS tube to be cut off, namely the lithium battery B _ is not communicated with the P _ of the power supply of the singlechip circuit, namely the charging loop of the lithium battery is cut off, and the charging is stopped, although the overcharge control switch tube is closed, the direction of the diode inside the overcharge control switch tube is the same as that of the discharging loop, so that the discharge can be carried out after the external discharging load between P + and P _ is connected, when the voltage of the lithium battery is discharged to be lower than 4.3V, the DW01 is stopped from the overcharged protection state, and at the moment, the lithium battery B _ is communicated with the P _ of the power supply of the singlechip circuit, and normal charging and discharging are carried out again (3) under the overdischarge protection control: when the voltage is reduced to 2.3V, DW01 considers that the voltage of the lithium battery is in an over-discharge voltage state, 1 pin is immediately controlled to output 0V, 8205A chip G2 has no voltage to cause the MOS tube to be cut off, at the moment, the B _ of the lithium battery is not communicated with the P _ of the power supply of the singlechip circuit, namely, a discharging loop of the lithium battery is cut off, discharging is stopped, when the TP4056 circuit is connected for charging, DW01 detects the charging voltage through the B _ and then controls the 1 pin to output a high level, at the moment, the B _ of the lithium battery is communicated with the P _ of the power supply of the singlechip circuit, and normal charging and discharging are carried out again.
3.3V voltage stabilizing circuit: the part uses REG1117-3.3V chip, VBUS power supply is connected to VIN end of REG chip after passing through fuse, VOUT is 3.3V output, and the power is supplied to system through filter capacitors C10 and C11. And the power indicator LIGHT LIGHT3 is connected with the VOUT pin and is bright when the power supply is normal.
Type-C interface circuit: and leading out USB D & USB D + in the Type-C interface to the STM32 main control chip, and leading out the VBUS 5V power supply from the Type-C interface.
JDY-40 Modular Circuit: the JDY-40 module is a 2.4G wireless communication module and can realize the function of serial transparent transmission. RXD2, TX D2, SET, CS of STM32 are connected to RX D2, TX D2, SET, CS of JDY-40 module. The module is powered by VCC and GND, and is connected with a C20104 filter capacitor in parallel.
Starting a key circuit: after the logic combination is completed, the infant intelligent building block programming remote controller needs to manually press a start key, and the controller can start to detect each programming module in sequence until the last execution is completed and then stops the execution. The start key interface T12 is connected with the No. 41 PA8 pin of the STM32 controller, the PA8 is pulled high through a pull-up resistor R23 of 4.7K, and when a key is pressed, the PA8 interface is programmed low to send out a start signal.
Programming the module contact circuit: the infant intelligent building block programming remote controller reserves 8 programming module positions, most supports logic formed by combining 8 programming modules, and each position of the 8 positions is formed by 4 contacts. The device is composed of 4 bits such as a positive electrode, a negative electrode, a module identification type identification bit, a module numerical value transmission bit and the like, wherein the two latter bits are communicated by the transmission of an analog value. The module identification type identification bits and the module value transmission bits in the 8 positions use 16 ADC sampling pins of the STM32F103RET6, the analog values of the contacts on the programming module can be directly read, and corresponding actions, such as corresponding command sending operations of the wireless module and the like, can be executed by using program control according to the read values, so that the programming is convenient. The communication mode gets rid of the constraint of various communication protocols and overcomes the defect that a certain fixed position programming module cannot be executed in sequence by using the IIC, the serial port and other communication protocols. The contact ID1 is composed of a PA0 of an STM32 chip as a module value transfer bit, a PA4 as a module identification type identification bit, and 3.3V power supply and GND. The contact ID2 is composed of a PA1 of an STM32 chip as a module value transfer bit, a PA5 as a module identification type identification bit, and 3.3V power supply and GND. The contact ID3 is composed of a module value transfer bit of PA2 of an STM32 chip, a module identification type identification bit of PC0, 3.3V power supply and GND. The contact ID4 is composed of a module value transfer bit of PA3 of an STM32 chip, a module identification type identification bit of PC1, 3.3V power supply and GND. The contact ID6 is composed of a module value transfer bit of PA6 of an STM32 chip, a module identification type identification bit of PC2, 3.3V power supply and GND. The contact ID7 is composed of a module value transfer bit of PA7 of an STM32 chip, a module identification type identification bit of PC3, 3.3V power supply and GND. The contact ID8 is composed of a PB0 of an STM32 chip as a module value transmission bit, a PC4 as a module identification type identification bit and the addition of 3.3V power supply and GND. The contact ID9 is composed of a PB1 of an STM32 chip as a module value transmission bit, a PC5 as a module identification type identification bit and the addition of 3.3V power supply and GND.
The communication mode of the programming module in the remote controller and the remote controller is as follows: the signal transmission uses a method of reading a logic level and sending out and detecting a PWM pulse. The programming module which can directly generate logic level is simple and can directly use the logic level to communicate, and if the programming module needs to transmit various state information and cannot sufficiently express the logic level, PWM signals with different duty ratios are sent to communicate.
The infant intelligent building block programming remote controller can also be connected with an infant intelligent building block programming master controller through Bluetooth.