Switching MS3X outputs on for determinate time period

General support questions and announcements for MS3. See also www.ms3efi.com for MS3 information

Moderators: daxtojeiro, muythaibxr, jsmcortina

Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Sun Jul 01, 2012 1:23 pm

Hi,

I want to switch a 12v 2A solenoid valve on (open), and hold it open for 0.5 to 1 second and then close it again after the throttle is closed below 25%. Is this possible? I have been trying to set an additional condition that TPS < 25%, AND, Time < 1 second. This does not seem to work, am I doing something wrond or do I misunderstand the point of the time condition entirely?

Secondly, How do I get the solenoid to open on less than 25%? It seems that no metter the wiring order (just a 2 wire 12 DC solenoid), and no matter the trigger direction, the valve always only OPENS when >25%, despite the logic showing trigger is 1 when TPS < 25%. This is also confusing! I have verified the output on a Meter and no matter the setup in TS, this is always the case, always goes High when trigger condition is met whether set as 1 or 0.

I have the Jimstim so will test further at home, but for now, any ideas? Please have a look at my other post also as there may be a problem with the output channels altogether.

Thanks!
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby jsmcortina » Sun Jul 01, 2012 3:03 pm

The time is the time the Megasquirt has been powered up, not an event timer.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 22799
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Sun Jul 01, 2012 3:20 pm

James,

Is there any way to set it up like so without building an intermediate circuit, I mean using some other MS function?

Any idea as to why MS always outputs high at the threshold?

Thanks
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby jsmcortina » Sun Jul 01, 2012 3:36 pm

Not that I can think of, unless the recently added drag race timed output features will help?

Post your MSQ.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 22799
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: Switching MS3X outputs on for determinate time period

Postby SymTech Laboratories » Sun Jul 01, 2012 4:34 pm

70btdc1 wrote:Is there any way to set it up like so without building an intermediate circuit, I mean using some other MS function?

You could accomplish this with a little additional hardware, if you're open to that idea.
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
SymTech Laboratories
Super MS/Extra'er
 
Posts: 2141
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA

Re: Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Mon Jul 02, 2012 6:58 am

Certainly am! I have an arduino that I will try to use to control an electronic throttle as a supercharger bypass so thinking I could use that. But I would prefer something neater eventually. Could I use a capacitor with a specific rise time to switch a diode? Sorry I am a mechanical engineer! :RTFM:
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Mon Jul 02, 2012 12:17 pm

MSQ attached
Attachments
2012-07-02_19.41.07.msq
(138.8 KiB) Downloaded 7 times
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby SymTech Laboratories » Mon Jul 02, 2012 12:40 pm

70btdc1 wrote:Certainly am! I have an arduino that I will try to use to control an electronic throttle as a supercharger bypass so thinking I could use that. But I would prefer something neater eventually. Could I use a capacitor with a specific rise time to switch a diode? Sorry I am a mechanical engineer! :RTFM:

You could either use your Arduino for a programmable delay, or you could use a 555 timer configured as a monostable multivibrator (about six extra components).
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
SymTech Laboratories
Super MS/Extra'er
 
Posts: 2141
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA

Re: Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Tue Jul 03, 2012 11:13 am

Thanks for the info. So would I be able to install these 6 components in a small package? Would it be easier to mount them in the proto area?

Maybe it would be best to make an external circuit that I can tune the delay on until I am happy with the functionality.

Could you help with the circuit design, and give a little more info on how it would work? Please PM me.
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby SymTech Laboratories » Tue Jul 03, 2012 1:27 pm

70btdc1 wrote:Could you help with the circuit design, and give a little more info on how it would work? Please PM me.

Why keep it private? This information could benefit others too.

Here's an example circuit that should work for you. Depending on where you're located, all of the parts will probably be available from your local electronics supplier (they're available from RadioShack in the United States, for instance). They're definitely available from any major online supplier.

The 555 will output a +12V pulse for about 0.5s whenever it's triggered. Simply connect the input to the processor pin you've configured as a programmable output, and the output to any spare pin on the DB37 connector. The 555 can source or sink about 200mA, so if you need more than that, you should add another PN2222A transistor for current gain. If you add a 50k linear taper potentiometer in series with R1, you can adjust the delay from ~0.5s to ~1s.

We would probably install this in the proto area of a v3.0 board. It can be installed neatly and compactly, for a minimal footprint.

555_monostable.png
555_monostable.png (25 KiB) Viewed 1034 times
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
SymTech Laboratories
Super MS/Extra'er
 
Posts: 2141
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA

Re: Switching MS3X outputs on for determinate time period

Postby 70btdc1 » Fri Jul 06, 2012 2:08 am

Thanks for the diagram!

The only issue I see is that the valve draws 2A, so I would need quite a few transistors to reach the operating current.

I think for now I will stick with using the Arduino as it is only really a development setup with this valve before I use an electronic throttle.

On a side note I planned to use the electronic throttle controlled through the Arduino, which will convert PWM from the MS to voltage to drive the motor and provide closed-loop position control. However, I think I can now just use a TLE5205-2 chip to do this. If I feedback the TPS to the MS boost control algorithm, will this give me fast enough position control? The throttle is not for main engine throttling, rather it is a bypass for the supercharger. Maybe I should start another thread for this question.
70btdc1
Helpful MS/Extra'er
 
Posts: 73
Joined: Thu Sep 15, 2011 6:43 am
Location: Essex

Re: Switching MS3X outputs on for determinate time period

Postby SymTech Laboratories » Fri Jul 06, 2012 2:19 am

70btdc1 wrote:Thanks for the diagram!

The only issue I see is that the valve draws 2A, so I would need quite a few transistors to reach the operating current.

You could just connect the output to a TIP122 transistor through a 1k ohm base resistor. It doesn't increase the component count by too much. Be sure to use a 1N400x diode to suppress the flyback since your load is inductive (you'll need this regardless of which solution you ultimately choose).
SymTech Laboratories, LLC ----- MSQ File Repository: megasquirt.symtechlabs.com
Image
SymTech Laboratories
Super MS/Extra'er
 
Posts: 2141
Joined: Sun Aug 31, 2008 4:02 pm
Location: South Florida, USA


Return to MS3 General Support

Who is online

Users browsing this forum: No registered users and 1 guest