Re: 2nd Gen Prius into....Not sure yet.

Tell us about the project you do with the open inverter
Post Reply
tonycoke
Posts: 6
Joined: Fri May 03, 2024 8:56 pm
Has thanked: 3 times

[WIP] 2nd Gen Prius into....Not sure yet.

Post by tonycoke »

I'm tonycoke from Dallas TX.
I bought a 2006 Prius for $350, unplugged the buzzer that came on when the anti-lock break module goes out, then drove it for about 20k miles.
I never could get the title for it and at 325,000 miles, I dismantled it, and now my goal is to make one of my old cars hit 40 mph, so I can drive the .5 miles to work and back home.

I'm starting this thread in hopes it saves someone a headache or two.


Thank you to everyone on this forum, you are all much smarter than I.

Image
tonycoke
Posts: 6
Joined: Fri May 03, 2024 8:56 pm
Has thanked: 3 times

Re: 2nd Gen Prius into....Not sure yet.

Post by tonycoke »

First set of problems...

I took the Prius apart a little bit at a time, making sure everything still worked after I would remove something, with the hopes of using the factory electronics. I cut a wire that stopped it from running and I wasn't able to figure out what it was, so I decided it was time for a Prius Gen 2 inverter board.

I was going to just buy one (which I probably should have and very possibly may do), but after watching hours of Damien's and Johannes's videos, I had gerber files uploaded to JLBPCB and PCB boards were heading my way.
What I didn't realize, is that if you don't upload a BOM file, you get a blank board.
I got 5 blank boards and I really appreciate the time and knowledge that went into creating them and sharing them.
tonycoke
Posts: 6
Joined: Fri May 03, 2024 8:56 pm
Has thanked: 3 times

Re: 2nd Gen Prius into....Not sure yet.

Post by tonycoke »

I received a couple of Olimex MOD-WIFI-ESP8266 modules from DigiKey and I got two STM32 Blue Pills with an ST-Link programmer from Amazon.
I had no clue what to do, but I thought maybe I could get the wifi card operating before I tried soldering anything to the controller board.

Here's how I programmed the newer (as of this post 5/24/24) Olimex MOD-WIFI-ESP8266.
Older posts on here talk about soldering jumpers on the Olimex, this is no longer necessary because there is now a little button on the board that changes it's mode.

Problem: I didn't know how to talk to this board.
Turns out you need an FTDI usb to serial adapter.
I happened to find one in a drawer that I bought for something but never used, so I didn't have to order one.

Problem: The female connectors from the usb to serial device don't fit into the female connectors this Olimex ESP8266.
I cut up a guitar string to jumper between them, keeping them very short.

Problem: I didn't know what pin was what.
Looking closely at the Olimex board, on one side there is a 2 next to the connector. That pin is ground. The pin below/above that is pin 1, which is 3.3v power. The pins next to pins 1 and 2 and the TX transmit and RX receive. I'm not sure which is which, I had them backwards at first.

Next I downloaded the Arduino program, Arduino IDE from Arduino's website and installed it.

Then I downloaded Johannes's ESP8266 web interface from https://github.com/jsphuebner/esp8266-web-interface.
I downloaded the zip file, then moved the folder it created over to /home/Arduino/libraries.
I'm on Ubuntu linux, so you'll have to figure out where your Arduino directory is on your own.

I also downloaded this plugin - https://github.com/esp8266/arduino-esp8266fs-plugin
I extracted it and copied it over so that there ends up being a file path: home/Arduino/tools/ESP8266FS/tool/esp8266fs.jar
Had to create the tools directory manually.

The next step was to get the computer to see the ESP8266 board.
First, I thought it would plug in to the ST-Link adapter... That doesn't work.
That's when I found my FTDI adapter, plugged the 3.3v pin on the FTDI into into pin 1 on the Olimex, and the FTDI ground pin into pin 2 on the Olimex. I plugged the FTDI into a usb port and it lit up.

Problem: I fired up Arduino IDE, went to Tools>Port and it was showing /dev/ttyS0, which was not correct.
If I only plugged in the FTDI adapter without the Olimex plugged into that, Arduino IDE showed port /dev/ttyUSB0 available.
When I plugged the Olimex in, it went away.
After some research, I saw some people said their ESP8266 pulled more power than their FTDI adapter could supply.
I ended up using the ST-link adapter that came with the STM32 Blue Pill and connecting the 3.3v power and ground from that to the Olimex.
So with the TX and RX from the ESP8266 plugged into the FTDI, and Arduino IDE showing the /dev/ttyUSB0 port, I plugged in the ST-link to another usb port and the ESP8266 turned on and Arduino IDE was still able to see /dev/ttyUSB0.

Image

After a while, I figured out I could go to the Arduino/libraries/ folder that I copied over and click on the .ino file and it would launch Arduino IDE with the correct sketch.
When I hit the right arrow to flash the ESP8266, it wouldn't connect.

After some trial and error, I got it to connect by unplugging power from the ESP8266, holding down the tiny little button on the ESP8266, then plugging it back in and while continuing to hold down the button, I then hit the right arrow in Arduino IDE to start the flash. It finally connected after compiling the sketch, then I could let go of the button.

I was getting errors about .h files and SPIFFS.
To help this, I went to Tools>Flash Size and changed it to 2MB (FS:1MB blah blah)
Then I reflashed it and it looked pretty promising, with only a few errors.

After reading a post by "vin", he said you then have to click Tools, then ESP8266 Sketch Data Upload.
It did some more stuff and no errors! So I guess the first part you're flashing the program, and the 2nd part, you're flashing the data, I dunno.

I checked available wifi networks on my phone and saw one that started with ESP!
It connected, I opened a browser and went to 192.168.4.1..... and it timed out finding nothing.
Checking the wifi, the phone had an ip address of .4.2, so I knew the ESP8266 was working and my phone was connecting.

After some more crap, I turned off cellular data and tried it again and it pulled up the dashboard!!!



Next step: figure out what all the items are on the BOM list, order it all and get it soldered to the board.
Or just buy a pre-done board.
Attachments
image.png
Post Reply