Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

PS One controller modified to control RN-1 via Bluetooth

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
32 postsPage 1 of 31, 2, 3
32 postsPage 1 of 31, 2, 3

PS One controller modified to control RN-1 via Bluetooth

Post by NovaOne » Sun Aug 26, 2007 12:03 pm

Post by NovaOne
Sun Aug 26, 2007 12:03 pm

I wanted to control RN directly from a Play Station style controller.

I considered buying a SIXAXIS Wireless Controller (PS3) fro £28, but I would still have had to make some form of decoder/Transceiver unit.....but this is beyond my abilities ...at the moment :wink:

So I bought a second hand PSOne controller for £4, and a (Sena Parani) ESD200 TTL Serial bluetooth module for £40 from http://www.merlinwireless.co.uk/merlinbluetooth/

I considered using a BlueSmirf, but I chose the ESD200 because its smaller.

So inside a PS One looks like this....
Image

I considered leaving the vibration motors in, but at the time I wanted to integrate batteries and the ESD200 inside, to make a neat job, so i removed them. I think it will be cool to fit one back in...in the future?

I also discarded the original control board, after desoldering the analogue joystick units. Then began work on my PIC16F873A based new control board (NB this one has a mistake on it):
Image

During testing and programming, I linked the PIC based controller to my PC's serial port via a MAX232 converter, and monitored the signals with Hyperterminal:

Image

Once I was happy, I configured the ESD200 to Pair with my ESD001 Multiplex module on RN, and fitted it inside the PS One controller housing, along with a 3.3v Regulator.

Image

I fitted a pack of 4xAAA batteries under the controller, and tested it.

At the moment I have the analog joystick generating a byte over a specific threshold... It would be nice to use the analogue value, but I'm not certain how I will do this, or what i will do with the value when I have it...:?:
I had too many problems at each stage to list, but I'll answer any specific questions the best I can:roll: If anyone else is mad enough to try this.
Chris :D
I wanted to control RN directly from a Play Station style controller.

I considered buying a SIXAXIS Wireless Controller (PS3) fro £28, but I would still have had to make some form of decoder/Transceiver unit.....but this is beyond my abilities ...at the moment :wink:

So I bought a second hand PSOne controller for £4, and a (Sena Parani) ESD200 TTL Serial bluetooth module for £40 from http://www.merlinwireless.co.uk/merlinbluetooth/

I considered using a BlueSmirf, but I chose the ESD200 because its smaller.

So inside a PS One looks like this....
Image

I considered leaving the vibration motors in, but at the time I wanted to integrate batteries and the ESD200 inside, to make a neat job, so i removed them. I think it will be cool to fit one back in...in the future?

I also discarded the original control board, after desoldering the analogue joystick units. Then began work on my PIC16F873A based new control board (NB this one has a mistake on it):
Image

During testing and programming, I linked the PIC based controller to my PC's serial port via a MAX232 converter, and monitored the signals with Hyperterminal:

Image

Once I was happy, I configured the ESD200 to Pair with my ESD001 Multiplex module on RN, and fitted it inside the PS One controller housing, along with a 3.3v Regulator.

Image

I fitted a pack of 4xAAA batteries under the controller, and tested it.

At the moment I have the analog joystick generating a byte over a specific threshold... It would be nice to use the analogue value, but I'm not certain how I will do this, or what i will do with the value when I have it...:?:
I had too many problems at each stage to list, but I'll answer any specific questions the best I can:roll: If anyone else is mad enough to try this.
Chris :D
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by Robo1 » Sun Aug 26, 2007 12:26 pm

Post by Robo1
Sun Aug 26, 2007 12:26 pm

