Repost: Reedy Ten - a modern 'reeds' set with display, etc by Ceptimus

Arduino projects on the go
Post Reply
Martin
Posts: 744
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Repost: Reedy Ten - a modern 'reeds' set with display, etc by Ceptimus

Post by Martin »

Reposted from April 2017 on behalf of Martin (Ceptimus):

It's Arduino based. Sketch is in the attached zip. There are more details on how to wire one up in the IO.txt file included in the zip.
filefb2c.gif
Altered labels of Pin 0 (now 'RX0') and Pin 1 (now 'TX 1')
fileb62a.jpg
Click on images for a bigger view.


Revision history (newest first):
V1.0.6 2017-05-09 Has option of wiring a timer stop/start/reset button on A7. Edit config.h to enable.
V1.0.5 2017-05-04 Full screen support for DS160120 display. Added provisional support for DS12864 display. Option to change to 'Negative' display (black 'ink' on OLEDs) - edit config.h to alter.
V1.0.4 2017-04-30 Has option of wiring a throttle kill switch on A6. Switch instantly sets throttle to low position bypassing normal servo-slow function. See config.h for details. Improved support for DS160120 display unit.
V1.0.3 2017-04-29 Supports positioning and hiding of control indicators on main page to match non-standard ten-channel layouts - for example Ron's Reedy Six. Edit the config.h file to make changes. Provisional beta support added for DS160120LCD-51 2-inch display unit.
V1.0.2 2017-04-27 PPM output is now on D12 with buzzer moved to D13. Recommendation to add 4k7 pull up resistors to I2C interface (A4 and A5).
V1.0.1 2017-04-25 Progressive virtual elevator trim servo (dedicated reed toggle 'elevator trim') now auto-centres when selecting a different model.
V1.0.0 2017-04-18 Initial release.

Martin.
ATTACHMENTS
ReedyTen.zip
V1.0.6 Schematic in .zip altered to be the same as the one in this post.
(261.78 KiB) Downloaded 31 times
ReedyTenScad.zip
OpenScad files for the case. These are what you modify if you want to make case alterations - then output as STL files for printing. OpenScad is a free 3D CAD program. Recommended.
(2.95 KiB) Downloaded 17 times
ReedyTenCase_STL_files.zip
Oops! Ron told me that I'd only put the back in the zip. Should be fixed now.
(56.97 KiB) Downloaded 20 times
Last edited by ceptimus on Mon May 15, 2017 9:08 pm, edited 25 times in total.
ceptimus



Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby ceptimus » Tue Apr 18, 2017 12:46 am


Here's a shopping list of parts (all from Ebay) if you fancy building one. All prices correct as of 22nd April 2017 and include delivery. The total here is £24 or less but doesn't include case, battery and RF module. Depending on what bits you already have lying around, you should be able to make one for fifty quid or less.

Pro mini expand: http://www.ebay.co.uk/itm/Pro-Mini-5V-1 ... 2002245825 £4.99
...or (cheaper and smaller but perhaps more tricky to wire up): http://www.ebay.co.uk/itm/New-Pro-Mini- ... 1695440186 £1.16
...or if you don't already own a USBASP or FTDI, a Nano is probably the best option: http://www.ebay.co.uk/itm/Nano-V3-0-Min ... 1953151389 £2.89 with USB cable
Guitar switches: http://www.ebay.co.uk/itm/3-Way-Guitar- ... 1141271958? £1.66 each - five required so £8.30 - you have to take them apart and modify them for reed use - there are some threads explaining how to do it on this forum.
OLED display: http://www.ebay.co.uk/itm/0-96-1-3-I2C- ... 2174233573 £4.69 (1.3 inch I2C) (0.96 inch I2C is cheaper at £2.81). The OLED displays look great indoors but are practically unreadable in bright sunlight. See post at bottom of page 6 of this thread for details on the alternative Digole displays, which have a backlight for indoor use but are perfectly readable outdoors in bright conditions.
Rotary encoder: http://www.ebay.co.uk/itm/1x-KY-040-Rot ... 2179060316 £0.99
Knob for rotary encoder: http://www.ebay.co.uk/itm/10PCS-Face-Pl ... 1963176682? £0.99 (this is the price, including delivery, for TEN knobs!)
Piezo buzzer: http://www.ebay.co.uk/itm/Black-10pcs-5 ... 2908469896 £0.99 (this is the price, including delivery, for TEN buzzers!)
On/off toggle switch: http://www.ebay.co.uk/itm/1-pc-2-Pin-SP ... 2369491405 £0.99
100k resistors: http://www.ebay.co.uk/itm/1-4W-0-25W-Me ... 1732761369 £0.99
Trim push button: http://www.ebay.co.uk/itm/RV-16-1C25-SP ... 0494690727 £1.41 - there are cheaper push button switches, but this type feels nice when clicked! :)

I've not included the RF module or transmitter battery (normally a 2-cell lithium battery of 500mAh or greater size will be fine - but it depends on your chosen RF module, which of course depends on what type of receivers you use).

