Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Mar 13, 2007, 07:01 PM
Registered User
Brisbane
Joined Aug 2006
860 Posts
Discussion
Playstation Joystick to Infrared with a twist

This little sucker is a spin off from the "free AVR programmer/AVR-tute" thread.

To achieve the final goal of the tute (an AVR based IR-RX) I needed an IR-TX.

Didn't feel like pulling a PSX joystick apart - So I just pretended to be a playstation and read the data the joystick normally sends.

Anyone who does not have a radio with a trainer port output (like me) can now get a cheap easy IR-TX from an old playstation joystick.

Features.

8 Channel IR output.
4 Channels from two analog thumb-sticks
4 Extra channels from buttons
Selectable 38Khz/56Khz IR output (via START/SELECT buttons)
No need to pull apart PSX joystick

Picture 1 - Schematic - Self explanatory
Picture 2 - The PCB I used. You can obv. do you own if you don't like mine.
Picture 3 - How I wired it up using a joystick extension lead I cut up. If you cut up an extension lead the PSX controller is 100% unchanged and can continue use as a joystick for the PSX/PS2

There are a few improvements I will make if anyone else is keen to use it.

See the tute thread for the ASM code for it until I remove all the excesive comments. I will repost the code here after I have trimmed the comments.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Sign up now
to remove ads between posts
Old Mar 13, 2007, 07:08 PM
Don't leave it Stock
mrfliboy's Avatar
USA, IL, Round Lake
Joined Feb 2004
2,506 Posts
Well Well, fabulous work again Andrew, my neighbor boy just was getting ready to throw a controller out, (dad had stepped on the wires). Sounds like a good canditate for this one. By chance is there a specific parts list.... Digikey or Mouser? THanks
mrfliboy is offline Find More Posts by mrfliboy
Reply With Quote
Old Mar 13, 2007, 11:03 PM
Registered User
Brisbane
Joined Aug 2006
860 Posts
Um - A parts list..... well I made it all pretty generic so people could pop in what parts they had on hand. I happen to have

0.1uF 0805 XR7 surface mount capacitors (3 of)
4R7 0805 surface mount resistor
4K7 0805 surface mount resistor
100uF surface mount electro
78L05 in an SO8 package
Atmel ATtiny45 in an SO8 package
PMV4545EV MOSFET in a SOT23 (though most Ns will do here like a IRLML2402)

BUT unless you are going to use the same shapes/packages as I did you will want to make your own PCB.

I imagine some people would prefer through hole stuff that surface mount too. I just hate drilling holes.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Old Mar 14, 2007, 12:05 AM
Saves 1, Kills 0, MIA 1
nitebat's Avatar
Joined Dec 2006
567 Posts
Andrew:

Do you have a choice what you can use on the anolog channels? Motors, actuators, servos? I can think of lots of things to use the buttons for.

nitebat
nitebat is offline Find More Posts by nitebat
Reply With Quote
Old Mar 14, 2007, 12:21 AM
Registered User
Brisbane
Joined Aug 2006
860 Posts
The code for the PSX-IR controller is pretty straight forward to modify.

At present it is

Channel 1 = Left Joystick Up/Down
Channel 2 = Left Joystick Left/Right
Channel 3 = Right Joystick Up/Down
Channel 4 = Right Joystick Left/Right

Channel 5 = L2-decrease, R2-increase, Triangle-SetMiddle
Channel 6 = L1-decrease, R1-increase, Circle-SetMiddle
Channel 7 = ArrowDown-decrease, ArrowUp-increase, Cross-SetMiddle
Channel 8 = ArrowLeft-decrease, ArrowRight-increase, Square-SetMiddle

As well as

SELECT = 38Khz
START = 56khz


You can redefine whatever buttons and what ever order you would like them in.

You could also change it so specific buttons set specific levels on a channel. You could then program your receiver to interpret that as landing gear or bomb release or what ever else you wanted to do.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Old Mar 14, 2007, 07:43 AM
Registered User
Belgium
Joined Jun 2004
342 Posts
Nice project! What LEDs are you going to use in the array? I've been experimenting with Ir some time now and for the difficulty is always the range. My Ir buddy box is 3 years old now and my range is starting to get smaller (< 10 meters, coming for > 20 meters), I suspect the ageing of the LEDs has something to do with this ;-( I'm using 3 LED arrays of 18 LEDs each BTW, each array has it's own FET ;-)

