Author Topic: Resistorless rf design  (Read 4777 times)

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Resistorless rf design
« on: June 20, 2011, 06:14:54 AM »
I am trying to recreate the resistor free rapidfire setup that hazer did for the Flex rapidfire.  I understand that it is risky business and I run the risk of frying a controller, but I am willing to give it a shot.  I have made modifications to the trigger code based on Hazers comments in the Flex thread that he checks the trigger on each tristated pulse and leaves the output off it the trigger is released.  I think I have the code working to do that, but I don't know if I need to factor in if the trigger is released after the output has been turned back on.  This could potentially cause a higher voltage to the trigger until the output is tristated again, and I don't know if the trigger can handle it for a short period of time.  The problem I see is that in order to check the trigger with every interrupt, I would have to tristate the trigger to read it as an input (which would cause a pulse every ms if I tristated it then made it an output again) or to use the ADC to check the trigger voltage in every interrupt, which is a little more than I hope is necessary.  I would greatly appreciate anyones help on this, especially if Hazer can weigh in, but I understand he is busy so anyone else that has an idea it would be great.

Thanks,
« Last Edit: June 20, 2011, 07:42:26 AM by magic_man185 »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #1 on: June 20, 2011, 07:26:35 AM »
I believe its fine the way you have it now.

Offline FOOKz™

  • Hardware Modder
  • Research & Development
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: Resistorless rf design
« Reply #2 on: June 20, 2011, 04:31:42 PM »
You could PWM the pulse and cause the volts average to decrease so you wont need resistors.

Yellow is ON position... the trigger is being shot.
blue is off position... the trigger is not being shot.

so if a PWM was introduced to reduce the overall voltage of the signal you might be able to get away with removing the resistors.
(this will take time to code since its right from the chip).

yay paint.  :rofl:
(this is just an idea i had for a bit but never shared).


Follow my Instagram and subscribe to my YouTube

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #3 on: June 20, 2011, 08:26:32 PM »
Fookz,

I am not really familiar with PWM enough to be able to code it.  If hyper is right and I don't have to worry about the trigger being released after the output is turned on, then I pretty much already have the code done.  I have attached my modification to the Right trigger interrupt routine that should allow the resistors to be omitted.  Basically the only thing changed it the Offstate section, which was replaced by this:
Code: [Select]
OffstateR
decfsz DWELLTIMER, f ;count down dwell time to next pulse
goto LeftTrigger
bsf FLAGS, PULSEONR ;if dwell is done turn on outputs
btfss FLAGS, TRIGOUT ;if matrix, have to test if trigger is pressed
goto ContinueOffstateR ;no need to test on CG controller
btfsc GPIO, TRIGGERR ;test trigger
goto ContinueOffstateR ;if trigger released, leave output off
bsf STATUS, RP0 ;bank 1
bcf TRISIO, TRIGGERR ;and reset pulse time
bcf STATUS, RP0 ;bank 0

ContinueOffstateR
movf FREQR, w ;from frequency value
movwf DWELLTIMER
btfss FLAGS, COD5MODE ;test COD5 mode
goto LeftTrigger
bcf STATUS, C
rrf DWELLTIMER, f
addwf DWELLTIMER, f ;75% dutycycle for pull

Keep in mind, this is just for the right trigger, so you would have to do the same for the left trigger, and also for the burstfire offstate.  If anyone else sees this and wants to try it, please bear in mind that I have NOT tested this code.  I am hoping Hazer can tell me if this is what the flex code does, or if he did it some other way entirely.  Either way, I intend to test this code eventually, but I had to cannibalize my programmer to build something else, so I need to get some components ordered to rebuild my programmer before I can test this.

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: Resistorless rf design
« Reply #4 on: June 20, 2011, 08:38:26 PM »
That looks good to me. I did something slightly different (I flagged the trigger being pulled in the main routine for burst fire) but its the same principle. That should work just fine.

I dont think the triggers are in danger without resistors. But if the pulse was constant, the matrix controllers could have problems without the resistors causing firing when the trigger waws not touched. It depended on the trigger pot calibration.

The thing that does need attention is the LEDs. They can be protected by a duty cycle in software.
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #5 on: June 20, 2011, 08:41:44 PM »
Hazer,

Aren't the LEDs already setup with a 50% duty cycle in your code, therefore they should be ok?

Offline FOOKz™

  • Hardware Modder
  • Research & Development
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: Resistorless rf design
« Reply #6 on: June 21, 2011, 11:38:10 AM »
50% duty cycle of pulse pretty much cuts your voltage in half if you look at it in 2nd approximation I think you're ok. Test the voltage with a meter to be safe man.

