Author Topic: STN1110 / PIC24HJ128GP502 OBDII chip  (Read 5138 times)

0 Members and 1 Guest are viewing this topic.

Offline StonentTopic starter

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
STN1110 / PIC24HJ128GP502 OBDII chip
« on: July 23, 2014, 03:56:27 pm »
I already have an OBDII to Bluetooth dongle I picked up from Aliexpress a few years ago and it has worked well, but apparently most of these used pirated firmware that was extracted from an ELM327 (PIC18 based) that didn't have the locks enabled.

So now there's a company called OBD Solutions that makes a competing product that is PIC24 based called the STN1110.  Which is faster, has more flash, more ram, and is cheaper than the ELM327 chip so I thought I wonder if I could somehow hack this chip into the dongle and use it instead?
Fortunately OBDSolutions has a free sample program so I picked up a few.  According to the datasheet (linked below) the desired configuration uses an MCP2551 CAN transceiver and well looks like MCP was offering that on sample as well, so I picked up a few. (One of the nice things of being in college right now is the .EDU address helps with sample procurement)

So first things first, I am relatively new to PICs having started on Arduino and then started playing around with bare AVRs.  So I did make a few incorrect assumptions about what I could do with the chip.

The existing PIC18 chip is a 5V device all the way through, running at 4MHz and the PIC24 is 3.3V with some 5v tolerant parts.  The firmware as loaded by OBD Solutions is set for 16MHz operation so that's a problem as well.

At this point, I'm thinking my best bet is to breadboard up something and just somehow jumper over to the RX and TX lines on the BT module.

I have several 16MHz 3 pin ceramic resonators that I've used with no problems on some AVRs, do you think that's sufficient for a PIC24?  The datasheet only mentions a 16MHz crystal with some 30pF caps.  Ordinarily I would think the resonator would be fine but in the datasheet they show the crystal and caps tucked under a guard ring, but then specify no more than 12mm spacing between the crystal and PIC.

I also like this line:
Quote
Use good engineering practices and common sense to make sure the specific parts you choose are appropriate for your application.

Well, guess I'm screwed there.  ;D

And finally, what does VCAP do? It says needs to be 4.7uF, recommended 10uF, low ESR.  It mentions some kind of logic filter but I'm not really sure that they mean by that.  I've attached their recommended schematic for the PIC24 and the MCP2551.

http://www.scantool.net/scantool/downloads/97/stn1110-ds.pdf
The larger the government, the smaller the citizen.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 8177
  • Country: ca
  • Non-expert
Re: STN1110 / PIC24HJ128GP502 OBDII chip
« Reply #1 on: July 23, 2014, 09:28:39 pm »
Quote
A low-ESR (< 5 ?) capacitor is required on the VCAP pin, which is used to stabilize the internal voltage regulator output voltage. The VCAP pin must not be connected to VDD, and must have a capacitor between 4.7 ?F and 10 ?F, 16V connected to ground. The type can be ceramic or tantalum.
Typical VCAP voltage = 2.5V when VDD ? VDDMIN.

Its a lower voltage rail, perhaps for the CPU core. Usually this is done to reduce power consumption. But in this sort of product maybe there is another reason.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf