A new Yoctopuce module is available: the Yocto-PWM-Tx. As its name suggests it, this module can transmit a PWM signal. This type of signal is often used when driving industrial equipments, motors, air-conditioners, or even lighting. Let's have a closer look at how it works.
A PWM (Pulse Width Modulation) signal is a simple square signal characterized by:
- its frequency (or its period): the Yocto-PWM-Tx can generate signals from 1Hz to 1MHz;
- its duty-cycle (between 0% and 100%), corresponding to the pulse length over the period.
Usually, for a given application, the frequency remains constant and information is transmitted by varying the duty-cycle.
The Yocto-PWM-Tx is a single-width 20x57mm module. It provides two distinct channels.You can naturally modify the frequency and the duty-cycle of each channel. But you can also ask the Yocto-PWM-Tx to modify the duty-cycle progressively. Ideal to start or stop a motor progressively.
The brand new Yocto-PWM-Tx
The Yocto-PWM-Tx proposes four distinct power supply modes:
- Emission of a 3V signal, powered from the USB bus
- Emission of a 5V signal, powered from the USB bus
- Emission of a signal between 4.5 and 18V, powered externally
- Open drain: in this case, the device to be controlled provides a specific voltage (max 25V) on the wire and the Yocto-PWM-Tx forces this wire to go down to 0V periodically
Note that the power supply mode is shared between the two channels: you cannot have one output at 3V and the other output at 5V, for example.
If you perform, without taking precautions, a direct electrical connection between two appliances connected to the mains and powered through different phases, you risk to destroy your equipment. There can be a potential difference up to 380V between the two appliances. The Yocto-PWM-Tx manages this issue for you: whatever the selected power supply mode, the USB part of the Yocto-PWM-Tx is galvanically insulated from the PWM part connected to the other appliance.
There is a device that you probably know and which is controlled by PWM: computer fans. It so happens that the way these fans work is quite standard. They are connected with 4 wires. Two wires are used to supply power, 12V usually, the third wire is used to control the fan speed by PWM, and the fourth wire provides the actual fan speed in the shape of pulses. To measure this speed, you'll have to wait for the Yocto-PWM-Rx, but the Yocto-PWM-Tx is perfectly suited to control it :-)
|3||Green||Actual speed (2 pulses/revolution, open drain)|
|4||Blue||Speed control (PWM, open drain, 25KHz)|
The fan speed controller expects an open drain, 25KHz PWM signal: the fan provides the voltage and the Yocto-PWM-Tx generates the signal, forcing the wire to go down to zero at the correct rhythm. So you only need to configure the Yocto-PWM-Tx correctly and to connect it to the fan ground and to its blue wire.
You can control the speed of a computer fan with a Yocto-PWM-Tx
The standard specifies quite clearly that it's not possible to shut off the fan with the PWM: the duty-cycle is supposed to stay above 20%. To turn the fan off, you must shut its power supply off, which you can easily do with a Yocto-Relay.
If you add a Yocto-Relay, you can control powering on and off
We noticed that some fans don't seem to follow the specs: they don't work very well in open drain mode, their pull-up might be a bit to weak. However this can be fixed by configuring the Yocto-PWM-Tx in 3V mode rather than open drain.
Finally, here is a short video showing a computer fan with its speed controlled by a Yocto-PWM-Tx.