Thats what i figured too the chip is designed to handle full battery voltage for it's logic input and LEDs aren't.

Follow my Instagram and subscribe to my YouTube

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #7 on: June 22, 2011, 12:53:58 PM »
I understand that the 50% duty cycle would cut the voltage in half, I was asking because I think the BMU and Gameplay code already used a 50% duty cycle for the LEDs (so that you could use it for matrix or CG) and therefore nothing more would need to be done.  I intended to test this myself last night, but I don't have any chips programmed, and I can't find my programmer.  I tried to build a new JDM programmer last night, but I must have a loose connection somewhere or something, cause it isn't working.  I am considering buying the PicKit 2.  Even though I only do this as a hobby and I might not use it very much, it would probably be worth it to not have to mess with rebuilding my programmer every time I want to mess with rapidfire (not to mention I could use it on my laptop or my new desktop that doesn't have a serial port, and I could use it in Windows 7).  I will test the output next week when I get a new programmer, unless someone here is able to clear it up before then (I am fine either way).

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #8 on: June 22, 2011, 03:00:46 PM »
yes bmu and gameplay already use pwm for the leds.

and its definitely worth investing in a PK2, so much easier than faffing with serial ports and what not :)

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #9 on: June 22, 2011, 04:30:59 PM »
Thanks, so with the trigger code above and the led code from bmu I should be able to install without resistors, correct? On another note, I am thinking about using some bi-color leds, it doesn't really matter if I source or sink it, so long as it is right in the code and wired properly? Is there any way to use a single pin to drive a bicolor led with a common cathode, or do I have to just connect two regular leds together?

Hyper, do you have the pk2? I am trying to decide if I am getting the starter kit with the low pin board, or if I an just getting the programmer and then just hooking the pins up manually.
« Last Edit: June 22, 2011, 07:10:12 PM by magic_man185 »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #10 on: June 23, 2011, 08:20:13 AM »
1. yes that is correct.

2. remember about the optocoupler with sourcing and sinking, but yes if the optocoupler can handle the current it doesn't really matter.

3. there is always a way, but I think the only way to do it without extra components (which it looks like your trying to avoid), is to use two regular LEDs.

4. yes I have a PK2 I bought the starter kit because I like having the good quality board that I know will be reliable, when I bought it my soldering skills weren't so good but its easy enough to make your own board, or you can just run jumper wires to a breadboard for a non permanent solution.

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #11 on: July 08, 2011, 07:19:08 AM »
I got my PK2 Tuesday, and I love it.  I haven't done a whole lot with it yet, because I just finished my code and I am debugging it now.  I found a whole bunch of little errors (storing to W instead of f, moving literal of location to w instead of movf to w, etc.) that messed everything up, but now that I fixed them I am getting closer.  I am using MPLAB SIM to step through the code, and I think I pretty much have it working now.  I still have to program the chip and check the output voltage for the LEDs to make sure the duty cycle is working. 

Speaking of duty cycle, I was wondering something about the COD5 mode in GameplayRF2 (and I think BMU3).  The code uses a 25% duty cycle to make it compatible with COD:WAW, but I am wondering would having a 25% cycle all the time affect the code working with other games?  Could we just make the code 25% duty cycle all the time and it work on all the games, including WAW?  Barring of course the sps cap, I am strictly talking about the duty cycle.
« Last Edit: July 08, 2011, 01:11:11 PM by magic_man185 »

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #12 on: July 08, 2011, 11:49:37 AM »
I got my PK2 Tuesday, and I love it.  I haven't done a whole lot with it yet, because I just finished my code and I am debugging it now.  I found a whole bunch of little errors (storing to W instead of f) that messed everything up, but now that I fixed them I am getting closer.  I am using MPLAB SIM to step through the code, and I think I pretty much have it working now.  I still have to program the chip and check the output voltage for the LEDs to make sure the duty cycle is working. 

Speaking of duty cycle, I was wondering something about the COD5 mode in GameplayRF2 (and I think BMU3).  The code uses a 25% duty cycle to make it compatible with COD:WAW, but I am wondering would having a 25% cycle all the time affect the code working with other games?  Could we just make the code 25% duty cycle all the time and it work on all the games, including WAW?  Barring of course the sps cap, I am strictly talking about the duty cycle.

