RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Projects that are not for RC, but are cool and worthy of development.
mozgy
Posts: 14
Joined: Fri Jan 27, 2017 9:23 am
Country: Croatia

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mozgy » Fri Jan 27, 2017 6:12 pm

Heya,
jhsa wrote:Did you think that the 470k resistors might be pulldown resistors on the Attiny85 inputs?? :) I wouldn't put them there if they weren't necessary, specially not with that big value ;) But Im interested if your setup with the fets work.. If they don't it is very easy to just solder the resistors instead anyway.

João
I just did it as a pushbutton circuit, external pullup with mosfet acting as switch or button. I'd be grateful if you can point me to any better and detailed schematics how it should be done, ty.
Don't have any attiny85 atm, should have one next week so I'll testboard it. Similar circuit works with my atmel328p breakboard (no power mosfets, just LEDs).

--
Mozz

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

Re: RE: Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Fri Jan 27, 2017 6:25 pm

mozgy wrote:]
I'd be grateful if you can point me to any better and detailed schematics how it should be done, ty.
Didn't you see the schematics on the first post? :o :)
That's the only schematics, the one I made.. i don't think that there is another project like this.. ;) At least I didn't find it :)

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

mozgy
Posts: 14
Joined: Fri Jan 27, 2017 9:23 am
Country: Croatia

Re: RE: Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mozgy » Fri Jan 27, 2017 7:31 pm

Heya,
jhsa wrote:
mozgy wrote:]
I'd be grateful if you can point me to any better and detailed schematics how it should be done, ty.
Didn't you see the schematics on the first post? :o :)
That's the only schematics, the one I made.. i don't think that there is another project like this.. ;) At least I didn't find it :)

João
I do apologize for not being precise, yes, I did see that schematics of yours, in fact mine is based on yours. What I meant is practice how should attiny pins be connected when acting as input (pulldown, pullup, pullleft ;) ). As I understood from previous arduino (atmel328p) experiments it can be both ways, I just used to build it as a pullup resistor.
If I'm wrong in that assumption please do say so !

--
Mozz

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Fri Jan 27, 2017 9:06 pm

Sometimes there are pullup resistors and sometime pulldown. I don't really remember what was the reason for that 470k resistor. I didn't write the code. Just adapted it. I can't code. :) I think someone in the arduino forum did it. Will have to look when I get to the PC. But I do believe that resistor is needed.. That is NOT a voltage divider as you suggested before :) Well, It might look like one, but the value of the resistor to ground is so high that practically all the input signal voltage passes to the ATtiny85 input pin.
My suggestion is try it your way. If it doesn't work for you then change it. The way I posted, it works.
Normally I test everything on a breadboard before I make PCBs to avoid wasting material and money if things don't work. That is the beauty of this. You can test before you build :) I am right now testing something else on the breadboard.

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
jhsa
Posts: 16212
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Thu Mar 02, 2017 11:34 am

I will be looking at making this even smaller so it can be installed inside a 9XR-PRO. Probably using double sided PCB.

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


mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Fri May 12, 2017 9:22 am

I'd like to build similar circuit using veroboard and dip components.
I was wondering if this circuit switching part (trans+irf) can be made simpler.
For example just using one npn transistor 2N2222A (ofcoz the circuit has to be simplified and redesigned a little).
Does anybody know what is the power consumption of multiprotocol 4-in-1 module (200ma-300ma)?

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Fri May 12, 2017 10:20 am

You can use an N Channel Mosfet. it doesn't need the transistor then, just connect it to the Attiny via the resistor.
Something like this.

The mosfet in this case has a few advantages over the transistor. For example, less resistance when ON, and therefore less dissipated heat so it can handle more load easily. It is also faster turning On and OFF.

João

EDIT: Updated the picture, forgot the resistor to ground
Attachments
RF Module Power Switch_N-Channel Mosfet.jpg
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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Fri May 12, 2017 10:41 am

jhsa wrote:
Fri May 12, 2017 10:20 am
You can use an N Channel Mosfet. it doesn't need the transistor then, just connect it to the Attiny via the resistor.
Something like this.

The mosfet in this case has a few advantages over the transistor. For example, less resistance when ON, and therefore less dissipated heat so it can handle more load easily. It is also faster turning On and OFF.

João

EDIT: Updated the picture, forgot the resistor to ground
Thank you.
Does IRF520N fit? At 5 V it delivers 3 Amps from its max of 9. Or logic level IRL540.
I have these locally available.
Maybe you can recommend something better in smaller form?

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Sun May 14, 2017 1:22 pm

