Stimulator Problem

It's all about the code!
Post Reply
Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Stimulator Problem

Post by Old Grey » Thu May 30, 2019 10:45 pm

Can you run the internal STIM with the wire jumpers PC6 to PD1 and PA5 to PD2 and the console, while communicating with TS.

It looks like if you change the engine setting, ie trigger pattern, the STM32 outputs STIM pulses for that trigger pattern.

At the bottom of - https://rusefi.com/wiki/index.php?title ... re:User/en - there is some USB TTL cable thing, but it doesn't say what it is for. Is that for console and TS communication at the same time?

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Thu May 30, 2019 10:58 pm

Old Grey wrote:
Thu May 30, 2019 10:45 pm
At the bottom of - https://rusefi.com/wiki/index.php?title ... re:User/en - there is some USB TTL cable thing, but it doesn't say what it is for. Is that for console and TS communication at the same time?
yes, just added this info to the wiki
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Thu May 30, 2019 11:12 pm

Old Grey wrote:
Thu May 30, 2019 10:45 pm
Can you run the internal STIM with the wire jumpers PC6 to PD1 and PA5 to PD2 and the console, while communicating with TS.
yes

Old Grey wrote:
Thu May 30, 2019 10:45 pm
It looks like if you change the engine setting, ie trigger pattern, the STM32 outputs STIM pulses for that trigger pattern.
yes, that's the intended behavior. Not sure what seems to be the problem?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Fri May 31, 2019 11:55 am

The problem is I don't know anything, and can only work it out if it has complete and simplified instructions. Basically I'm not qualified to do be doing tutorials.

I'll look up USB TTL, because I haven't heard of it before, and see if I can work it out.

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Fri May 31, 2019 11:57 am

Old Grey wrote:
Fri May 31, 2019 11:55 am
The problem is I don't know anything, and can only work it out if it has complete and simplified instructions. Basically I'm not qualified to do be doing tutorials.

I'll look up USB TTL, because I haven't heard of it before, and see if I can work it out.
American management says it's not a problem, it's an opportunity and/or a challenge :)

Do you have ftdi ft232r populated on your Frankenstein? That ftdi ft232r is an example of a USB TTL chip - in the wiki it talks about same thing but looking like a cable.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
kb1gtt
contributor
contributor
Posts: 3408
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: Stimulator Problem

Post by kb1gtt » Fri May 31, 2019 4:11 pm

People who don't know it, are the best for tutorials. It fills in the stuff others might neglect.
Welcome to the friendlier side of internet crazy :)

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Sun Jun 02, 2019 12:15 am

kb1gtt wrote:
Fri May 31, 2019 4:11 pm
People who don't know it, are the best for tutorials. It fills in the stuff others might neglect.
It's just when you are unsure you are hesitant, ie; it gets too hard.

Ahh FTDI. I have some communication modules around.
I have a Prolific and some CP2101, and I got the Prolific running - it runs at 115200 - and have Console and TS running together. There was a problem with writing the tune to the controller, but I waited and it eventually cleared.

AFAIK the STM32 board can only output triggers, is there anything else I can show that it can do in a video. I'm guessing sensor voltages have to come in externally from a HW STIM setup.

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Sun Jun 02, 2019 12:27 am

On naked stm32 that's probably all you can do unless you start adding external LEDs to mimic injectors or idle valve etc.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

OrchardPerformance
contributor
contributor
Posts: 140
Joined: Tue Jul 24, 2018 8:55 pm
Soldering skill: yes
Coding skill?: yes

Re: Stimulator Problem

Post by OrchardPerformance » Mon Jun 03, 2019 9:28 am

I have done that on a few ECUs before, bread boarded out the pins and installed LEDs and resistors for the ignitions/injection and set up potentiometers for the sensor inputs.

It's a handy thing to do for testing outputs and verifying firmware.

As a longer term goal I could provide some details on what I have done before and how I set things up?

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Tue Jun 04, 2019 12:26 am

OrchardPerformance wrote:
Mon Jun 03, 2019 9:28 am
As a longer term goal I could provide some details on what I have done before and how I set things up?
That's ok, because I made a STIM unit a couple of years back that already does most of the stuff.
This is mainly a "try before you buy" with min stuff, but I will probably end up making a vid that explains how to make an external STIM.

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Mon Jun 10, 2019 11:47 pm

I'm getting a FW program update fail with snapshot_20190610_1840_stm32f407_rusefi, but snapshot_20190514_1926_stm32f407_rusefi works fine.
Any ideas.
Image

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Tue Jun 11, 2019 1:29 am

this has to be related to https://github.com/rusefi/rusefi/issues/833

I will investigate within the next 3 hours, probably a trivial fix with wrong relative location of rusefi.bin file
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Tue Jun 11, 2019 2:36 am

russian wrote:
Tue Jun 11, 2019 1:29 am
this has to be related to https://github.com/rusefi/rusefi/issues/833
I believe this is resolved now. Thank you for the report and sorry for breaking it :(
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Fri Jun 14, 2019 6:15 am

Don't sweat it, it's working now.

Sorry about this stupid question. If I was putting voltages directly to the inputs pins on the Discovery, ie: no rusEFI mainboard, is it 3.3V max or 5V?

Just looking it up it says the logic level for CLT pin PC1 is 3.3V, but when I try 3.3V it on'y reaches 60ºC max. Just wondering if I should be using 5V.

User avatar
kb1gtt
contributor
contributor
Posts: 3408
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: Stimulator Problem

Post by kb1gtt » Fri Jun 14, 2019 9:31 am

The STM32's input pins are 5 volt tolerant, but the analog is only up to your 3V rail. So if you put in 3.5V your ADC will read full scale, but you will not dump over the rail protection diodes and break the STM32. I would not go over the 3V on an input pin which is configured for analog. Also there is some stuff about Vref and VDDA which matters, but I'll try to keep it simple.
Welcome to the friendlier side of internet crazy :)

User avatar
russian
Site Admin
Posts: 9525
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Soldering skill: yes
Coding skill?: yes
Contact:

Re: Stimulator Problem

Post by russian » Fri Jun 14, 2019 1:17 pm

5v would kill ADC.

your question reaffirm my believe that live documentation/formulas could be useful. for now, please post 'tempinfo' command output.

do you have bias resistor for your sensor? do you have voltage divider? between termisots magic and stm32 design there are complexities around CLT sensor
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Fri Jun 14, 2019 1:53 pm

It's 2 AA batteries(3V) through a 10K pot outputting a voltage that is feed straight into PC1. The guage moves from 0ºC to 60ºC, which is kind-of enough to show an effect, but I was just wondering why it doesn't go higher. I don't think anyone will do this straight to a Disc board, but I have to fill a short vid with something. ;)

User avatar
kb1gtt
contributor
contributor
Posts: 3408
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: Stimulator Problem

Post by kb1gtt » Sat Jun 15, 2019 12:26 am

2AA's might have more than 3V, perhaps 3.4V-ish. Your limited to 3V before you hit full scale. The 60C limit must be software limit. That seems a bit odd to me as I would expect more like 120C or even more as the upper limit of the analog. Does your PC1 measure referenced to GND?
Welcome to the friendlier side of internet crazy :)

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Sat Jun 15, 2019 6:41 am

I definitely checked it beforehand, and it's 2.9V. I know it might blow it up, ;) that's why I asked you guys. I went from 60ºC to -7ºC, and it was good enough to show an effect. I tried to bump the rpm in the console so the INJ PW would be greater, but the sniffer jitter is back. Either way that section of the vid is finished.

Now the next problem. I want to show the Bench Test buttons in the Console working.
In the Frankenstein pinout page it says Fuel Pump pin is PC13, but when I press it it stays on 3V. TS Fuel Pump pin is PE4, but it also stay 3V when I press the button in the Console. I tried the TS Fan pin PE5, and it stays 0V. I don't know if it goes high or low or what, but I didn't want to do a resistance check incase the DMM puts out a voltage and blows something up.

User avatar
kb1gtt
contributor
contributor
Posts: 3408
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA
Contact:

Re: Stimulator Problem

Post by kb1gtt » Sat Jun 15, 2019 11:30 am

Do you have a second multi-meter? You can measure the meter voltage with a second meter. Also good on your for knowing a meter generates a small voltage to measure ohms. On a good note, most meter limit to below 1mA and typically work at 1.5V or less. Or at least the small collection of meters I've tested work that way. Also keep in mind your meter will typically start with low volts and increase the voltage as it changes scale. AKA if you take it out of auto ranging the generated voltage will typically stay fixed. In auto ranging, it keeps upping the voltage and looking at the mA across a shunt resistor. The shunt resistor is scaled up typically to a 0-5V signal that goes into an ADC, or similar circuit. Either an MCU or some kind of ASIC chip will then use the ADC reading, with the commanded voltage, then do a calc and display the ohms on the LCD.

Any how, if you measure your voltage with a second meter, then if you set your scale to a fixed instead of auto-range, then you can probably safely measure the ohms.
Welcome to the friendlier side of internet crazy :)

Old Grey
contributor
contributor
Posts: 63
Joined: Thu Apr 07, 2016 10:20 pm

Re: Stimulator Problem

Post by Old Grey » Sat Jun 15, 2019 1:42 pm

I was mainly wondering what output I should be getting from the pin. Like if I press the Fuel Pump button in Console/Bench Test, should PE4 change from 0 to 3.3V. Currently when I press it PE4 does nothing.
I don't know if this is telling me anything, but this is what I get from the Console dialogue box :-
Image

EDIT
Damn it, I figured it out.
When I press the button it's only on for a short time, and my DMM is so slow trying to auto-range it doesn't even see the rise in voltage.
Tried it on my old analogue meter and it sees the 3V.

Should be right now, thanks.

Post Reply