DIY OpenLRS Hardware for PPM Only

OpenLRSng runs on a number of different platforms. Find out more / post your questions here.

Moderator: kha

Post Reply
mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Mon Mar 02, 2015 12:43 pm

Hello,

I am in the process of designing hardware to use the OpenLRS firmware; At present, it's in the very early stages- board design and checking.

The concept is as follows; to, using the same board schematics as are available for another unit, produce the smallest possible footprint using the RFM22 module, and SMD components of a hand-solderable size. I intend to only break out the pins for PPM (GND, Vin and PPM) and I2C (SDA/SCL), in addition to the 5-pin firmware header (RST/RXD/TXD/3.3V/GND).

My aim is to replace the current OrangeRX transmitter module (converted to a PPM receiver) I have running my ZMR250 miniquad. This dictates the narrowed section you can see on my current design- to fit between the chassis frame standoffs.

Is this of interest to anyone? And does anyone have any helpful input that I may avoid some pratfalls! I'm not very familiar with working with RF hardware...

Image

Image

I am aware that the current board design has at least 2 pad / trace proximity issues!
Matt

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Fri Mar 20, 2015 10:04 am

Well, the boards' been gone over a few times now, and a few minor changes made to improve clearances between tracks.

They're also now on their way back from the manufacturer, and I've the components to populate a couple- it's amazing how much they charge for SMD components when you only want 10 or 20 of something.

Frustrating!

Will keep everyone updated, since apparently a ton of people have had a look, but none have commented yet. TTFN

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Wed Mar 25, 2015 1:22 pm

Boards are in from the fab; Company used is OSH Park, look good- and are, of course, purple.

Assembly and testing tonight.

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Thu Mar 26, 2015 11:07 am

The board is assembled, and runs as an Arduino. Bootloader took, as a Pro Mini 5v/16MHz (despite running on the 3.3v that is required by the radio module).

The Arduino "blink" sketch runs just fine, and can operate the two LED's on the board with no issues.

The circuitry is modelled on Flytrons' setup for ease of use (LED pins are the same, for example) which means that I should be able to use the standard firmware updater.

Will look more into that this evening, and try to post some pictures of progress. Please do comment with any thoughts... it's getting a bit echoey in here.

User avatar
jhsa
Posts: 17724
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: DIY OpenLRS Hardware for PPM Only

Post by jhsa » Thu Mar 26, 2015 11:34 am

Are you sure the atmega will work at 16Mhz with a supply voltage of only 3.3V?

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW


User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: DIY OpenLRS Hardware for PPM Only

Post by MikeB » Thu Mar 26, 2015 12:14 pm

On 3.3V supply, the ATMEGA328 is only guaranteed to work up to 13.33 MHz.
While it may seem to be OK at 16MHz, it will likely fail with temperature and supply voltage changes.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Thu Mar 26, 2015 12:25 pm

Hello, thanks for your time in answering / questions.

I was previously under the impression that the Atmel '328 chips, while only available (in arduino form) as 5v/16MHz and 3.3v/8MHz, are used in the Flytron and OrangeRX OpenLRS modules running at 3.3v and 16MHz. This would seem to be true, as the OrangeRX OpenLRS RX module can be powered from a 3.3v FTDI.

I have a few spares sitting around at home and will probe them given a chance (Hopefully this evening).

I will certainly do a little stress-testing to confirm that it's not going to fall over (Would really rather not lose a model), can anyone else confirm this? Thanks!

Edit- a redesign would easily enough supply 3.3v to the HopeRF module while using the VRaw input's 5v as the power for the Atmega, if required. Will look into if it's neccesary.

User avatar
MikeB
9x Developer
Posts: 15565
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: DIY OpenLRS Hardware for PPM Only

Post by MikeB » Thu Mar 26, 2015 1:21 pm

Just because there is something else produced doesn't (unfortunately) mean they are correct.
I'm using the data sheet for the ATMEGA328.
Section 29.3 of this shows the allowed "Safe Operating Area" as maximum frequency against Vcc.
The graph shows 4MHz at 1.8V rising linearly to 10MHz at 2.7V.
This then rises linearly from 10MHz at 2.7V to 20MHz at 4.5V, and remains at 20MHz up to 5.5V
Using this graph I calculate 13.33MHz at 3.3V.

Voltage regulators often have an output tolerance of +/-5%. So a 3.3V regulator may actually be as low as 3.135V. At this voltage, the maximum safe frequency is 12.42 MHz. For a 3.3V powered ATMEAG328 I therefore recommend a clock frequency of 12MHz.

The device is specified for a temperature range of -40 to +85 Celcius.

Mike.
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Thu Mar 26, 2015 1:27 pm

Makes sense, Mike. May rig up a greenwire fix for now, and have a look at sorting the boards out before I order the next batch.

I like nicely researched answers! Thanks again for taking the time to look it up. Guess it serves me right; there's quite a lot of people out there who seem to think that it's perfectly fine with the out-of-spec voltage, but considering there's already a 5v supply available, I'll just tap into that.

User avatar
jhsa
Posts: 17724
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: DIY OpenLRS Hardware for PPM Only

Post by jhsa » Thu Mar 26, 2015 2:01 pm

mapammenter wrote: Edit- a redesign would easily enough supply 3.3v to the HopeRF module while using the VRaw input's 5v as the power for the Atmega, if required. Will look into if it's neccesary.
What you need to find out is if the RF module can accept a 5V logic signal at it's input, as it is powered from 3.3V.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Fri Mar 27, 2015 10:20 am

Very true. Will have a little looksee. I can't see anything immediately in the module datasheet that says one way or the other, which is frustrating- but I guess firing off an email to HopeRF can't hurt. Not sure how good they are at responding, mind.

It seems I've mixed up the wires for the NIRQ/NSEL pins on the module anyway. Time to bust out the fine wire again... :)

On another note- in trying to get this batch to work before I order more, updated boards, I found out that the ATMega will, when initially powered at 3.3v from such a small regulator, trip it's low-voltage brownout and reset. Looks like it's just flashing the LED very, very fast, but is otherwise unresponsive- worked fine when supplied 3.3v direct by the FTDI board. The regulator stabilises out at 3.3v after a few millis, but the board has already reset by that point- creating a new spike.

The solution was to edit the bootloader's extra-fuse setting to 0x07 from 0x05, so as to have a 1.8v brownout detector (as is normally used by 3.3v units, I believe), which has got things working temporarily.

User avatar
Kilrah
Posts: 9495
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: DIY OpenLRS Hardware for PPM Only

Post by Kilrah » Fri Mar 27, 2015 11:52 am

It doesn't. Which is why all OpenLRS instructions warn you to ALWAYS use a 3.3V serial adapter or AVR programmer when programming, flashing the AVR with a 5V usbasp would fry the RF module as the same SPI lines are shared for both purposes.

So ideally you would need a 5V supply for the AVR, a 3.3V supply for the module, and level translators for comms between the 2.
It's "complicated" and "bulky" though, which is why the suppliers of lower end compatible hardware e.g. HK with the Orange line cheat and run the AVR on 3.3V, so much simpler.

It's of course bad design practice not to follow the manufacturer specs and run the AVR at 16MHz on 3.3V and sell it, but then I've never read about anybody having problems with it.
Just like a PC processor that shouldn't but can be overclocked there is likely sufficient margin for it to work. My 3.2GHz CPU has been running for 4 years at 4GHz without issues - and low performance parts often have wider tolerance margins than high performance ones. Still remember overclocking my Palm m100 to about double its normal operating freq... the limit was the clock PLL that simply couldn't generate higher clocks, the CPU would sill have been happy to run higher.

Your call whether you want to risk it or not.
Attachments
Clipboard01.jpg

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Fri Mar 27, 2015 12:19 pm

Ah, yes. I had seen that little table, alas, I was hoping!

Level conversion is a pain for bidirectional lines, more than single-way. Guess it's worth seeing how small I can squish what's required, and work out if it's worth it. Again, thankyou for your thoughts :)

For the sake of soldering on a few extra resistors and transistors, if it's going to make things definitively more stable, it may be worth it.

If anyone is interested in having Eagle files for this stuff I'm more than happy to upload it somewhere. Once it's working, of course!

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: DIY OpenLRS Hardware for PPM Only

Post by kha » Fri Mar 27, 2015 7:20 pm

Just a quick note that there is at least 4 smaller rx designs
- uLRS at RCGroups
- microRX in two flavors at openLRSng github
- brotronics subMicroRX


--kha via mobile

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Sun Mar 29, 2015 1:42 pm

Aye, there are a few small ones around. This is mostly a learning experience for me! Electronics is a hobby, and I have to learn by reading, and by cocking up. :)

Plus, there's an element of fun with making something to fit exactly what I need.

Gives me something to fiddle around with in the evenings when it's too wet / dark / windy to be outside.

So far, the RX talks to the TX through OpenLRSNG. Didn't think in advance about the PPM only coming through one pin. Now have to find that pin, and greenwire it. Here's hoping batch 2 look a little nicer. :)

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: DIY OpenLRS Hardware for PPM Only

Post by kha » Sun Mar 29, 2015 3:09 pm

mapammenter wrote:Aye, there are a few small ones around. This is mostly a learning experience for me! Electronics is a hobby, and I have to learn by reading, and by cocking up. :)

Plus, there's an element of fun with making something to fit exactly what I need.

Gives me something to fiddle around with in the evenings when it's too wet / dark / windy to be outside.

So far, the RX talks to the TX through OpenLRSNG. Didn't think in advance about the PPM only coming through one pin. Now have to find that pin, and greenwire it. Here's hoping batch 2 look a little nicer. :)
Yeah just pointing out the other designs for readers of the thread.

--kha via mobile

mapammenter
Posts: 10
Joined: Mon Mar 02, 2015 12:30 pm
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by mapammenter » Sun Mar 29, 2015 6:34 pm

Ah! I didn't quite twig that. Thankyou. Should I put that up in the first post?

kha
Posts: 38
Joined: Fri Aug 09, 2013 6:16 pm
Country: -
Location: Espoo
Contact:

Re: DIY OpenLRS Hardware for PPM Only

Post by kha » Sun Mar 29, 2015 6:39 pm

No need, I guess I will link to DIY designs from openLRSng.org Hardware page

kirkintokyo
Posts: 1
Joined: Mon Jun 13, 2016 11:22 am
Country: -

Re: DIY OpenLRS Hardware for PPM Only

Post by kirkintokyo » Mon Jun 13, 2016 11:28 am

Hi any chance openlrsng will support the ultimate lrs mini board?
http://www.itluxembourg.lu/site/apmplan ... -lrs-mini/

Post Reply

Return to “OpenLRSng hardware”