Custom square wave output needed.

Discussion and Support for MoTeC's M1 series ECUs

Custom square wave output needed.

Postby DynoDom on Wed Nov 08, 2023 11:55 pm

Hello

Is it possible to generate a custom (50/50, 12volt peak, 0-225 hz = 0-100 km/h) square wave signal output in either M150, C1812, PDM30?
This is intended as the vehicle speed signal into an electric assisted power steering.

Wheel speed sensor Inputs and GPS speed are already present on the CANbus.

Thank you in advance.
D
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby NathanB on Thu Nov 09, 2023 9:58 am

Hi Dom,

You will use one of the aux outputs on the C1812 for variable frequency:

Frequency control C1812.png
Frequency control C1812.png (148.83 KiB) Viewed 4774 times


Please note that the aux output will be low side, so you will need to add a pullup to 12V to achieve your square wave.
NathanB
MoTeC
 
Posts: 218
Joined: Thu Oct 15, 2020 1:50 pm

Re: Custom square wave output needed.

Postby DynoDom on Fri Nov 10, 2023 2:38 am

Thank you very much Nathan. PM sent.
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby DynoDom on Sat Nov 11, 2023 4:25 am

Hello again with one follow up question:

The manufacturer of the steering unit pointed out that frequency should not exceed 225 Hz.
Our custom Signal ends at 1000Hz.

Do you see a way to freeze the 225Hz at 100 km/h and above?


Thanks in advance,
Dom
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby David Ferguson on Sat Nov 11, 2023 9:22 am

A couple of solutions:

- Don't go faster than 225 km/h

- Don't send Ground Speed -- but instead send the output from a table with (ground speed as the input) that has three data points, 0=0, 225=225, and 1000=225.
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1420
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom square wave output needed.

Postby DynoDom on Sat Nov 11, 2023 9:34 am

Hi David

It is 225hz at 100 km/h.

I try to achieve the table solution you mentioned.
Thank you,

Dom
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby DynoDom on Mon Nov 13, 2023 11:21 pm

Hello again

Unfortunately, due to my inability, I failed to create the above mentioned table to freeze the frequency at 225hz when speed is > 100 km/h.

Could you perhaps show a sample of how it is done correctly?


Many thanks in advance.
D
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby David Ferguson on Tue Nov 14, 2023 6:17 am

Here is what a 2D table would look like that takes Ground Speed and produced the channel "GP Speed 1 (Lge)"

Speed Cap table.JPG
Speed Cap Table
Speed Cap table.JPG (36.7 KiB) Viewed 4587 times


And here is how your Aux Output would be setup using the "GP Speed 1 (Lge)" channel:

Auix Output Config.JPG
Aux Output Config
Auix Output Config.JPG (36.5 KiB) Viewed 4587 times
David Ferguson
Veracity Racing Data
David Ferguson
Pro User
 
Posts: 1420
Joined: Fri Nov 07, 2008 2:45 am
Location: Paso Robles, California

Re: Custom square wave output needed.

Postby DynoDom on Tue Nov 14, 2023 11:39 pm

Thank you David.
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am

Re: Custom square wave output needed.

Postby DynoDom on Thu Nov 16, 2023 3:04 am

Good day

The Steering works as intended, thanks to your great support. Thank you very much indeed!

@MoTec
One small Bug in the "monitor dash" is that Aux3 output does not show values, even though the function works.
I just thought to let you know.

Best regards,

D
DynoDom
 
Posts: 38
Joined: Wed Sep 14, 2022 12:10 am


Return to M1 ECUs

Who is online

Users browsing this forum: Google [Bot] and 4 guests