• L'Assemblée Générale du Prius Touring Club aura lieu le 7 décembre 2024 du côté de Rennes. Si vous êtes adhérent renseignez-vous ici.

MBED, Arduino , STN1110 & BT

  • Initiateur de la discussion Initiateur de la discussion priusfan
  • Date de début Date de début
Please, consider and criticize my file http://xomti.com/CAN_NHW20.html
It contains some new informations.

0B4 and 230 have probably the same contents in P2 and P3.
230 contains the number of 1/192 rear weels turns (approx 10 mm). Its a very high precision odometer (if the speed if > some value) !
 
@kinetik
thx for your feedback.

we are waiting after you for a protocol & ideas to validate/unvalidate our results regarding a polyvalent & autonomous interface.

ideas:
create an interface connected to the obd2 plug, using can only.

able to filter (according an external parm file) passive frames.

able to make requests according an external parm file whose content is request & periodicity,

able to forward results via usb or BT (so it could replace canusb, tactrix, obdlink).

able to store on sdcard, with a timestamp, either raw results or synthetic results.


@ vous les studios :-D
 
kinetik your work is for sure going to be a bible on its own! :jap: Looking at it for the first time gave me the same feeling as when I first found out about Attila and 0199-ME02-K! Thank you so much and please keep us updated as you make more progress. 😎
 
welcome Winston

regarding BT maybe it will work, as we are only forwarding frames, there is no dialog...

Torque supports BT, USB and wifi , I will contact Ian Hawkins when we will have something operational.

FYI, I teached Ian how to deal with multiframes... I showed him also how to make combined requests.

I had a big/bad surprise with mbed : modserial is not compatible with sdcard...
so I have to revert to serial(standard) when using sdcard.

sdcard is really tricky: I tested 3 differents microsd/ sdhc: 1giga, 4 giga & 16 giga, it was necessary to use differents tricks to access each of them....

I have a Sparkfun CAN Bus Shield that has a uSD. I think I logged information to it a few months ago. I will go and have a look at how it ties into the Arduino UNO.

Do you see a need for a GPS connector in order to get elivation changes if a GPS module is plugged in. An accurate Spedometer would be handy.

I will create a Visio Block Diagram and post it over the weekend.
 
- I would like a full long term log of current and SOC, in order to evaluate and understand charge losses of the HV battery.
....

How much time is long enough for the analysis? hours or days or months?
 
concerning gps, it could be better to have not an internal antenna, but an external one connected to your device using usb.
yes it could be great to have a precise altimeter.
 
I made a new release to forward only a synthesis of the calcs.
I send infos for ICE, MG1, MG2 & BATT 12 times/sec
I send others about temps "sometimes".
the program is in the FTP, the name is CAN_hsd_bt_0042.zip
there is also in the ftp a 5 minutes capture made using this program : capture003.txt
"22/04/2011 11:09:56",<BATT 1.320000 53.725490 216 216 20 20>
"22/04/2011 11:09:56",<ICE 0 0 51>
"22/04/2011 11:09:56",<MG1 0 0 30>
"22/04/2011 11:09:56",<MG2 -1 0 27>
"22/04/2011 11:09:56",<BATT 1.320000 53.725490 216 216 20 20>
"22/04/2011 11:09:57",<ICE 0 0 51>
"22/04/2011 11:09:57",<MG1 0 0 30>
"22/04/2011 11:09:57",<MG2 0 0 27>
"22/04/2011 11:09:57",<BATT 1.320000 53.725490 216 216 20 20>
"22/04/2011 11:09:57",<ICE 0 0 51>
"22/04/2011 11:09:57",<MG1 0 0 30>
"22/04/2011 11:09:57",<MG2 0 0 27>
for ICE, MG1 & MG2 , the fields are : rpm , torque , temp
for BATT : Amps, SoC, HVL , HVH and temps.

using this method, we transfer 2k Bytes /sec , so logging on SD or transfer via BT will be OK...

it is quite easy to add vars for instance ignition timing, FT and so on...

request.txt was:
// need a space after the last code, max line length 256
// 1 pos is ECU , second is period and FULL Message
//7E0 1 02 21 01 00 00 00 00 00 // ICE rpm, coolant temp
7E0 1 02 21 3C 00 00 00 00 00 // Inj
7E0 1 02 21 49 00 00 00 00 00 // ICE torque
7E2 1 03 21 61 67 00 00 00 00 // MG1 rpm, torque, temp
7E2 1 03 21 62 68 00 00 00 00 // MG2 rpm, torque, temp
7E2 1 02 21 8A 00 00 00 00 00 // Amp

7E2 200 02 21 01 00 00 00 00 00 // SoC
7E2 300 02 21 74 00 00 00 00 00 // BC temp, VLB VLH

7E0 400 03 01 3C 3E 00 00 00 00 // Cat temps
7E2 401 03 21 70 71 00 00 00 00 // Inv temps

7E2 500 02 21 87 00 00 00 00 00 // Batt temps
7E2 500 02 21 98 00 00 00 00 00 // DCL CCL
filterx.txt was:
// max line length 128
0B4 FF// this frame will give the exact speed
1C4 FF // ICE RPM
230 FF
245 FF // acc pedal
3D3 FF // fuel flow L/H
498 FF // coolant temp
4A6 FF //
63B 03 //
7E0 00
7E2 00
7E8 00
7EA 00
 