I'm very impressed. this is such a nice mod if not a bit mad :wink: . If you don't mind me asking what was wrong with using a PS2 wireless controller and having the PIC attached to the end dongle (this is what I'm doing) there's plenty of code floating about the internet to interface with most processors. Plus you get the added bonus of the buttons and the analogy signal.

But still this is a lovely job, have you interfaced it with the RN yet.

P.S you bots looking lovely one of the best modified RN around, keep up the good work.

Bren
I'm very impressed. this is such a nice mod if not a bit mad :wink: . If you don't mind me asking what was wrong with using a PS2 wireless controller and having the PIC attached to the end dongle (this is what I'm doing) there's plenty of code floating about the internet to interface with most processors. Plus you get the added bonus of the buttons and the analogy signal.

But still this is a lovely job, have you interfaced it with the RN yet.

P.S you bots looking lovely one of the best modified RN around, keep up the good work.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Robo1 » Sun Aug 26, 2007 12:29 pm

Post by Robo1
Sun Aug 26, 2007 12:29 pm

Just a quick note about what to do with the analogy signal you could use the value to change the speed setting e.g. the more you push the stick forward the faster it walks/Greater the speed setting.

Just a thought Bren
Just a quick note about what to do with the analogy signal you could use the value to change the speed setting e.g. the more you push the stick forward the faster it walks/Greater the speed setting.

Just a thought Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by NovaOne » Sun Aug 26, 2007 1:03 pm

Post by NovaOne
Sun Aug 26, 2007 1:03 pm

.... lovely job, have you interfaced it with the RN yet.

Sorry I forgot to mention it talks to RN fine.

I'm very impressed. this is such a nice mod if not a bit mad Wink . If you don't mind me asking what was wrong with using a PS2 wireless controller and having the PIC attached to the end dongle (this is what I'm doing) there's plenty of code floating about the internet to interface with most processors. Plus you get the added bonus of the buttons and the analogy signal.

I was going to make a decoder dongle, however I couldn't find information I understood well enough to write the code for one myself. Could you link to suitable dongle information for RN? I might still do as you suggest, if its simple enough?

I did not explain the analogue stuff that well the PIC has four analogue ports that I have connected to and I have the read the values that I could send, to the RN, but I'm unsure how often to refresh the read value, so that I don't swamp RN with data.
P.S your bots looking lovely, one of the best modified RN around, keep up the good work.

Bren

Thanks for your complements ... I doubt it will perform that well when it comes to the Robo-One games...in the UK? I spend way to much time "upgrading" instead of programming moves.

Chris

PS I can't wait to see your New Robot when its finished. I always check out you build posts to see how its coming along. Are you going to travel to the US, Korea and/or Japan to compete?

Bren
.... lovely job, have you interfaced it with the RN yet.

Sorry I forgot to mention it talks to RN fine.

I'm very impressed. this is such a nice mod if not a bit mad Wink . If you don't mind me asking what was wrong with using a PS2 wireless controller and having the PIC attached to the end dongle (this is what I'm doing) there's plenty of code floating about the internet to interface with most processors. Plus you get the added bonus of the buttons and the analogy signal.

I was going to make a decoder dongle, however I couldn't find information I understood well enough to write the code for one myself. Could you link to suitable dongle information for RN? I might still do as you suggest, if its simple enough?

I did not explain the analogue stuff that well the PIC has four analogue ports that I have connected to and I have the read the values that I could send, to the RN, but I'm unsure how often to refresh the read value, so that I don't swamp RN with data.
P.S your bots looking lovely, one of the best modified RN around, keep up the good work.

Bren

Thanks for your complements ... I doubt it will perform that well when it comes to the Robo-One games...in the UK? I spend way to much time "upgrading" instead of programming moves.

Chris

PS I can't wait to see your New Robot when its finished. I always check out you build posts to see how its coming along. Are you going to travel to the US, Korea and/or Japan to compete?

Bren
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by NovaOne » Sun Aug 26, 2007 2:42 pm

Post by NovaOne
Sun Aug 26, 2007 2:42 pm

Bren,:idea: thanks for the analogue speed adjustment suggestion.

I also meant to ask about your sparkfun compass unit, have you fitted it to your KHR?

...please update your build thread as soon as you can. :shock: Your Robot is going to be world class :!: From the looks of it you are looking to sell your design to a manufacturer :?:

What gumstix unit are you going to use?

Chris
Bren,:idea: thanks for the analogue speed adjustment suggestion.

I also meant to ask about your sparkfun compass unit, have you fitted it to your KHR?

...please update your build thread as soon as you can. :shock: Your Robot is going to be world class :!: From the looks of it you are looking to sell your design to a manufacturer :?:

What gumstix unit are you going to use?

Chris
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by Robo1 » Sun Aug 26, 2007 4:59 pm

Post by Robo1
Sun Aug 26, 2007 4:59 pm

Hi NovaOne

For the PS2 Controller have a look at this Link page 3 has a simple diagram for hooking up a controller. As far as the code goes I have some for a stamp that I will rewrite in C when I have the time. It looks like:



Code: Select all
'{$STAMP BS2}

'****************************************************************************************
'* Title: Playstation interface
'*
'*    Filename: Program 1
'*    Date: 28 Mar 02
'*
'****************************************************************************************
' I/O Assignment and TRIS:

     clk         con   0
   att         con   1
    dat         con   2   
   cmd         con   3   
'****************************************************************************************
' Variables:
   index         var    byte
   char         var   byte
'****************************************************************************************
main:
   low    att                  ' select the PSX controller
   shiftout cmd,clk, LSBFIRST,[$01,$42]   ' send "get ready" and "send data"
   shiftin   dat, clk, 3, [char]      ' read then discard this byte, it
   shiftin   dat, clk, 3, [char]      ' 1st "digital" byte - left switches

   debug   bin char, " "            ' debug window binary format

   shiftin   dat, clk, 3, [char]      ' 2nd "digital" byte - right switches

   debug   bin char, " "            ' debug window binary format

   shiftin   dat, clk, 3, [char]      ' right joystick left / right

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' right joystick up / down

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' left joystick left / right

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' left joystick up / down   

   debug   dec char, CR            ' debug window dec format and return

   high   att

goto main
Hi NovaOne

For the PS2 Controller have a look at this Link page 3 has a simple diagram for hooking up a controller. As far as the code goes I have some for a stamp that I will rewrite in C when I have the time. It looks like:



Code: Select all
'{$STAMP BS2}

'****************************************************************************************
'* Title: Playstation interface
'*
'*    Filename: Program 1
'*    Date: 28 Mar 02
'*
'****************************************************************************************
' I/O Assignment and TRIS:

     clk         con   0
   att         con   1
    dat         con   2   
   cmd         con   3   
'****************************************************************************************
' Variables:
   index         var    byte
   char         var   byte
'****************************************************************************************
main:
   low    att                  ' select the PSX controller
   shiftout cmd,clk, LSBFIRST,[$01,$42]   ' send "get ready" and "send data"
   shiftin   dat, clk, 3, [char]      ' read then discard this byte, it
   shiftin   dat, clk, 3, [char]      ' 1st "digital" byte - left switches

   debug   bin char, " "            ' debug window binary format

   shiftin   dat, clk, 3, [char]      ' 2nd "digital" byte - right switches

   debug   bin char, " "            ' debug window binary format

   shiftin   dat, clk, 3, [char]      ' right joystick left / right

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' right joystick up / down

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' left joystick left / right

   debug   dec char, " "            ' debug window decimal format
   shiftin   dat, clk, 3, [char]      ' left joystick up / down   

   debug   dec char, CR            ' debug window dec format and return

   high   att

goto main
Last edited by Robo1 on Sun Aug 26, 2007 5:08 pm, edited 1 time in total.
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Robo1 » Sun Aug 26, 2007 5:06 pm

Post by Robo1
Sun Aug 26, 2007 5:06 pm

As far as the other projects are coming along:

KHR-2, will hopefully finished end of next month with:

Gumstix - Openservo + new shin bits.

I've been making a sensor boards for him with 5 imu and a compass from funspark + a ATmega168 to handle them. Finished the prototype board just need to make a eagle file and send away for it to be made up.

The main projects coming along nicely have about 60% of him built and have spent a stupid amount of time painting and sanding him (2 whole weeks). He's so shiny you could shave with him. You just have to wait a week or so until I update mt thread with some new pics. I even went and brought titanium screws through out to give him that added touch.

Bren
As far as the other projects are coming along:

KHR-2, will hopefully finished end of next month with:

Gumstix - Openservo + new shin bits.

I've been making a sensor boards for him with 5 imu and a compass from funspark + a ATmega168 to handle them. Finished the prototype board just need to make a eagle file and send away for it to be made up.

The main projects coming along nicely have about 60% of him built and have spent a stupid amount of time painting and sanding him (2 whole weeks). He's so shiny you could shave with him. You just have to wait a week or so until I update mt thread with some new pics. I even went and brought titanium screws through out to give him that added touch.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by NovaOne » Sun Aug 26, 2007 5:55 pm

Post by NovaOne
Sun Aug 26, 2007 5:55 pm

Hi Bren,

Cheers, I'll go through the Nuts and Volts article and see what i can make of it.

It appears to be a dongle for a wired PS2 controller, do you know of any good links/info. on Bluetooth PS2 decoding without an intermediate PC. Is this what you said you used or are currently working on?

Do you know if any of the wireless hacks provide force/vibration feedback?

I've been thinking, :roll: at the moment all my comms is from the Gamepad to the RN, proper handshaking will make it easier to control the flow of the stick position information also I could refit a vibration motor and activate it from RN when.............

Again thanks for your help. :D
Hi Bren,

Cheers, I'll go through the Nuts and Volts article and see what i can make of it.

It appears to be a dongle for a wired PS2 controller, do you know of any good links/info. on Bluetooth PS2 decoding without an intermediate PC. Is this what you said you used or are currently working on?

Do you know if any of the wireless hacks provide force/vibration feedback?

I've been thinking, :roll: at the moment all my comms is from the Gamepad to the RN, proper handshaking will make it easier to control the flow of the stick position information also I could refit a vibration motor and activate it from RN when.............

Again thanks for your help. :D
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by Robo1 » Sun Aug 26, 2007 7:25 pm

Post by Robo1
Sun Aug 26, 2007 7:25 pm

Hi

I'm using one of These at the moment haven't tried it with my setup as I've had other things on. You can see the dongle in the bottom left corner. but in theory it should be the same as the wired version. You could then have a PIC running this and get robobasic communicate to communicate with the PIC. Or try running it off the standard board. Try getting a wire one and give it a go. I got one free of a mate theres plenty kicking around.

Bren
Hi

I'm using one of These at the moment haven't tried it with my setup as I've had other things on. You can see the dongle in the bottom left corner. but in theory it should be the same as the wired version. You could then have a PIC running this and get robobasic communicate to communicate with the PIC. Or try running it off the standard board. Try getting a wire one and give it a go. I got one free of a mate theres plenty kicking around.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by NovaOne » Sun Aug 26, 2007 8:05 pm

Post by NovaOne
Sun Aug 26, 2007 8:05 pm

Thanks. :oops:
I understand now; a wireless controller for a wired console...I'm so dim... :!:

Well I'd better make the best of my expensive-cheap home made one now.

Sorry to repeat my self but do you or any one know if any of the wireless provide force/vibration feedback when used with RN? This maybe my one saving feature :roll:

Anyway I'll get back to reinventing the wheel.......octagonal shape might work.....

Chris
Thanks. :oops:
I understand now; a wireless controller for a wired console...I'm so dim... :!:

Well I'd better make the best of my expensive-cheap home made one now.

Sorry to repeat my self but do you or any one know if any of the wireless provide force/vibration feedback when used with RN? This maybe my one saving feature :roll:

Anyway I'll get back to reinventing the wheel.......octagonal shape might work.....

Chris
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by BillB » Sun Aug 26, 2007 9:45 pm

Post by BillB
Sun Aug 26, 2007 9:45 pm

Looks great NovaOne.

The wireless XBoX controller that I use to control my robots has a force feedback feature but I have not had found any practical use for it yet. Perhaps it could vibrate when the robot falls, or even vibrate when the battery levels are getting low but neither seem worth the effort.

I have been experimenting with using the analogue XboX joystick to control direction (for the 3m dash event). In theory it works great in practice I am finding it really really difficult to make a series of gaits with gradually increasing turning arcs.

Keep up the fantastic work on your RN1.
Looks great NovaOne.

The wireless XBoX controller that I use to control my robots has a force feedback feature but I have not had found any practical use for it yet. Perhaps it could vibrate when the robot falls, or even vibrate when the battery levels are getting low but neither seem worth the effort.

I have been experimenting with using the analogue XboX joystick to control direction (for the 3m dash event). In theory it works great in practice I am finding it really really difficult to make a series of gaits with gradually increasing turning arcs.

Keep up the fantastic work on your RN1.
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by NovaOne » Sun Aug 26, 2007 10:36 pm

Post by NovaOne
Sun Aug 26, 2007 10:36 pm

Thanks,

How do you control direction?

Do you have hip rotation?

Chris
Thanks,

How do you control direction?

Do you have hip rotation?

Chris
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by BillB » Sun Aug 26, 2007 11:07 pm

Post by BillB
Sun Aug 26, 2007 11:07 pm

I am trying to control the direction of the stanndard RN1 by modifying the July 07 highspeed gaits on the Robonova website. By tweaking the gait I can make the RN1 veer either left or right. Changing the direction (albeit inaccurately) can be done reativelly easily without the hip rotation on the RN1.

Now...the first challenge has been to tweek the walking gait so that it veers without losing speed (so that walking forward is a similar speed to veering to the side). The second challenge is to have a suite of gaits that veer increasing amounts (proportional to analogue displacement). The third challenge has been to make these gaits consistent. My RN1 seems to veer to the left better than to the right & inconsistencies on the walking surface can also make abrubtly exagerate the direction change.

I started experimenting with adding arm swing to the gait - hopefully that will provide some direction consistency.
I am trying to control the direction of the stanndard RN1 by modifying the July 07 highspeed gaits on the Robonova website. By tweaking the gait I can make the RN1 veer either left or right. Changing the direction (albeit inaccurately) can be done reativelly easily without the hip rotation on the RN1.

Now...the first challenge has been to tweek the walking gait so that it veers without losing speed (so that walking forward is a similar speed to veering to the side). The second challenge is to have a suite of gaits that veer increasing amounts (proportional to analogue displacement). The third challenge has been to make these gaits consistent. My RN1 seems to veer to the left better than to the right & inconsistencies on the walking surface can also make abrubtly exagerate the direction change.

I started experimenting with adding arm swing to the gait - hopefully that will provide some direction consistency.
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Post by NovaOne » Sun Aug 26, 2007 11:26 pm

Post by NovaOne
Sun Aug 26, 2007 11:26 pm

Sounds like a good plan.

I would like to do something similar with my compass heading routine (its far to slow at the moment) But with the robot moving the heading values are unreliable.
Do you just concentrate on one servo while you are tweaking eg the ankle angle as it touches or leaves the ground?

Chris
Sounds like a good plan.

I would like to do something similar with my compass heading routine (its far to slow at the moment) But with the robot moving the heading values are unreliable.
Do you just concentrate on one servo while you are tweaking eg the ankle angle as it touches or leaves the ground?

Chris
NovaOne
Savvy Roboteer
Savvy Roboteer
Posts: 405
Joined: Thu Jul 05, 2007 7:30 am

Post by BillB » Sun Aug 26, 2007 11:45 pm

Post by BillB
Sun Aug 26, 2007 11:45 pm

I found the best approach to tweaking the gaits was to modify two servos on a limb in oppositte directions . So if you move the ankle by 7 units then adjust the knee by -7 units.

This helps to keep the feet parallel to the ground (a dragging heel or toe slow's the gait alot).
I found the best approach to tweaking the gaits was to modify two servos on a limb in oppositte directions . So if you move the ankle by 7 units then adjust the knee by -7 units.

This helps to keep the feet parallel to the ground (a dragging heel or toe slow's the gait alot).
BillB
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 232
Joined: Sun Aug 06, 2006 1:00 am
Location: Hampshire, UK

Next
32 postsPage 1 of 31, 2, 3
32 postsPage 1 of 31, 2, 3