And you'll need to purchase, build, or print a case to put it all in.
Last edited by ceptimus on Fri May 05, 2017 10:28 am, edited 9 times in total.
ceptimus


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby Mosfets » Tue Apr 18, 2017 9:07 am


Another smart and professional build Martin.

You have packed a lot of information into that display screen, any chance of pictures of the other screen shots (and an internal view while you're at it).

Have you got yourself a new toy, is that case 3D printed ?

I will peruse your code later, thanks for sharing it.

Ade

Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby ralkbirdy » Tue Apr 18, 2017 2:48 pm

file5040.jpg
file5040.jpg (27.26 KiB) Viewed 1366 times

Having started out with a Reeduino, my transmitter has been converted to the Reedy Ten. It suits me with having model memories. It needs a couple of more switches, the rotary encoder for moving around the programme and a trim button. My trim button is a momentary switch in the top left corner, easy to hold with my left finger so that the trim functions on the control buttons.

Like Phil's Reeduino, it is a great piece of programing, not so good maybe for fitting in an old reed tx case, but brilliant for a modern alternative.
filee5ab.jpg
filee5ab.jpg (25.99 KiB) Viewed 1366 times
The screen is hard to see outside but good for getting around the options.

Mike


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby tiptipflyer » Tue Apr 18, 2017 6:15 pm


Thank you Martin for another great project.
Since I had all parts on hand I wired everything up on my workbench and it works great. Tomorrow I will put everything in a case, it will be a Reuter Rehaton 10 replica. The enclosure is drilled already, just need to do the decal. Pictures will follow soon.
Cheers
Frank


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby Phil_G » Tue Apr 18, 2017 8:33 pm


Excellent Martin, another really neat project, I love the display, clearly a lot of thought has gone into the presentation Image
I can see there's a lot of interest in this one - your code's had more downloads on day one than the Reeduino's had in 4 months! Image

Cheers
Phil
file8fde.jpg
file8fde.jpg (26.42 KiB) Viewed 1366 times
file89f7.jpg
file89f7.jpg (22.18 KiB) Viewed 1366 times
www.singlechannel.co.uk


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby ceptimus » Tue Apr 18, 2017 9:41 pm


Thanks guys! It's nice to see it generating some interest. I did put a lot of work into it and it's taken me much longer to finish it than I first expected.

Like Mike said, it's a shame that the oled display isn't more visible in sunlight - but you don't actually need the display while flying and it does make the setting up of model memories easier. I've ordered some alternative displays that are slightly bigger and are supposed to be more visible out of doors. They'll need new drivers writing for them but that shouldn't take me long as they have the same pixel dimensions as the oleds we've been using.

I don't have time to do any proper documentation right now as I'm getting ready to go do a job in Liverpool tomorrow. If anyone wants to try it out you just need an Arduino, an oled display, some switches, or just bits of wire for testing, but you do really need a rotary encoder to navigate the menus and set up model memories - oh and a buzzer/beeper if you want to hear the timers, trim-beeps and such.

It has twenty model memories and you can set different servo speeds, travel limits, servo reversing and so on for each one. You can set up mixers for V-tail or elevons all using a (I hope) fairly intuitive set of menus. There's also some monitor pages that display the output channels as bar graphs.

It has two timers that can be set to work in different modes. Mike and I are currently using a 'down timer, throttle activated' that runs when the motor is being used and bleeps after five minutes or whatever you set. And for the second timer we set it to count up and be started by the throttle, but once started it keeps running even when the throttle is closed. The idea is that for powered glider flights that second timer measures your flight duration.

It optionally does FrSky telemetry, monitoring the RSSI (received signal strength indication) and model battery voltage - selectable to use either A1 or A2 with an audio alarm when the model battery gets low.

It monitors and displays the transmitter battery voltage with an audible alarm when it runs down. There's also a five minute inactivity alarm.

I assume most people will use the larger 1.3-inch oled display but if you use the smaller 0.96-inch one you have to change the #define in the config.h file.

It drives the PPM output signal on D12 (edit: early versions prior to V1.0.2 had PPM on D13) in an 'open-collector' fashion (pulled low and floated high) so there's no need to use a Schottky diode to protect your transmitter module, but if you try to monitor the PPM signal when no transmitter module is present you might think it's not actually outputting anything - you'll need to add a pull up resistor when trying to monitor the signal if it's not connected up to anything. You can change the PPM polarity if required or alter it to drive high as well as low. And you can move the PPM pin to Arduino pin zero, instead of pin twelve if you wish - pin twelve then becomes the trim button input. All configuration changes are made by editing the config.h file: normally you either need to comment-out a #define by adding two slashes to the start of the line, or maybe remove two slashes from a // #define that's commented out by default.

It uses an (optional) trim button to provide conventional 'propo' type trims on all channels - while the button is pressed the toggle switches adjust the trim in the expected direction. Of course you also have the normal dedicated 'reeds' elevator trim channel. The throttle trim only works on the bottom end of the throttle range (some Futaba and JR sets did that - it means you can adjust the tickover speed and use the trim as a 'motor kill switch' on IC motors without worrying about the servo linkage to the throttle binding at the 'full throttle' end of things).

On the main screen the control indicators have three elements - there is a round dot that shows the current switch (toggle) position, a vertical or horizontal bar that shows the current servo position (of course the servos are slowed compared to the instantaneous switch movements) and there is a little triangle that shows the trim position. There are also sub-trims available in the menus if you don't want to mechanically trim your plane but don't like seeing the on-screen trim away from the centre. Sub trims are also useful for models with two aileron servos operated by different receiver channels, so you can line up both ailerons independently.

That's all for now. I'll try to make some circuit diagrams, maybe a video and some better documentation in a few days time.

Martin.


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby Phil_G » Tue Apr 18, 2017 10:34 pm


Quick question Martin, for PPM on D0 I think this is right?
In cppm_out.cpp:

Code: Select all

PORTD &= ~_BV(0); // doing it this way there's no need for a Schottky diode - preseting D0 to go low only when it's enabled as an output

DDRD |= _BV(0); // enable D0 as output.  Port D bit 0 was initialized to low, so this makes D0 pull low - pulse train is mostly high with high pulses

DDRD &= ~_BV(0); // D0 back to high impedance input so it will float high pulled up by the RF module PPM input - hence no need for Schottky diode
Its only a comment but in the 2nd line above I take it you mean "mostly floating with low pulses"

Also need to move the trim button from D0 to D13, ie a straight swap. Actually, after thinking about it, I'd move the buzzer output to D13 and put the trim button on D12, avoids the LED messing with D13 as an input, plus you can 'see' the pips:

in beeper.h:

Code: Select all

#define BEEPER_PIN 13
in controls.cpp:

Code: Select all

void controls::start(void) {
  for (uint8_t i = 1; i <= 10; i++) {
    pinMode(i, INPUT_PULLUP); // the ten 'channel' inputs (both sides of five switches)
  }  
pinMode(12, INPUT_PULLUP); // new trim button input
pinMode(0,OUTPUT); // new ppm output
pinMode(13,OUTPUT); // new buzzer output
The trim button bit is a bit more involved, moving PORTD:0 to PORTB:4 (Arduino D0 moved to D12) (uint 'pins' is PORTB:PORTD) (yes?)

Code: Select all

  if (trimChanged && (pins & 0x1000)) { // if trim has been changed and trim button released
and

Code: Select all

    if (!(pins & 0x1000)) { // if trim button pressed alter trim rather than posn
Does all this look about right? Did I miss anything?

With the pic stuff I optionally flip trisio bits to switch between input & output to emulate an open drain drive, it works very well.

Cheers
Phil


Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby ceptimus » Wed Apr 19, 2017 5:04 pm


Hi Phil,

Yes that looks right for moving the PPM to D0 and thanks for catching my typo in the comments - I'll fix that on my version for D13 too.

You won't need the pinMode(13. OUTPUT); in controls.cpp - it won't do any harm but there is already a pinMode(BEEPER_PIN, OUTPUT); in beeper.cpp that will do the job. Also there's no need for the pinMode(0, OUTPUT) - again it won't do any harm, but all it does is set bit zero in DDRD - and the sketch will be rapidly toggling that bit on and off anyway - to output in the pulses.

The normal pinMode() Arduino commands only really manipulate one bit in the PORT register and one bit in the DDR. when a bit in the DDR (data direction register) is set then that pin is an output and the corresponding bit in the PORT register controls whether it's high or low. For a normal high-impedance INPUT mode, the bit in the DDR register is cleared and so is the bit in the PORT register - the program then normally reads the PIN register to see if the input is HIGH or LOW. For an INPUT_PULLUP the DDR bit is low, but the bit in the PORT register is HIGH - that enables the (fairly weak) internal pull-up.

For a true open drain type output we just have to preset the PORT bit low and then set the DDR bit to drive the output low and clear the DDR bit to let it float.

If we want an open drain output but with the weak internal pull-up enabled then we need to flip bits in both registers for each edge change - but to properly emulate a normal output with an inline Schottky diode we don't want that.

Regarding the trim bit - yes I think the two places where the trim bit is tested in controls.cpp with (pins & 0x0001) just need changing to test bit 12 instead.

I don't know without trying it if (pins & 0x1000) will work - if the compiler only checks the bottom 8 bits of a 'truth' value that might always evaluate as 'false' whether or not the bit is set. I would try it out and if the trim button doesn't seem to do anything, or appears to be jammed on, change those two occurrences to : ((pins & 0x1000) != 0) which is then bound to work correctly.

Re: Reedy Ten - a modern 'reeds' set with display, etc.
Postby ronstv » Wed May 03, 2017 6:14 pm


I've got most of the parts now to build the ten channel reeds tranny.
Please note difference in size of both enclosures.

Ron.
IMG_1288.JPG
file589a.jpg
file589a.jpg (34.42 KiB) Viewed 1349 times
IMG_1351.JPG
IMG_1352.jpeg
IMG_1353.JPG
IMG_1397.JPG
www.rons-television-services.co.uk
Attachments
ReedyTen.zip
(261.28 KiB) Downloaded 159 times
Post Reply