Most games it makes no difference but I have heard the 25% duty cycle causes rapid fire to play up in a few games, I think it was just the GOW games.

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #13 on: July 08, 2011, 01:02:45 PM »
Hmm, well that is a bummer, I like GOW, I don't play it often, but I might when GOW3 comes out.  Looks like I will have to make it so I can turn the COD5 mode on and off.  Come to think of it, to your knowledge, have any games since COD5 required a 25% cycle, like black ops or anything?  If it is only COD5 that uses the different cycle, I just won't worry about it, because I don't even have that game.

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #14 on: July 08, 2011, 01:36:54 PM »
To my knowledge the 25% dutycycle is only useful on COD 5.

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #15 on: July 08, 2011, 01:51:01 PM »
Cool, thanks again Hyper, you have been very helpful throughout this thread. I am curious, considering you are on the R&D team, are you an EE by trade?

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #16 on: July 08, 2011, 01:59:23 PM »
Cool, thanks again Hyper, you have been very helpful throughout this thread. I am curious, considering you are on the R&D team, are you an EE by trade?

Well I do try :)

And no, not yet, I'm still at school but I plan to go to uni and eventually become an EE :P but FOOKz and Hazer are both EEs

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #17 on: July 08, 2011, 02:22:20 PM »
I gotta ask, how old are you? I probably could have gone to school for electronics.  I like to think I do alright considering my limited training, and I think I have the right mind for it (I am a very quick learner).  I have dabbled with electronics for years, I work for an electronics distributor so I would ask random questions to out tech support guy that used to do TV repair, and I have some other people I bounce ideas off of (you seem to be good for that, lol). I went to community college for computer networking, but I don't use it where I work now.

Offline hyper999

  • Acidmods Alumni
  • Millennium Poster
  • *
  • Posts: 1158
  • Post quality +544/-3
  • Research and Development
Re: Resistorless rf design
« Reply #18 on: July 08, 2011, 02:29:10 PM »
17, I am quite similar I have dabbled in everything, but I get bored easily and electronics seems to be the only thing that's stuck. Basically I just want to spend my life designing/making cool things :)

Offline FOOKz™

  • Hardware Modder
  • Research & Development
  • E = MC² Mad Scientist
  • *
  • Posts: 2070
  • Post quality +37/-2
  • Electronics Expert Electrical Engineer
Re: Resistorless rf design
« Reply #19 on: July 11, 2011, 12:35:48 AM »
i'm not an engineer yet hyper, but thats not very far away. Hazer deserves the title as the Engineer since hes got the paper, experience, and modding ability to prove it (i only had at construction sites' electrical power lines, I don't mod much anymore ether because im a poor college student.)
 
magic man it's not too late to get into things because where there is problems to be solved there's a job, it's all about troubleshooting and problem solving. And if you have those skills they need you.

Follow my Instagram and subscribe to my YouTube

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #20 on: July 11, 2011, 07:00:22 AM »
Very true Fookz, it is never too late.  I am 26, and right now my fiancé is in school.  When she is done two years from now I might go back to school. I have been thinking about going into programming, like C++ or Java, but who knows.

Offline Hazer

  • x4675636B4E7574
  • Acidmods Alumni
  • Acid Modder
  • *
  • Posts: 583
  • Post quality +59/-0
Re: Resistorless rf design
« Reply #21 on: July 11, 2011, 09:43:19 PM »
Interesting. I was 26 when I went back to get my EE degree.

Word of wisdom: Before you 'choose' what you want to do, ask someone who does it for a living to show you what they do. Until you see it first hand, I dont see how anyone can say "I can do that for a career".
[Quote from Gamermodz via Viking forums]
Don't be jealous your not half as smart. I hate ****tards like you. An ignorant redneck. Your nothing but a posing ******. Get the **** out of here, really, your claim to fame is an open source rapid fire code? You make me laugh. You think you have control over the modding market?  You couldn't create what I can and do. You are too ignorant with your outrageous assumptions and accusations. [/Quote]

Offline magic_man185

  • Who Farted ???
  • *
  • Posts: 229
  • Post quality +16/-0
  • Gender: Male
  • Acidmods User
Re: Resistorless rf design
« Reply #22 on: July 12, 2011, 02:24:44 PM »
My brother went to a technical school for EE, or at least EE-esk program, and he works with machine vision systems now (cameras that go on production lines to inspect products and that sort of thing).  It isn't something I would mind getting into.  Programming is the other thing that I enjoy working on sometimes.  I have always kinda wondered if I could stand staring at a screen all day writing code, but I realized that I already stare at a computer screen all day with my current job, and I don't enjoy it nearly as much.

Hazer, I just sent you a PM.  Could you please respond when you have time?

 

SMF spam blocked by CleanTalk
SimplePortal 2.3.5 © 2008-2012, SimplePortal