Johan
nanoflite is offline Find More Posts by nanoflite
Reply With Quote
Old Mar 14, 2007, 08:12 AM
Registered User
Belgium
Joined Jun 2004
342 Posts
Nice project! What LEDs are you going to use in the array? I've been experimenting with Ir some time now and for the difficulty is always the range. My Ir buddy box is 3 years old now and my range is starting to get smaller (< 10 meters, coming for > 20 meters), I suspect the ageing of the LEDs has something to do with this ;-( I'm using 3 LED arrays of 18 LEDs each BTW, each array has it's own FET ;-)

Johan
nanoflite is offline Find More Posts by nanoflite
Reply With Quote
Old Mar 14, 2007, 10:32 AM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
This might be what I'm looking for to control my full control piccoz project. I'm looking into putting bang bang cyclic. I would need 4 channels for that and two proportional for thottle & tail. plus some way of mixing. I haven't looked at your code yet but sure it could be changed around to do it. I haven't done any code in about 3 years, I used to be into avr's for programming/unlooping dss smart cards and would like to get back into it. I have a bunch of 2313's but the aren't surface mount.

What are you planning for the rx?
ps, will this run on a 2313 instead of the tiny45
beer-man is offline Find More Posts by beer-man
Last edited by beer-man; Mar 14, 2007 at 10:41 AM.
Reply With Quote
Old Mar 14, 2007, 10:56 AM
Saves 1, Kills 0, MIA 1
nitebat's Avatar
Joined Dec 2006
567 Posts
Andrew:

On the physical side o' things, would it be possible, say, to rig the left joystick as a throttle?. Like, rearrange the springs to make it more like a normal TX? I assume the joysticks are proportional. How many steps?

Have you thought of sellin' this as an RX/TX pair? Wi' the Play Station adapter it would be an inexpensive IR solution for us folks wi'out a decent radio or folks who like to jus' build planes 'n' not so good in the electronics dept. We can find PSX controlers anywhere. Four channel analog means complete heli 'n' plane controls. Like maybe a 3D livin' room flyer or micro collective heli. I'd be in for a few. Really.

nitebat
nitebat is offline Find More Posts by nitebat
Reply With Quote
Old Mar 14, 2007, 04:36 PM
Registered User
Brisbane
Joined Aug 2006
860 Posts
NanoFlight,

I am using normal LEDs that are used in IR Remotes. I am driving them at 50mA peak current in a 5:1 duty cycle. There is an array of 16 LED (4x4) They are being driven by one FET. One FET should be enough omph for at least 10 of these arrays.

I don't understand why you would have lost range over such a short time with LEDs. Unless they are being seriously over driven the LEDs should last much longer.

My design as shown just uses resistors for biasing the LEDs straight from the batteries. It means to get decent consitancy over the life of the battery (30%) I have to waste HALF my power in the resistors AND have 8 batteries.

If it seems any number of people are building these things I will redesign to make more efficient use of the battery power available and make battery voltage a non issue.


Beer-Man,

PM me about your "full control" picooz. We might be heading down the same path. You may be able to share my RX code too

It won't run on a 2313 without modifying the code. However those changes are trivial (just the timer part to make the 38/56khz)


NiteBat,

I would probably not do the ripping apart springs thing myself as the point of it was to not have to modify the PSX controller.

I could however re-write the code to have the theft thumb (throttle) do a SOFTware non-return spring. Make the throttle like the buttons where if you press FWD it increases the throttle. If you let go it stays steady. If you pull back it decreases throttle.

I was actually going to do something similar to that on my modified PicooZ to make hovers easier. (with the functinality that if you pulled ALL the way back it would cut throttle to 0% for emegency stops when your about to hit something)

I was not planing on selling them. All the details are there for someone versed in the arts to have a go themselves.

That being said - if there IS interest from people I will neaten it up and provide a kit of parts with all the hard soldering done.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Old Mar 14, 2007, 05:28 PM
Registered User
Brisbane
Joined Aug 2006
860 Posts
Beer-man,

