MicroSquirt-IO Box - For MS2!

This forum is for the discussion of other projects on Megasquirt/Microsquirt hardware that don't fit into any of the other forums

Moderators: jsmcortina, muythaibxr

Post Reply
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

MicroSquirt-IO Box - For MS2!

Post by dontz125 »

Per direction from himself ...

Input clarification:
dontz125 wrote:
the uS-IO Box Manual wrote:gpioadc5 represents the digital switch inputs * 256
Just to confirm, the bit fields of CANIN1 (FLEX), 2 (IGN1), and 3 (IGN2) = 1, 2, and 4 (x 256 = 256, 512, 1024)?
jsmcortina wrote:If read onto an MS2 using the old Megasquirt-CAN polling, yes.

James
I can see the speed sensor channels just getting too ugly, but can the various output pins be accessed? There are 8 Output Port 'Remote Port channels'; would it be hard to declare RPC1 = CANOUT1, etc?

Would it be possible to have a uSM version, with PA0, PT6 and PT7 added to the mix? (MS3, most likely)
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

Module would be possible, but doesn't align too well with the goal of off-the-shelf plug and play hardware.

For the case of an MS2 as the master interfacing to a Microsquirt IObox slave. That too could be possible. There are some code modules missing that are needed for full integration.
CAN 11bit broadcasting - present
CAN 11bit receiving - not present, but could be possible now (EDIT)
IObox integration code - not present, could be included perhaps.
VSS - not present and unlikely
CANINs - partially present
CANOUTs - partially present
CANPWM outs - not present in same manner
CANADCs - present
Generic Sensors - not present (EDIT)

I think those are most of the main areas. The next question can be answered by users - how would you want to use it? Comparing to the MS3 features.

One important thing to bear in mind is that MS2 is very RAM limited and everything mentioned above would require additional RAM - perhaps more than is available.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

As you say, the MS2 is running out of RAM. A pretty IO Box interface is all well and good, but I think that a minimal approach is really all that's needed. The ADC's are in place, the 3 CANIN switch signals are in place, so all that's needed is the CANOUTS.

"CANOUTs - partially present" - what do you mean?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by racingmini_mtl »

I don't want to step on any toes here but I think that James' intent for that IO box firmware was to have a plug and play device with no hardware work and as little configuration needed as possible. What you (Don) seem to want is a DIY hardware solution and a basic user interface that needs everything to be set specifically. That's already possible with other products including my own.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

racingmini_mtl wrote:I don't want to step on any toes here but I think that James' intent for that IO box firmware was to have a plug and play device with no hardware work and as little configuration needed as possible.
Exactly.
There are already fully customisable highly DIY solutions out there. This was aimed at the customer that wants a ready to roll solution. The feature-set is intentionally locked down to make it easier to use.

Having said that, it would be nice if something like the CANEGT also offered seamless integration to the MS3 and MS2. i.e. just select "I have a CANEGT" and the number of channels.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

Guys, you're reading too much into the question about the uSM; it was just a suggestion / option for those who DO want to work for it and want the extra channels. If it doesn't work for the plug'n'play ... (brain blanks on ideal word), not a problem.

Back to what I was actually tirading about, the inputs are already fairly hard set (IO Box MAP = Remote ADC0 = gpioadc0; IO Box FLEX = CANIN1 = gpioadc5 AND 256). How hard would it be to make the outputs work the same? eg RProgO1 = Remote Port1 Bit 0 = CANOUT1 = IO Box INJ1. This way the various MS2 'internal' outputs could use the IO Box outputs fairly seamlessly - for example, Nitrous1 and Nitrous 2 are already set up to use Remote Port1 Bit2 & Bit3; these would then come out on the IO Box's FIdle and FP pins.