Dernière édition:
priusfan,

The Sparkfun/SKPang CAN-BUS Shield uses a MC74hc4050 buffer to drive uSD inputs.
 
ccdisce
they use this converter as a level converter for arduino boards (5V --> 3.3V).
they don't use it for mbed

I started logging on SDcard (1 giga)...

ps: I sent you an email.
 
Preliminary Design has been routed and occupies 3inx3in board space on a 2 layer board.

US sourced board cost is $50, Offshore sourced board $30 small qty delivery 3-4wks.

Board size can be shrunk by 20%

Unit has:
Socket for Mpad,
RN-42 Bluetooth Module,
uSD Card
Vbat-5 Regulator, 3.3V Regulator,
CR2032 coin cell,
TJ1050 CAN chip and DC Restoration CCT with surge supression,
Mini-b USb SiLabs CO2104 USB to UART with surge supression
OBD2P Connector to plug directly to DLC
DB9P Connector to accept Commercial OBD2 Cable

Pic attached

2733174440070670239szzYgj
 
priusfan,

I will need a schematic showing which ports are being driven by the software so that I can connect the peripherals. With this information a few of the componenets such as the SiLabs CP2104 my not be needed and the board can be shrunk further.

What I see is that the DB9p going away and connecting directly to the DLC connector to reduce noise on the CAN-Bus, with a 4layer board and components on both sides the board probably can become 2x2 with the mbed on top.
 
regarding use of ports:
for CAN idem skpang : 29 30

Bluetooth 27-RXD1 28 -TXD1

BMP085: 9 10

external GPS RX 14


SDCARD:
SDFileSystem sd(p5, p6, p7, p8, "sd"); // mosi, miso, sclk, cs
idem this link http://mbed.org/cookbook/SD-Card-File-System
idem smartboard or SparkFun MicroSD Breakout Board

MicroSD Breakout mbed
CS o-------------o 8 (DigitalOut cs)
DI o-------------o 5 (SPI mosi)
VCC o-------------o VOUT
SCK o-------------o 7 (SPI sclk)
GND o-------------o GND
DO o-------------o 6 (SPI miso)
CD o


maybe add an USB-A port using D+ D- to get the possibility to use usbstick

the CR2032 could also be located under the mbed as on the smartboard.
 
Dernière édition:
about shrinking, there is the BT device from Andy Honecker.

about the bootloader, it is possible to use a mbed http://mbed.org/cookbook/lpc-bootloader
or http://mbed.org/users/chris/notebook/prototype-to-hardware/

in case of using a bare NXP1768, we would need definitely a sdcard for reading the parms


I saw the Andy Honecker device when it was first posted a few months back. The only problem is that he uses the BT device on a 2 card stack and needs a bigger connector/cover arrangement. He was having problems sourcing a cover. The BT speed may not high enough for our needs, probably perfectly fine for Torque.

The PLX BT device may be having problems with buffer-full as reported on the web.

I read the bootloader apps for the NXP1768 a while back, the BIN to Intel HEX
conversion probably need a linker locator and powering up with pin held low etc.

I thought about mounting the uSD socket and coin cell under the mBED a problem would be get across the rows of pins used by the Mbed but the Mbed may diappear.
How much non-volatile storage is required? The NXP has a substantial amount of FLASH and now battery backed up RAM sine we are adding a Li cell.

Are we going to plug staight on to the DLC or use a cable?
 
regarding use of ports:
for CAN idem skpang : 29 30

Bluetooth 27-RXD1 28 -TXD1

BMP085: 9 10

external GPS RX 14


SDCARD:
SDFileSystem sd(p5, p6, p7, p8, "sd"); // mosi, miso, sclk, cs
idem this link http://mbed.org/cookbook/SD-Card-File-System
idem smartboard or SparkFun MicroSD Breakout Board

MicroSD Breakout mbed
CS o-------------o 8 (DigitalOut cs)
DI o-------------o 5 (SPI mosi)
VCC o-------------o VOUT
SCK o-------------o 7 (SPI sclk)
GND o-------------o GND
DO o-------------o 6 (SPI miso)
CD o


maybe add an USB-A port using D+ D- to get the possibility to use usbstick

the CR2032 could also be located under the mbed as on the smartboard.



Thanks for the info.

A pressure sensor? That info should be available on the CAN-Bus, not accurate enough?
 
Do we need a Mini-B USBconnector and bridge chip such as FTDI or SiLabs to upload/download to Laptop would connect to a UART Port.
 
pressure from the CAN: we can get it on one byte, that is useless...

about using a cable or attaching the interface straight on the DLC, I would prefer with a cable:
the need to make it very small would be less (so it would be much less expensive).
it would be easier to reach for accessing sdcard.
it would be easier to see led status.
it would be possible to use a ON/OFF switch.


about the speed for BT : if we send only results (see my msg from 21) , 115200 is enough.
 
Do we need a Mini-B USBconnector and bridge chip such as FTDI or SiLabs to upload/download to Laptop would connect to a UART Port.
if we use a mbed, there is no need for this kind of thing, there is already the connector for this connexion (and it works perfectly and is easy to use).
 
Pages vues depuis le 20 Oct 2005: 316,285,992
Retour
Haut Bas