Simple PWM display
Posted: 16 Aug 2019, 13:43
This is so simple its hardly a project at all, it came about when I needed to measure two servo pulse sources simultaneously. I have an MT01 which is very handy but only displays one, so I needed another 'right now'
Its so quick & easy, that choosing a suitable font for the display took longer than assembling the PWM meter!
Above the MT01 is a much smaller PWM meter using only 3 parts, a £1 promini, a £2 128x32 OLED and a junkbox servo lead, total cost £3. It shows the pulse-width coming from whatever source its plugged into, or 'No pulse' if there is power but no pulses which is typical of 'failsafe' on cheap receivers like the Oranges.
The folded white thing between the boards is double-sided tape!
The display can be mounted above the promini, where the holes for A4/SDA and A5/SCL align, so
two short, stiff wires can be used as stand-off supports, or a 2-pins from a header strip. Of course there are differing promini layouts so use whatever is most convenient. Theres a bit of insulative double-sided tape between the two boards then the whole thing is wrapped in transparent heatshrink.
Usually we get away without them, but for the first time, and only on the promini, I had to add the 1k I2C pull-up resistors on SDA and SCL. The same sketch on an ebay 'Strong' didnt need them.
They are part of the I2C spec so really ought to be there, but we often dont bother. Its just a couple of the smallest 1k resistors you can find, both with one end to vcc (+5v) and the other ends to SDA and SCL (or A4 and A5, whichever is easier)
The symptom is the display occasionally locking up - the promini was still working, I can tell because even during a lock-up the promini's onboard D13 LED still correctly indicates 'pulses' or 'no pulses'. The pull-ups are a 100% fix.
Arduinos are great for making things on the fly as & when you need them - for example I recently needed to revisit the old Frsky SBUS frame-rate divider project, and I have no SBUS gear... but its so cheap & easy to emulate with a promini, problem solved
Finally just a reminder that the 5v input wont take a 5-cell NiMh voltage so if you use high voltage packs, feed the promini positive on Vin (sometimes called 'raw') rather than Vcc. In other words take the red of the servo lead to 'Vin' or 'Raw' rather than to 'Vcc'. The display is still powered from Vcc.
All my own gear is either a 5v BEC, a 4-cell Nimh or a single Lipo cell so it suits me as drawn above.
If you can find an Arduino "Mini" (not promini), all four display pins line up in the right order, A4 A5 + - are all in a row, so a 4-pin header could be used to join the two:
Cheers
Phil
Its so quick & easy, that choosing a suitable font for the display took longer than assembling the PWM meter!
Above the MT01 is a much smaller PWM meter using only 3 parts, a £1 promini, a £2 128x32 OLED and a junkbox servo lead, total cost £3. It shows the pulse-width coming from whatever source its plugged into, or 'No pulse' if there is power but no pulses which is typical of 'failsafe' on cheap receivers like the Oranges.
The folded white thing between the boards is double-sided tape!
The display can be mounted above the promini, where the holes for A4/SDA and A5/SCL align, so
two short, stiff wires can be used as stand-off supports, or a 2-pins from a header strip. Of course there are differing promini layouts so use whatever is most convenient. Theres a bit of insulative double-sided tape between the two boards then the whole thing is wrapped in transparent heatshrink.
Usually we get away without them, but for the first time, and only on the promini, I had to add the 1k I2C pull-up resistors on SDA and SCL. The same sketch on an ebay 'Strong' didnt need them.
They are part of the I2C spec so really ought to be there, but we often dont bother. Its just a couple of the smallest 1k resistors you can find, both with one end to vcc (+5v) and the other ends to SDA and SCL (or A4 and A5, whichever is easier)
The symptom is the display occasionally locking up - the promini was still working, I can tell because even during a lock-up the promini's onboard D13 LED still correctly indicates 'pulses' or 'no pulses'. The pull-ups are a 100% fix.
Arduinos are great for making things on the fly as & when you need them - for example I recently needed to revisit the old Frsky SBUS frame-rate divider project, and I have no SBUS gear... but its so cheap & easy to emulate with a promini, problem solved
Finally just a reminder that the 5v input wont take a 5-cell NiMh voltage so if you use high voltage packs, feed the promini positive on Vin (sometimes called 'raw') rather than Vcc. In other words take the red of the servo lead to 'Vin' or 'Raw' rather than to 'Vcc'. The display is still powered from Vcc.
All my own gear is either a 5v BEC, a 4-cell Nimh or a single Lipo cell so it suits me as drawn above.
If you can find an Arduino "Mini" (not promini), all four display pins line up in the right order, A4 A5 + - are all in a row, so a 4-pin header could be used to join the two:
Cheers
Phil