Sometimes its best to cleanse with fire....

A project log for Automated Living Car Integration

This is the aspect of the automated living project for car use

James WynhoffJames Wynhoff 04/23/2018 at 17:080 Comments

Over the weekend a few things happened, we bought a new car, and I was doing the PCB layout for the communications hub / power controller.

The car we got was a Ford C-Max Energi, and it turns out pretty much all the cool data I would want is on the OBDII connector, but it was on the MEDIUM SPEED BUS!!!

What the hell is that?

I'm glad you asked! The pins it uses are on the "manufacturers choice" set of pins, but its just another can bus, its exactly the same except the speed of the other can bus. There are endless people selling "modified" elm327 hardware to work on this bus, almost 100% consisting of people wiring in a DPDT switch to mechanically switch the wiring feeding the can bus level shifter.

I set out to instead of this mechanical hack, use the CAN hardware in the STM32f103, but here is the first problem, using USB and CAN are mutually exclusive, they both share an interrupt...... 

I asked myself why I was using this particular solution, why what I using an arduino based solution?

I had the hardware, and it was easy.

we are programmed to make things easy for us to do, and I had done it, I had thrown an arduino in because I had it, and it was an easy solution, hell, everything I wanted to do I'm sure had libraries even, a little glue code and I'm in to other things. I don't care if its overkill, or if a 555 can do it, if it works I'm all for it.

But then it didn't work...

Once I was done trying to fit the hardware design choices to fit the limitations of the processor I chose, life got a lot easier.

I fell back to my good friend the P8X32A, more specifically the P8X32A-Q44, made by parallax, its a fun chip that doesnt get much love. Hopefully this changes that. the great thing about this is besides objects being written for specific pin alignment, all pins are made equal. 4 serial ports at 115k each? 1/8 cores used, NEXT. SPI for radio and SD card? 2/8 cores used, NEXT. high speed i2c? 3/8 cores used, NEXT. 1 5Mbit serial port? 4/8 cores used, NEXT.  glue/logic 5/8 cores used, and 3 for communications with the car, however that happens to be.

I redid my entire diptrace project for this. I'm putting the last few connectors on the board base on whats available on ali express, then ill post them :)