For an interface, I think all that's really needed is one more setting on the [CAN bus / Testmodes] [CAN Parameters] [Enable Ports Polling] drop-down box - you'd have <Disabled>, <Enabled>, and <IO-Box>. With the latter option selected, everything that <Enabled> would activate is greyed out, and the specified settings are inserted. The same could be done for the CAN ADCs.

That's the outputs. The inputs so far are limited to triggering ProgOuts - the Table Switching box has no option to AND anything. Would it be possible to add a few lines of code (or could it be in the .ini?) to the effect of

Code: Select all

if (iobox) 
     port3bit0 = gpioadc5 && 256
     port3bit1 = gpioadc5 && 512
     port3bit2 = gpioadc5 && 1024
endif
This way Table Switching could be set to Port 3 Bit 2, and activated by a wire on the IO Box's IGN2.

Thoughts, comments, rude suggestions?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

If I was going to do that, I'd make it more seamless. Just set "IObox" to "Enable" and the rest just happens - like in the MS3 user interface shown in the manual.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

jsmcortina wrote:If I was going to do that
Might I inquire then as to your plans? As it stands right now (unless I'm missing something), the MS2 can't use an IO Box (or a uS running Extra code) for internal functions, only for ProgOuts. Is this something you'll address?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

You could easily tell the MS2 to fetch the CANIN ports from the IObox using the existing CAN polling.

What I need to consider is whether there is sufficient customer demand to make it worthwhile adding the more streamlined IObox integration to the MS2 codebase. i.e. would MS2/Microsquirt/MSPNP2 customers actually go out and buy a Microsquirt IObox?

In my first post, I missed out that "Generic Sensors" doesn't exist in MS2 either.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

jsmcortina wrote:You could easily tell the MS2 to fetch the CANIN ports from the IObox using the existing CAN polling
How? Assuming the polling settings are per the instructions, is FLEX automatically set to Port3 Bit0? By the same token, is IGN1 & 2 automatically set to Port1 Bit0 & 1?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

With the existing CAN polling, set:
Enable CAN ports polling = Enable
Remote CAN id = 13
Remote table = 7
Remote offset = 12
Remote ports direction = 3 inputs
Remote port 1 type = digital
Remote port 2 type = digital
Remote port 3 type = digital

Only port 3 is used. The three input lines on the Microsquirt IO-box will be mapped to "port 3 bit 0", "port 3 bit 1", "port 3 bit 2"

I've not tested this yet.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

Perfect - that's exactly what I'm moping on about!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Mario
Master MS/Extra'er
Posts: 409
Joined: Sun Jan 30, 2005 11:13 pm
Location: Monroe, Wa.
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by Mario »

jsmcortina wrote:What I need to consider is whether there is sufficient customer demand to make it worthwhile adding the more streamlined IObox integration to the MS2 codebase. i.e. would MS2/Microsquirt/MSPNP2 customers actually go out and buy a Microsquirt IObox?

James
I could use one right now, and I have a couple other customers that would probably add them to get more I/O in their turbo cars.
1967 Beetle My test mule
The Dub Shop
Facebook
Megasquirt for life!
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

jsmcortina wrote:Remote offset = 12
The IO Box manual shows the remote offset for the ADCs is 6 for 0-3 and 14 for 4-7; 12 would plant Port 1 square on top of ADC 3. Please confirm; should that offset be 22?

Also - one of my original questions in this thread never got answered (or if it did, I didn't understand it) - can the output pins of the IO Box be used?
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by jsmcortina »

Yes the digital ports are mapped instead of battery voltage. There's no support for using the outputs from MS2 using Megasquirt-CAN.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
dontz125
Super MS/Extra'er
Posts: 4200
Joined: Mon May 11, 2009 7:14 pm
Location: York, ON
Contact:

Re: MicroSquirt-IO Box - For MS2!

Post by dontz125 »

Ok - thanks!
QuadraMAP Sensor Module -- PWM-to-Stepper Controller -- Dual Coil Driver
Coming soon: OctoMAP Sensor Module
TTR Ignition Systems
Post Reply