1. Attachments are working again! Check out this thread for more details and to report any other bugs.

power steering hacking

Discussion in 'Gen 2 Prius Accessories & Modifications' started by anthony.pray, Mar 3, 2008.

  1. V8Cobrakid

    V8Cobrakid Green Handyman

    Joined:
    Jun 6, 2004
    3,790
    152
    0
    Location:
    Park View, Los Angeles, CA. U.S.A
    Vehicle:
    2004 Prius
    Model:
    N/A
    bump...

    how's the project going?
     
  2. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    UPS:
    Scheduled Delivery: 03/24/2008
    The part was on back order...:(

    O took the car into the dealer yesterday for the 25000 maintenance, they did not say any thing about the new switch and DB9 connector that was installed.

    I dont have a way of reading read the canbus data. The Make controller might be able to encode/decode CAN frames but I do not know much about CAN. It might provide a simpler interface? Any one now how the pearly parking prius cars are interfacing in to the steering?
     
  3. ken1784

    ken1784 SuperMID designer

    Joined:
    Dec 18, 2003
    2,943
    1,378
    67
    Location:
    Yokohama, JAPAN
    Vehicle:
    2010 Prius
    Model:
    N/A
    The new 2004 Toyota Prius : My CAN Project
    The main brain is IPA computer, which interface are...
    [INPUT]
    - NTSC video from backup camera
    - height signal from height sensor
    - switch signal from IPA switch
    - CAN messages

    [OUTPUT]
    - RGB video to MFD
    - AVC-LAN message to MFD
    - voice to speaker
    - CAN messages

    [CAN messages]
    - steering angle from steering angle sensor
    - target steering angle to power steering computer
    - torque/actuator status from/to power steering computer
    - vehicle speed status from/to skid control computer
    - motor angle/shift status from HV control computer

    Ken@Japan
     
  4. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    ken1784 thanks for the info.
    I might know now what that "outer" sensor was. It might be the "steering angle sensor"
    I do not know any thing about CAN or how it works. Hear is the C library I have to work with for CAN.
    Can.c
    Can.h

    Ken if you know enough about CAN to help out / point me in the right places to look, That would be wonderful.

    I did get my package, But I am having some problems getting the DAC to function.
    Hear is the DATA Sheet for the TLC7524
    I did try to set up the example on Pg.5 but it did not seem to work.
    I did not have an spare Op-Amp, to try out Figure 3., but will try to get one today.
     
  5. ken1784

    ken1784 SuperMID designer

    Joined:
    Dec 18, 2003
    2,943
    1,378
    67
    Location:
    Yokohama, JAPAN
    Vehicle:
    2010 Prius
    Model:
    N/A
    The source code is written for Atmel AT91SAM7X256 microprocessor.
    If you're familiar with the Atmel device programming including device architecture, register set parameters and others, it's not a big deal. But, if you're not, it's tough for you, I think.
    Have you visited Attila's site shown before?
    The new 2004 Toyota Prius : My CAN Project

    Attila uses CAN232 device which does very simple job, CAN messages <-> RS232C data strings.
    The software source codes are placed on his software page.
    The new 2004 Toyota Prius : My CAN Project

    The CAN message list is shown as a spreadsheet.
    http://vassfamily.net/ToyotaPrius/CAN/PriusCodes.xls
    The IPA system implementation is very simple and does not use additional DAC or anything.
    All controls are done by the IPA computer.
    The IPA system uses the standard power steering computer and the power steering assembly, no interface change for the IPA system.
    The IPA computer just sends CAN messages to control the power steering assembly.

    Ken@Japan
     
  6. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    Got the DAC to work, and will be finishing up the controller board for it.

    As far as CAN, I think it is a grate idea but, I do not have the hardware or the knowledge of the CAN system to do what I want. I do believe it may provide a beater interface, it may be come the platform I launch my new project form.

    Will be posting video of the new controller, interfaced with the PC and a joy stick. Test if the software is working properly.
    This may be a few days thou.
     
  7. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    So wow, a few months its been now, i started a new job, so i have not had any time to work on this much, but i looks like i got a current controller not voltage. so the first tests did not go. i have a new controller on order and will be hear on the 19th.

    allso been fine-tuning the software, should have a working state line system in a few more days.
    -tft
     
  8. Bill Merchant

    Bill Merchant absit invidia

    Joined:
    May 3, 2005
    4,096
    82
    13
    Location:
    USA | Oregon | Portland area | 97004 |
    Vehicle:
    2007 Prius
    Let me know when you have something. I think the local group will be interested in what you're doing.
     
  9. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    Re: power steering hacking eliminating the smear!!!

    So after hours working with the timing for the new chip and some fancy new hardware, I HAVE A WORKING system!!!
    There has been some long hours, distorting 3 2051(8051)chips, and ~ 15 NPN's (ended up not using any)

    Found out that using the car's voltage for running my circuit not a good plan, looks like it frys the gated outputs on my 2051's so after distorting 3 of them I stopped, lol.

    I did the first test to day and hear is a short video of it in action.

    [ame="http://www.youtube.com/watch?v=-baRssym-Fo"]Prius Digital Steering Interface[/ame]

    IC used.
    MCP41050 256 Step SPI 50kOhm
    A89C2051 2kB Flash, 128B RAM

    What's the status you ask?
    1) I have a working tracking software for the road.
    2) The computer controlled steering is all most dun, it is computer controlled but not yet verbal speed for rate of turning(see video).
    3) Need to locate the angel sensor(I think i know where it is, no time today to test.)
    4) complete the interface software for the steering once the angel sensor is incorporated.
    5) Distance sensor for added automation.
     
  10. hiremichaelreid

    hiremichaelreid New Member

    Joined:
    May 8, 2008
    451
    6
    0
    Location:
    Ottawa/Aylmer, Canada
    Vehicle:
    2008 Prius
    Model:
    I
    Wonderful.

    I'm following your project with interest.

    Is everything needed drive by wire ? I'm looking forward to "remote control" or autonomous Prii. From a technical perspective and under safe conditions of course. :)
     
  11. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    Houston we hit a snag,
    I was right about the location of the steering angle sensor, rember the photo of the thing I thought was the PS TQR sensor the one with the 5 wires. well its the steering angle sensor, but bad news its a CAN interface.
    there might be a way to tap into it but its contacted right behind the whell and you would haft to remove the stering whell to get to it.
    (not going to happen)
    So its looking like i'm going to haft to use CAN.....:mad:


    I know this Would be a lot easer if i was using CAN in the first place ( ken1784 the sites you gave me a wile back are down now:( )
    I don't really have the extra cash to buy the $$$108 can adaptor right now. any no of a chipper solution??

    I'm going to see if the make controller's CAN interface might work or if I can make one with some 2051's
     
  12. Jack66

    Jack66 Kinda Jovial Member

    Joined:
    Jan 26, 2008
    766
    6
    0
    Location:
    Stafford, Virginia
    Vehicle:
    2008 Prius
    Awesome project! It reminds me of the "autodrive" and "selfdrive" features in the Demolition Man movie.

    Three quick questions/comments...

    I can't see your videos where I am -- does the steering wheel stay motionless when you control the steering electronically? I was curious about what happens if you switch from manual to automatic and back again if the steering wheel position makes a difference. For example, if the steering wheel is in a turning position from the turning sensors but you switch while going straight...

    The intelligent parking was mentioned briefly but not really discussed. Not only would that be cool but it would be a non-threatening way of proving the worth of your project.

    For your sake I was hoping you wouldn't have to go through the CAN. I am interested in how to make the CAN recognize other "legitimate" devices but not at your expense. Pulling information from the CAN seems relatively simple -- getting the CAN to recognize your controller and accept its input is an entirely different problem.

    I don't know if Toyota makes different ECU/CAN chips for the different versions of Prii. If the chips are different then they may be hardwired for a limited number of devices. Maybe someone tries to add an OEM device that wasn't in their original package and it doesn't recognize it even though Toyota made it. Maybe Patrick Wong or Ken knows the answer about different chips.
     
  13. livininspirit

    livininspirit New Member

    Joined:
    Apr 21, 2008
    27
    1
    0
    Location:
    Corona, CA
    Vehicle:
    Other Non-Hybrid
    Wow, this is awsome stuff! I'm an EE grad student working on autonomous cars. I have all the software needed to autonomously control an electric golf cart... I would LOVE to interface that to my prius and it looks like its very simple!!

    A few questions:
    Since to read the steering angle requires the can bus, is there anyway to just tell the ECU to turn for example.. 10 degrees to the left? Or is that also on the can bus??
    Without steering angle data.. it might be a bit tough to be fully autonomous..
    Have you tried to tap into the drive by wire accelerator pedal yet?
    How about the brakes?

    I hope they're also as simple as 0 - 5V....
     
  14. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    All the controllers are on the CAN buss
    the power steering is on the CAN buss but the sensor that tell the CAN controller for the power steering is "tapeable" where the Angel sensor is "tapeable" it would require removing of the steering wheel to gan access to the board to reverse engineer the tap. i would do it but i have no way to remove the wheel. I do have access to the backside of the board but with out knowing what pins to tap it so no good. as far as the "gas" and "brake" i'm not messing with at thins point. the cruse control is a simple duplex voltage a 1 wire system. The plan is to get on a highway flip a switch and it just cruse down the road. one thing that is cool about the prius' cruse-control is the fact it can slow down the car... fairly fast... try it put it in cruse-control then with out canceling it pull down on the leaver you can feel the car slowing...

    Good point about the reading/writing to the CAN-buss did not even consider that fact.

    soo... any one remove there stering wheel for some reason and want to take a few photos for me???:rolleyes::D:D

    livininspirit by the way I am just a (21 year old) hobbits with no formal training in any of this... If have any good web sites, old books, or docs that you think might some how pertain to any of the subject of this project I can never get enough!!
     
  15. Jack66

    Jack66 Kinda Jovial Member

    Joined:
    Jan 26, 2008
    766
    6
    0
    Location:
    Stafford, Virginia
    Vehicle:
    2008 Prius
    If you are just trying to tap into the CAN and read the angle sensor then you don't have to take anything apart. There are different CAN readers that hook directly to the CAN data port under the dash about where your right knee is when driving. Hook into that and you have tapped into all the data that is sent over the IEBus.
     
  16. livininspirit

    livininspirit New Member

    Joined:
    Apr 21, 2008
    27
    1
    0
    Location:
    Corona, CA
    Vehicle:
    Other Non-Hybrid
    if i use the existing OBDII port to try to read my steering angle data... how fast can I sample it?

    To autonomously drive the car like the ones they have in DARPA i'd need steering angle reading at at least 20Hz.
     
  17. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    wiki says this about it.

    ISO 9141-2. This protocol has a data rate of 10.4 kbaud, and is similar to RS-232. ISO 9141-2 is primarily used in Chrysler, European, and Asian vehicles.
    pin 7: K-line
    pin 15: L-line (optional)
    UART signaling (though not RS-232 voltage levels)
    K-line idles high
    High voltage is Vbatt
    Message length is restricted to 12 bytes, including CRC

    so it looks like 20hz would be no problem.
     
  18. ken1784

    ken1784 SuperMID designer

    Joined:
    Dec 18, 2003
    2,943
    1,378
    67
    Location:
    Yokohama, JAPAN
    Vehicle:
    2010 Prius
    Model:
    N/A
  19. livininspirit

    livininspirit New Member

    Joined:
    Apr 21, 2008
    27
    1
    0
    Location:
    Corona, CA
    Vehicle:
    Other Non-Hybrid
    sweet, now one question... perhaps most important one..

    I've never reallly messed with the canbus onboard. How in the world do i get the can data?

    I know you can buy some OBDII to serial converters.. would I then use that and then send some kind of request command to 0x25? and then it'll spit the steer angle data to me?

    Pretty much I want to know... If I have a microcontroller with can port on it.. I'm using the HC12's from freescale (got bunch of free ones in school). I know how to use every feature on the HC12 EXCEPT the can ports... any idea how to use those?

    Or if i skip the microcontroller hook it up straight to my RS232 port on the computer.... how then would I get steer angle data?


    Thanks!
     
  20. anthony.pray

    anthony.pray New Member

    Joined:
    Nov 9, 2006
    29
    1
    0
    Location:
    Oregon City
    Vehicle:
    2006 Prius
    thanks i was having problems getting to gi & Attila Vass's Homepage...
    the last week or so the site looks to have been down or my dns servers where not working.
    I was going to use the site, it seems to be back now :high5: