Sean's FreeEMS Proto Hardware

From DIY contraptions to sophisticated FreeEMS-specific designs! Plus general hardware development!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Sean's FreeEMS Proto Hardware

Post by SleepyKeys »

Image

Image
They sent me an adapter board with the wrong connectors, but I suppose I'll deal with that later. I wired up 24 LEDs 12 for injection and 12 for ignition and jumped them according to the pin assignment doc in the source code download.

They're setup odd/even "chevy" style

1 2
3 4
5 6
7 8
9 10
11 12

TODO
Wire up opto isolators for tach input
Get firmware to decode nissan style cam wheel
Last edited by SleepyKeys on Sat Mar 08, 2008 4:22 pm, edited 1 time in total.
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Sean's FreeEMS Proto Harware

Post by Fred »

:-) Cool! I like the "dry" look!

If you want this in a separate thread, just tell me and i'll split it.

Comments :

GUTTED about the connectors :-( I wonder if they will send you a pair of in/out ones to solder in yourself or something?

Did I mention that the pin assignment is still a bit subject to change? :-| sorry. You did say jumpered though, so hopefully its easy to shuffle them around a bit? The staged injectors and injectors can stay put, but how port a and port b are used isn't quite finalised yet. I suspect it will be the early version of that doc that is best to follow, ie, 12 ign channels in a row. in the middle i "moved them" to 6 on each port, but then i realised the registers are adjacent and it can be accessed as a word instead of two bytes. Not a big deal anyway. i modded my board for the intermediate state anyway, so i'll have to recolour them at some stage again. 2 mods for me, max of one for you depending on which doc you went with. Sorry about that. Hopefully its not a big deal.

As for the optos, I don't think you'll need them. If that sensor is like the other mitsi eletric ones, it grounds the outputs and you need to pull up anyway (to 5v) so at that point all you need is a series resistor and a little cap to keep noise at bay. Don't take my word for it though. Don't expose your pins to more than 6.0 volts or they will be dead. killing an IC channel is suicide as far as our project goes :-)

Great to see the second tester underway :-)

One of our other members has one too, but he's been shy about posting so far, we'll see how busy he is i guess. He also has a nissan/gm sensor to test with... in his turbo silvia :-)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Sean's FreeEMS Proto Harware

Post by SleepyKeys »

Admin wrote::-) Cool! I like the "dry" look!

If you want this in a separate thread, just tell me and i'll split it.

Comments :

GUTTED about the connectors :-( I wonder if they will send you a pair of in/out ones to solder in yourself or something?

Did I mention that the pin assignment is still a bit subject to change? :-| sorry. You did say jumpered though, so hopefully its easy to shuffle them around a bit? The staged injectors and injectors can stay put, but how port a and port b are used isn't quite finalised yet. I suspect it will be the early version of that doc that is best to follow, ie, 12 ign channels in a row. in the middle i "moved them" to 6 on each port, but then i realised the registers are adjacent and it can be accessed as a word instead of two bytes. Not a big deal anyway. i modded my board for the intermediate state anyway, so i'll have to recolour them at some stage again. 2 mods for me, max of one for you depending on which doc you went with. Sorry about that. Hopefully its not a big deal.

As for the optos, I don't think you'll need them. If that sensor is like the other mitsi eletric ones, it grounds the outputs and you need to pull up anyway (to 5v) so at that point all you need is a series resistor and a little cap to keep noise at bay. Don't take my word for it though. Don't expose your pins to more than 6.0 volts or they will be dead. killing an IC channel is suicide as far as our project goes :-)

Great to see the second tester underway :-)

One of our other members has one too, but he's been shy about posting so far, we'll see how busy he is i guess. He also has a nissan/gm sensor to test with... in his turbo silvia :-)

Admin.
I guess it's dry because I live in the desert haha. This thread is fine. I'm not too worried about the connectors, I'll figure out something one way or another. Yes jumpered, I figured some of the pin assignments may change as this hardware is still in proto stage :)

My gm sensor requires 12v in, but has 5v out. I realize IC channels are easy to kill, thats why I want to play it safe with photo couplers. Hopefully I can make some real headway and silvia can test with us :)
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by Fred »

Good to hear you jumpered it :-)

Interesting about the GM sensor having 5v out. On the mazda and mitsi ones, one out has an internal 5v pull up and the other is floating. Without the pull up you get no signal on the second channel. I'd be interested to see if yours is the same or different. I never checked a Nissan one, so I can't comment on those. I just assumed that because they are all mitsi electric items they would all exhibit similar behaviour.

I'm sure silvia boy will be keen to hook up a lead to his CAS and test it at cranking speed anyway :-) maybe he can score a second CAS from a yard somewhere. I have a spare with stuffed bearings at home, but it's welded inside this box with everything else I own :-) :

http://i50.photobucket.com/albums/f323/ ... 0_4486.jpg

EDIT : By dry I meant humour wise/wine wise, not water wise :-)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by SleepyKeys »

Admin wrote:Good to hear you jumpered it :-)

Interesting about the GM sensor having 5v out. On the mazda and mitsi ones, one out has an internal 5v pull up and the other is floating. Without the pull up you get no signal on the second channel. I'd be interested to see if yours is the same or different. I never checked a Nissan one, so I can't comment on those. I just assumed that because they are all mitsi electric items they would all exhibit similar behaviour.

I'm sure silvia boy will be keen to hook up a lead to his CAS and test it at cranking speed anyway :-) maybe he can score a second CAS from a yard somewhere. I have a spare with stuffed bearings at home, but it's welded inside this box with everything else I own :-) :

http://i50.photobucket.com/albums/f323/ ... 0_4486.jpg

EDIT : By dry I meant humour wise/wine wise, not water wise :-)

Admin.
The gm version provides 0/5 V on both channels, no pull up required.

I was using a very loose relation of dry as in water to dry look haha. :lol:
You snooze, you lose!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by SleepyKeys »

Anyone have any ideas on why I cant seem to get freeEMS loaded into flash?? Log Attached



bash freeEMSloader.bash /dev/ttyS0 freeems-v0.0.7.s19


Welcome to the FreeEMS firmware loader

This program is released under the GPL V3
Please see http://www.gnu.org/licenses/ for details

This version is for mc9s12xdp512 based FreeEMS's

Do you have a mc9s12xdp512 based FreeEMS? [ yes | quit ]
yes
Checking configuration and arguments...
Everything looks good!
Erase the flash on your FreeEMS? (This is necessary to load new firmware) [ yes | abort ]
yes
Erasing the FreeEMS flash without verification...
hcs12mem: Freescale S12 MCU memory loader V1.4.1 (C) 2005-2007 Michal Konieczny <mk@cml.mfk.net.pl>

target info <single chip MC9S12Dx512 MCU>
target mcu <MC9S12D512> family <S12X>
SM serial port </dev/ttyS0> baud rate <115200 bps>
SM target connected
SM version <2.02> date <2004-07-23>
S12X part id <0xC410> family <XD> memory <512kB> mask <1.0>
S12X part security <unsecured> backdoor key <enabled>
S12X register space <2kB> address range <0x0000-0x07FF>
S12X RAM size <14kB> space <12kB> address range <0x1000-0x3FFF>
S12X FLASH module <FTS512K4> size <512kB> state <enabled> ROMHM <no>
S12X FLASH block <0> protection all <off> high area <2kB> low area <off>
S12X FLASH block <1> protection all <off> high area <2kB> low area <off>
S12X FLASH block <2> protection all <off> high area <2kB> low area <off>
S12X FLASH block <3> protection all <off> high area <2kB> low area <off>
FLASH erase: wait ...
FLASH erase: memory erased
Erasing flash was successful!
Load the firmware to your FreeEMS? [ yes | abort ]
yes
Loading freeems-v0.0.7.s19 to FreeEMS flash without verification...
hcs12mem: Freescale S12 MCU memory loader V1.4.1 (C) 2005-2007 Michal Konieczny <mk@cml.mfk.net.pl>

target info <single chip MC9S12Dx512 MCU>
target mcu <MC9S12D512> family <S12X>
SM serial port </dev/ttyS0> baud rate <115200 bps>
SM target connected
SM version <2.02> date <2004-07-23>
S12X part id <0xC410> family <XD> memory <512kB> mask <1.0>
S12X part security <unsecured> backdoor key <enabled>
S12X register space <2kB> address range <0x0000-0x07FF>
S12X RAM size <14kB> space <12kB> address range <0x1000-0x3FFF>
S12X FLASH module <FTS512K4> size <512kB> state <enabled> ROMHM <no>
S12X FLASH block <0> protection all <off> high area <2kB> low area <off>
S12X FLASH block <1> protection all <off> high area <2kB> low area <off>
S12X FLASH block <2> protection all <off> high area <2kB> low area <off>
S12X FLASH block <3> protection all <off> high area <2kB> low area <off>
FLASH write: image file <freeems-v0.0.7.s19>
FLASH write: image info <freeems-v0.0.7.s19> entry <0xC000>
FLASH write: address range <0xC000-0xCC53> size <0x0C54>
FLASH write: address range <0xF710-0xF7FF> size <0x00F0>
FLASH write: image [ ]
error: timeout - no connection with target
Firmware load failed! exiting...
localhost bin #
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by Fred »

yes, you haven't installed the .dat file
target info <single chip MC9S12XDP512 MCU>
target mcu <MC9S12XDP512> family <S12X>
SM serial port </dev/ttyUSB0> baud rate <115200 bps>
SM target connected
SM version <2.02> date <2004-07-23>
S12X part id <0xC410> family <XD> memory <512kB> mask <1.0>
S12X part security <unsecured> backdoor key <enabled>
S12X register space <2kB> address range <0x0000-0x07FF>
S12X RAM size <32kB> space <12kB> address range <0x1000-0x3FFF>
S12X FLASH module <FTX512K4> size <512kB> state <disabled> ROMHM <no>
S12X FLASH block <0> protection all <off> high area <2kB> low area <off>
S12X FLASH block <1> protection all <off> high area <2kB> low area <off>
S12X FLASH block <2> protection all <off> high area <2kB> low area <off>
S12X FLASH block <3> protection all <off> high area <2kB> low area <off>
FLASH write: image file <freeems-v0.0.8.s19>
FLASH write: image info <freeems-v0.0.8.s19> entry <0xC000>
FLASH write: address range <0xC000-0xCE1F> size <0x0E20>
FLASH write: address range <0xF710-0xF7FF> size <0x00F0>
FLASH write: image [##################################################]
FLASH write: image size <3856 B> time <1.01 s> rate <3817 B/s>
Firmware load was successful!
It is strongly recommended that you re-extract the firmware and do a visual diff to confirm that the only change is the serial monitor being included.
Thank you for choosing the FreeEMS to run your engine, goodbye.
is my latest load

i'm guessing you edited the cpu type in the bash script?

go the the downloads section of the main page and grab the .dat file.

it will be included with the next release (if i ever get that far)

also, one suggestion, if you want to use the ports for debug output, its easier if the leds are inline, esp if your debug output is a number and not a set of individual bits.

the latest header has ports a and b together as PORTS_AB so that you can write a 16 bit number straight to it.

quite useful in my limited experience :-)

getting serial comms up and running would be good too, but i want to make it do something that resembles control an engine before i think about comms with it.

hope that all helps you :-)

good luck. will be up for about another hour, feel free to email, pm, post, whatever (post is best, benefits everyone)

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by Fred »

or maybe its an original version from ages ago?

i'll attach the one i think i am using
Attachments
mc9s12xdp512.dat.zip
(856 Bytes) Downloaded 662 times
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
SleepyKeys
LQFP144 - On Top Of The Game
Posts: 549
Joined: Mon Feb 11, 2008 10:52 pm
Location: Arizona
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by SleepyKeys »

Admin wrote:yes, you haven't installed the .dat file
target info <single chip MC9S12XDP512 MCU>
target mcu <MC9S12XDP512> family <S12X>
SM serial port </dev/ttyUSB0> baud rate <115200 bps>
SM target connected
SM version <2.02> date <2004-07-23>
S12X part id <0xC410> family <XD> memory <512kB> mask <1.0>
S12X part security <unsecured> backdoor key <enabled>
S12X register space <2kB> address range <0x0000-0x07FF>
S12X RAM size <32kB> space <12kB> address range <0x1000-0x3FFF>
S12X FLASH module <FTX512K4> size <512kB> state <disabled> ROMHM <no>
S12X FLASH block <0> protection all <off> high area <2kB> low area <off>
S12X FLASH block <1> protection all <off> high area <2kB> low area <off>
S12X FLASH block <2> protection all <off> high area <2kB> low area <off>
S12X FLASH block <3> protection all <off> high area <2kB> low area <off>
FLASH write: image file <freeems-v0.0.8.s19>
FLASH write: image info <freeems-v0.0.8.s19> entry <0xC000>
FLASH write: address range <0xC000-0xCE1F> size <0x0E20>
FLASH write: address range <0xF710-0xF7FF> size <0x00F0>
FLASH write: image [##################################################]
FLASH write: image size <3856 B> time <1.01 s> rate <3817 B/s>
Firmware load was successful!
It is strongly recommended that you re-extract the firmware and do a visual diff to confirm that the only change is the serial monitor being included.
Thank you for choosing the FreeEMS to run your engine, goodbye.
is my latest load

i'm guessing you edited the cpu type in the bash script?

go the the downloads section of the main page and grab the .dat file.

it will be included with the next release (if i ever get that far)

also, one suggestion, if you want to use the ports for debug output, its easier if the leds are inline, esp if your debug output is a number and not a set of individual bits.

the latest header has ports a and b together as PORTS_AB so that you can write a 16 bit number straight to it.

quite useful in my limited experience :-)

getting serial comms up and running would be good too, but i want to make it do something that resembles control an engine before i think about comms with it.

hope that all helps you :-)

good luck. will be up for about another hour, feel free to email, pm, post, whatever (post is best, benefits everyone)

Admin.
Thanks for the fast response! Firmware load was successful!

I was playing with the hc12mem command line tool to grab the factory contents of the MCU. I used type XD512, then the first time I ran your script it said xdp512.dat not found. I read on hc12mem.com that some chips may be supported that aren't on the list of supported devices so I copied the xd.dat file to xdp.dat thinking it would work.........wrong.


Thanks
Sean
You snooze, you lose!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Sean's FreeEMS Proto Hardware

Post by Fred »

Sweet, least I can do, thanks for supporting the crazy idea of a random stranger to build a sweet home made EMS :-)

The original version of that file that I made up before my card arrived didn't work, that's why I was wondering...

Admin.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply