A kind of M-Bus level shifting circuit
Technical field
The utility model relates to the realization circuit of a kind of meter bus M-Bus, it is a kind of circuit of realizing the conversion between other level and the M-Bus level, be mainly used in consuming the data transmission of measuring instrument sum counter, many-sided application arranged in building, industrial energy consumption, data acquisition.
Background technology
At traditional data transmission bus, as RS485, power carrier etc. are applied in sub-district long-distance meter-reading system or other data remote integrated system.Because the characteristics and the limitation of these buses itself have many dissatisfactory places in actual applications.Such as RS485 bus cable is had relatively high expectations, load capacity is lower, and is in practical engineering application, also higher to environmental requirement; In a word, actual performance often is difficult to reach the performance of theoretical parameter.And power carrier, because the instability of domestic electrical network, and technical difficulty is bigger, so practical application is also few.
Because the M-Bus bus need not distinguish polarity, and itself be exactly to transmit the data/address bus that information designs for consuming the measuring instrument sum counter specially, M-Bus can be according to randomly topologically structured cable wiring manufacture, and supports cascade.So at topological structure unknown in the centralized automatic meter-reading environment, M-Bus can show and be better than the tradition bus of checking meter and adapt to the ability of unknown topologies structure, and the arbitrary node fault that connects does not influence the operate as normal of system, system reliability is also strengthened greatly, and construction cost and difficulty descend greatly, so the M-Bus bus is very to be suitable for using in the centralized automatic meter-reading field.
Because M-Bus is a novel meter bus, domestic technique also is not very ripe at present, in the M-Bus of reality level conversion product, exist bus output impedance big, directly cause the bus transfer distance to shorten greatly, load capacity does not reach theoretical level far away, and bus level influenced by the load size very big.
The utility model content
The purpose of this utility model is, a kind of M-Bus level shifting circuit is provided.It can realize the conversion between other level and the M-Bus level, and can make bus output impedance less, overcomes the deficiencies in the prior art.
The technical solution of the utility model: a kind of M-Bus level shifting circuit, it is characterized in that, comprising:
Signal input circuit, signal to be converted is imported by signal input circuit, its major function is that level signal to be converted is converted to the output that suitable control signal removes to control controllable voltage source, controllable voltage source outputs to voltage on the M-Bus bus, thereby realize the conversion of input signal to the M-Bus level, current sampling circuit by signaling conversion circuit is sampled to the electric current of M-Bus bus, sampled signal is carried out shaping in signaling conversion circuit after, with the output of voltage signal form, the signal of signaling conversion circuit output converts this voltage signal to outside level signal by signal input circuit;
Controllable voltage source, control signal according to the signal input circuit input, the corresponding level that changes of output is to the M-Bus bus, control signal by signal input circuit output is to the control of controllable voltage source, controllable voltage source output corresponding M-Bus level signal, controllable voltage source can be to have integrated chip, the programmable voltage source of variable voltage output or the circuit with this type of function, it is characterized in that output voltage can directly or indirectly control by control end;
Signaling conversion circuit, by current sampling circuit the electric current of M-Bus bus is sampled, and to sampled signal amplify, shaping exports signal input circuit to, signaling conversion circuit comprises that current sample, voltage transitions, peak value detect, this several main parts of current signal change-over circuit.Mainly be to realize the current signal on the M-Bus bus is extracted, the function of conversion, amplification, shaping output, pass through current sampling circuit, and voltage transitions, just can become voltage signal to the bus current conversion of signals, and amplify output, again through peak value detection, current signal conversion, final output and current signal corresponding voltage signal;
Controlled constant-current source, provide the M-Bus bus needed drive current, and the control signal that provides according to conversion of signals changes the size of output current, road control signal by signaling conversion circuit output is controlled controlled constant-current source, thereby the needed bus driver electric current of output bus, controlled constant-current source can be some integrated chip with control end and constant current output characteristic, the also circuit that can be made up of discrete device is characterized in that output current can directly or indirectly control by control end.
In the aforesaid M-Bus level shifting circuit, it also comprises:
Protective circuit, be used for the M-Bus bus is carried out short-circuit protection, by the monitoring of electric voltage observation circuit to bus voltage, and be input to control signal generation circuit, control signal generation circuit compares signal and a threshold voltage that configures of voltage monitoring output, when bus is short-circuited, control signal generation circuit is just exported a control end that controls signal to controlled circuit breaker, disconnects bus and connects;
Overload indicating circuit is used for the M-Bus bus is carried out overload protection, surpasses rated output power in order to guarantee the M-Bus power output, and when bus current was excessive, overload indicating circuit can output signal be pointed out;
Power supply provides stable electric current and voltage to entire circuit.
Aforesaid M-Bus level shifting circuit is characterized in that, described signaling conversion circuit comprises:
Current sampling circuit is used to gather the current signal on the M-Bus bus; (can be sampling resistor or other equivalent electric circuits.)
Voltage conversion circuit is used for the current signal of current sampling circuit collection is converted into voltage signal; (can be the integrated operational amplifier chip)
Peak detection circuit is used for signal to voltage conversion circuit output and extracts and amplify, and carries out voltage and keep;
The current signal conversion, after being used for the sustaining voltage of peak detection circuit output and threshold voltage compared, the voltage signal with certain amplitude of final output M-Bus bus current signal correspondence, wherein threshold voltage is determined jointly by voltage conversion circuit output and M-Bus bus voltage.
In the aforesaid M-Bus level shifting circuit; described protective circuit comprises the controlled circuit breaker that is connected on the M-Bus bus; the control end of controlled circuit breaker links to each other with control signal generation circuit, and control signal generation circuit links to each other with electric voltage observation circuit on the M-Bus bus.
Compared with prior art, the utility model can be realized the conversion between other level and the M-Bus level, and can make bus output impedance less, thereby has increased the transmission range of M-Bus bus, and the load capacity of M-Bus bus strengthens, and the M-Bus bus level is influenced also by the load size to reduce.
Description of drawings
Fig. 1 is a structural representation of the present utility model;
Fig. 2 is the structural representation of the utility model embodiment signaling conversion circuit.
Being labeled as in the accompanying drawing: 1-power supply, 2-signal input circuit, 3-controllable voltage source, 4-signaling conversion circuit, the controlled constant-current source of 5-, 6-protective circuit, 7-overload indicating circuit
Embodiment
Below in conjunction with drawings and Examples the utility model is further described, but not as the foundation to the utility model restriction.
Embodiment.A kind of M-Bus level shifting circuit, as shown in Figure 1, comprise: signal input circuit 2, signal to be converted is by signal input circuit 2 inputs, level signal to be converted can be RS232C level signal or RS485 level signal, Transistor-Transistor Logic level signal etc., through signal input circuit 2, output Transistor-Transistor Logic level control signal is to the control end of controllable voltage source 3, remove to control certain amplitude level signal of controllable voltage source 3 output variations on the M-Bus bus, only be a certain situation of the utility model profit for example more than, the signal of input comprises but not only for top mention several;
Controllable voltage source 3, control signal according to signal input circuit 2 inputs, the corresponding level that changes of output is to the M-Bus bus, and controllable voltage source 3 can be the LDO linear stabilized power supply with direct or indirect control end, or the controlled output circuit of being made up of discrete device;
Signaling conversion circuit 4, by current sampling circuit the electric current of M-Bus bus is sampled, and to sampled signal amplify, shaping exports signal input circuit 2 to, use sampling resistor, integrated operational amplifier chip and peripheral component to form current-voltage conversion circuit, just can change bus current converting change in voltage output to.In addition, utilize the integrated operational amplifier chip, also can constitute the conversion of peak detection circuit and current signal, structure as shown in Figure 2;
Controlled constant-current source 5, provide the M-Bus bus needed drive current, and the control signal that provides according to conversion of signals 4 changes the size of output current, the constant-current source with controllable function that controlled constant-current source 5 can be made of discrete component such as triode and resistance is also or to be made of some integrated chip such as LDO linear stabilized power supply;
Protective circuit 6 is used for the M-Bus bus is carried out short-circuit protection, uses the relay of closed type, and control signal is come the control end of control relay by a triode.And control signal can use operational amplifier or level signal of comparator function output to the trigger chip, and trigger is just exported the control signal control relay and disconnected, and reaches protection bus purpose;
Overload indicating circuit 7 is used for the M-Bus bus is carried out overload protection, electric current is changed converting change in voltage to by sampling resistor, utilizes the threshold voltage of comparator chip and setting to compare.When electric current surpassed rated current, comparator output signal drove indicator light and lights;
Power supply 1 provides stable electric current and voltage to entire circuit.
Described signaling conversion circuit 4 comprises:
Current sampling circuit is used to gather the current signal on the M-Bus bus; (can be sampling resistor or other equivalent electric circuit)
Voltage conversion circuit is used for the current signal of current sampling circuit collection is converted into voltage signal; (can be the integrated operational amplifier chip);
Peak detection circuit is used for signal to voltage conversion circuit output and extracts and amplify, and carries out voltage and keep;
Current signal conversion after being used for the sustaining voltage of peak detection circuit output and threshold voltage compared, is finally exported the voltage signal with certain amplitude of M-Bus bus current signal correspondence, and those skilled in the art can be according to this.
Described protective circuit 6 comprises the controlled circuit breaker that is connected on the M-Bus bus, and the control end of controlled circuit breaker links to each other with control signal generation circuit, and control signal generation circuit links to each other with electric voltage observation circuit on the M-Bus bus.