Made it just for internal module. Ext module can be removed physically.
ppm_switch_module.jpg
ppm_switch_module_back.jpg
GND is controlled by the mosfet.
I havent tested yet, hopefully it will work.

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Sun May 14, 2017 4:05 pm

Be careful that the regulator's maximum input voltage seems to be 11.8V, so you CANNOT use a 3 cell battery to power the radio. Actually it is also not recommended for the Ar9x board, so either use a 2 cell LiPo, or 6 NiMh cells. I use the latter..

That Mosfet should be ok as your regulator is a 5V one.according to the datasheet it seems to start turning ON with a Gate - Source voltage of 4.5V
If your regulator was a 3.3V volt one, that same mosfet would not be suitable.

I used a 3.3V regulator on mine as a discharged 6 cell NiMh battery (at 1.1V per cell) has a total voltage of 6.6V, that means that for a 5V regulator, the regulator's dropout voltage should be less than 6.6 - 5 = 1.6V. That is a bit tight even for an AMS1117 regulator. So i went for a 3.3V one.
You seem to be using a switched type regulator that is also a step up device?? If so, the dropout voltage is not a problem..

Have you already programmed the ATtiny chip and tried it??

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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Sun May 14, 2017 7:38 pm

I'm using Turnigy 1500mAH LiFe 3S 9.9v Transmitter Pack. Nominal voltage 9.9v, fully charged 10.x something, so it should be in safe range. The regulator is a small step-up/step-down converter S7V7F5. It has very nice wide input voltage range.
I havent yet programmed the chip but I'll post the results soon. I also try check the source code, i'm better in programming than in hardware :)

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Sun May 14, 2017 7:45 pm

The code is working well, never had a problem. Not a single glitch :)

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
jhsa
Posts: 16212
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Sun May 14, 2017 7:54 pm

I have just noticed that you put an 100K resistor on pin 2 instead of the 470K indicated on the schematic. Like that it might not work.
You also seem to have not soldered a 100K resistor from the mosfet's gate to ground. That could prevent the mosfet from turning OFF..

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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Sun May 14, 2017 8:13 pm

The mosfet pulldown is there.
IMG_0955.JPG
You're right, i didnt had 470k so i replaced it with 100k :)
But if the correct value is important then i'll find tomorrow 470kohm and replace it.

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Sun May 14, 2017 8:18 pm

Yes it is important, I remember experimenting with different values, and if I remember well Mike suggested that I should increase the value to 470K, and it worked..

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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Mon May 15, 2017 4:04 pm

OK, the resistor is replaced and I also installed recommended (when Vin more than 9V)
electrolytic capacitor between GND and BAT+ near to regulator pins.

Made new software version using pin change interrupts. The software is currently untested (don't use it with real flying models).
RF_Module_Power_Switch_Attiny85_Code_ver2.ino
Last edited by mcmatrix on Mon May 15, 2017 4:45 pm, edited 1 time in total.

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Mon May 15, 2017 4:26 pm

May I ask what is the problem with the original code? :)

João

Sent from my thor using Tapatalk


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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Mon May 15, 2017 4:38 pm

jhsa wrote:
Mon May 15, 2017 4:26 pm
May I ask what is the problem with the original code? :)

João

Sent from my thor using Tapatalk
Probably nothing :)
I just liked the Mike's idea to use pin change interrupt.
Currently i'm not even sure that pcint version is correctly working.
Need to test it a lot before I dare to use it with real flying models.
Atleast i know that first version is rock solid. Thanks.

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Mon May 15, 2017 5:36 pm

Yeah, I have been using it (with models) for over a year.. :)
And I'm preparing a big(ger) model with IC engine that will be flown with my ar9x radio. The Ar9x has proven to be very reliable as well as this power switch, as far as my testing s concerned. I use the radio every day :)

João

Sent from my thor using Tapatalk


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

mcmatrix
Posts: 8
Joined: Fri Feb 19, 2016 4:11 pm
Country: -

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by mcmatrix » Tue May 16, 2017 11:11 am

Last version of single internal rf module switch.
rf_int_module_switch.jpg
Currently using attiny25, maybe attiny85 is better (more ram).
Code itself will fit both.

The initial bugs of RF_Module_Power_Switch_Attiny85_Code_ver2.ino software also fixed.
Atleast in a test bench everything was working.
Now I'll try to install internal module with this switch into transmitter.

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

Re: RF Module Soft Power Switch for AR9x, Skyboard, 9XR-PRO

Post by jhsa » Tue May 16, 2017 12:22 pm

Nice.. :)

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

Post Reply

Return to “Other Electronic Projects”

Who is online

Users browsing this forum: No registered users and 1 guest