Oops forgot to answer one part of your question

Quote:
Originally Posted by BeerMan
What are you planing for the RX

The RX that is going to be built/shown in the AVR tute thread is going to be an ATTiny45 (the chip I gave a few samples of with the programmers). It will be throttle plus 2 actuator channels (I will also make an option for low batt cut out but that will make the chip un-reprogramable with the programmers I gave them)


For my heavily modified picooz I have built one test unit with an ATTiny45. However the prototype being worked on now is an AT90PWM3. I got that chip just to play with the DAC so I could try make my own IR-Photo diode receiver eventually.

For now it is just a normal 38Khz unit with the AT90PWM running the show.

There is a REG710-5 (like an LTC3200-5) making a 5 volt rail for the ADXRS300 gyro unit. The AT90 is also running off the 5 volt rail so it can drive the FETs harder.

There are two fets for the two motors. The AT90 is doing software mixing and unlike the original picooz controller will take into account battery voltage.

The Cyclic pitch is going to be done with a magnet on the "flybar" with a hall sensor to detect the blade angle (a la Mr Fujinawa)

http://www.rcgroups.com/forums/attac...mentid=1175209

The cartesian co-ordinates from your thumbs are going to have to be translated to polar co-ords. A software phased locked loop (kinda) will keep track of blade position and then the polar co-ords can be used to fire of the actuator. For now there will need to be a slip ring to get power to the coil as unlike Mr Fujiwanas unit, the picooz blades don't accomodate for a stationary coil.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Old Mar 14, 2007, 09:21 PM
Registered User
USA, NY, Syracuse
Joined May 2005
874 Posts
andrewm1973,
Thanks for answering my questions. I had not seen those flybar photo. I found video also. real close to what I'm thinking. I don't want to fill this with picooz stuff so I'll pm you and post it in the picooz mods thread.
beer-man is offline Find More Posts by beer-man
Reply With Quote
Old Mar 14, 2007, 09:28 PM
Saves 1, Kills 0, MIA 1
nitebat's Avatar
Joined Dec 2006
567 Posts
Andrew:

Thanx for the data. I like your solution for the throttle. One of your buttons would do for a kill switch too (keep the joystick full down = kill as well). It wasn' the RX that was holdin' me back (I can work small) but the complexity of the TXs I've seen so far. This is elegant. As far as I know you can pick up all sorts o' different PSX controlers, right?

It's also nice to see that your settin' up to use all the buttons on the controller. As I've always said, 'software weighs nothing'. I'm sure that you can add 'flight funtionality' without adding any new hardware to the bird. Something like a heading lock button for turns on a plane for instance.

nitebat
nitebat is offline Find More Posts by nitebat
Reply With Quote
Old Mar 15, 2007, 03:54 PM
Registered User
Brisbane
Joined Aug 2006
860 Posts
NiteBat,

There are lots of different shaped PSX controllers, but as far as I know only 4 different functionalities.

Digital
Analog
DualShock
DualShock 2

This application is only set up for DualShock (1 or 2) but if you look at the to-do list in the code I was going to make it revert to 4 channels if it only found a digital controller.
andrewm1973 is offline Find More Posts by andrewm1973
Reply With Quote
Old Mar 15, 2007, 07:11 PM
Registered User
Joined Oct 2004
2,753 Posts
Somehow I think that activating the dual shock vibration motors a few instants after you hit the throttle kill switch would sound appropriate...
Brandano is online now Find More Posts by Brandano
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Funny park with a twist maiden,partial thumbs up! alvinm Parkflyers 8 Mar 23, 2003 06:46 PM
Another funny park with a twist...pics alvinm Parkflyers 12 Mar 21, 2003 08:15 PM
Twinstar with a Twist! Stelio Foamies (Kits) 52 Feb 11, 2003 04:05 AM
Introducing the Evil Twin!! (Sportwin with a twist) Rudderman98 Electric Plane Talk 35 May 02, 2002 04:31 AM
Joystick adapter with all design files posted guillaume Power Systems 7 Jan 14, 2002 08:51 PM