Variations on Ron's Tx Meter and Phil_G's PPM tester.

Any old or new electronic projects on the go
Post Reply
User avatar
Adrian_H
Posts: 12
Joined: 07 Nov 2022, 11:25

Variations on Ron's Tx Meter and Phil_G's PPM tester.

Post by Adrian_H »

Whilst doing the conversions on my 'gifted' Skyleader and Simprop sets I came across several useful projects here that I thought I'd have a go at.

I am a complete novice with Arduino; I last did any programming >35years ago with F77 and Plot10 with a forest of documentation from the likes of DEC, MSC/Nastran, SunOS, IBM. So with a little knowledge being dangerous and the vast resource of The Internet, I duly ordered the parts. The projects have been around a while, many have been built - what could be difficult?

So armed with IDE 2 - an IDE? there's a novelty; I thought a colour screen on 9600baud was a luxury coming from punched cards at Uni! - and a USBasp I set to.

First up was 2.4GHz Spectrum analyser - worked like a dream.

Next was a Tx meter. I only gave a passing thought as to why there might be a gold sticker on the USB port of the '328p nano compatible' board I was connecting up. Loaded the library needed, loaded the sketch - Error. Umm...as the IBM manuals say 'probable user error, correct problem and re-run job' - must be me. Try Martins PPM tester - Error. Must be me. This set off a train of events which were probably unnecessary but resulted in updates for the Tx meter and the PPM/PWM tester.

Probably you've been there, but for amusement, posterity (so I don't forget), any other novices who stumble here and in case its useful...
The root cause was the boards supplied actually had 328pb chips - nothing was identifiable to the naked eye, but under the right light with a big magnifying glass some faint markings on the chip were just discernible.
I got it working by using the Minicore core, installing a serial driver for the unmarked serial chip, only using USB 2 ports (limitation of the serial chips apparently), using verbose mode on the IDE and later using LTO with the compiler.

Retry Martins PPM tester - success.

Retry Ron's Tx meter - even more errors, this time from the graphics library. "Probable user error, correct problem and re-run job". Check documentation - U8glib no longer maintained but superceded by U8g2lib. Read documentation; some functions depreciated, all now start U8g2 and fonts completely different - as are display definitions. Set about the few changes needed and find the IDE is showing that everything is aliased! - so I needed have bothered, but let's not leave the job incomplete. Used their example Hello World to find the correct display definition, couple of other changes and it works! Well...initially I had to put in a hack workaround, but later started using LTO and found I could take the workaround out.

So after a bit of toil and some coding that'll probably make some cringe, I have implemented a third screen for the trace in the case of channels >6.
Tx Meter 3 screens
Tx Meter 3 screens
It'll still show the trace on second screen for the case of channels<=6
Tx Meter screen 2 with trace
Tx Meter screen 2 with trace
TxMeterS2.jpeg (42.11 KiB) Viewed 3570 times
In case its useful, I have put the sketch here and the circuit with notes here.

Next up was Phil's PPM/PWM Tester using an I2C display as suggested by Ron. In all honesty, had I followed Phil's original circuit I would have left alone.
Not much of a change is needed to implement the I2C version, except I couldn't make use of the vendor suggested library and it appears its another 'no longer maintained'. So I find h44780 and with a few changes it all works. Except, well...it would be nice to be able to see and output all 8 channels I had. I could have swapped the channels around in the Tx I suppose but... So after a bit of thought and some code adjustments its now multi screen and servo-outputs are in blocks of 4.
PPM/PWM tester multi-screen
PPM/PWM tester multi-screen
In case its useful, I have put the sketch here and the related circuit and notes here.

My thanks to the original authors for making the projects available - and my apologies to them for messing up code that was probably perfectly useable.
Post Reply