Sub page for MembersPage/SteenAndersen
This page is to collect my history, with old Q&A, and Progress..-
14. Aug 2005
Cooleant Range Q
Since my engine is air cooled, I need the CLT cooleant temperature sensor to measure oil temperatures up to about 120°C. As i was calibrating the NTC resistors for sensors, i was running EasyTherm4.exe .
The generated thermfactor.inc file look like seen below, where ADC values below 17 or temperatures above 215°F (101.7°C)is not represented.
- How do i change the coleant temperature range, so Tbin = Temp in °F , without subtracting 40°F.
- The byte value for the temperature is Tbin = temp in deg. farenhet - 40 this gives maximum temperature Tmax = 255 = 0xFF = 215°F or 101.7°C
- So i thought of changing the Tbin representation to a 1 to 1 representation of temperatures from 0x00 - 0xFF giving 0°F - 255°F or -17.78°C - 123.9°C range.
- So is there an easy way to alter this in the firmware .c files or by config.txt or in my_make ?
- Also thermfactor.inc and matfactor.inc sems to use different failure value, Why ? Is the binary representation the same °F + 40 ?
This is an unfortunate inheritance from megasquirt / megatune. It is a problem for watercooled engines too. The only easy way I can think of is to define your own engine.coolant resolution,
(-40 .. 150C should be enough) and adjust your inc files and coolant related config parameters accordingly. Readings in megatune and LCD will be wrong, although it might not be hard to fix them.
I'm still unsure about how to do this.
8. Mrs 2005
I have experimented a little with lcd_display.c to come up with a new layout for page 0 on the LCD. I removed TPS and EGT info since i dont have them, and added Vbatt and advance and engine.status to monitor Acceleration, Warmup, Deceleration, a.s.o.
- It's so nice to be able to compile the firmware myself, with a little changes, if needed.
I'm experimenting with ego setting's to learn about my engine as it is running right now. The Lambda taget table is I think the ultimate goal to tune for. I have no control over injection yet.
When GenBoard controls injection we set lambdatarget table and watch egoC: while tuning, converging to how much VE (or req_fuel or warmup or other, whatever appropriate) values are misadjusted. egoC displays in decimal, in 0.4% units, so -30 means -12%. However, when injection is controlled by aliens (eg. given CIS system), the egoC: will rail. Eg. with +-16% setting, ego_lean_limit=1E (decimal 30) and ego_rich_limit=28 (decimal 40) it will show -30 / +40 most of the time, with little information for you.
Therefore you can only watch lambda and remember what lambda is desirable at given loadsites. 3D mode in MegaTune can help, and logging can help a lot.
We'll see how CIS system is running and how it handle Accelerration/Decelration enrichment/leaning by use of vacuum signal in fuels pressure regulator. Very smart by analog design in 1970's. I can also monitor Warm up enrichment, which is not so good, seems to lean out to fast with temperature. And idle control by Auxiliary air valve, closes too quickly (120 sec.) as engiene is not up to more than 25-35°C at the time and idle rpm drops 150-200 until temp is up above 55°C.
Controling CIS mixture by PWM'in Frequency valve
i'm thinking off a cheap way to control the fuel control pressure (used in CIS to control mixture) by a frequency valve. This was done originally in the 911 in 1980 by a closed loop narrow band lamba sensor, and a frequency valve (15Hz) where dyty cycle (PWM) determined the controlpreassure according to Lambda value, and then controlling A/F ratio. If i can my hands on a Frequency valve, vems should be capable of PWM controlling it proportional to the egoC: values.
24 Apr. 2005
I have come a little further this week.
Assembled the GenBoard in it's AluBoss box. A little difficult to get celarance between the clamping plates and the EC connectors soldering pins, i had to cot them tight to the PCB. I also had to make holes in the endplates for MAP, and signals. I used a DB-15 pin connector for wiring to LCD, RS232 and PS2, i even got room for 2 wires for S259_OUT1 and S259_OUT2, so i have them for future use.
I put some wiring into the car and put in the WBO2 sensor in. Connected GenBoard to Vbatt and GND (GND5 and GND shorted internally in VEMS). I hoked the TRIG1 signal to the tach signal going to the tachometer (unsoldered R30 according to Marcel recomdation), but i had to use a capacitor between the tach signal and the TRIG1 (i used 470nF) to get a RPM reading. The RPM radings at idle is fluctuating a bit +/- 50 rpm, but it could be unstable idling, but my multimeter is reding a steady rpm, but it might bebecause of slow reading.
I tried a little run in the car, and watched the reading's, especially the lambda was interesting. When cruising L was around 0.92 +/- 0.2, and on full throttle down to .84 (there is vacuum connected to the fuel pressure controlled by the warm up regulator), on deceleration lambda raised into 1.1 range, so it seems tuned OK running on the old CIS system.
On cold idle the lambda seemed to high around 1.2, and the engine is struggeling to keep a smooth idle, and rpm is suffering, but that could be explained by the lean reding.
I'm not sure if i can thrust the lambda readings, but if the readings is right it show's that the CIS is to lean on cold idle, but OK at cruising.
The readings also fluctuate some on the LCD, but i supect thats the PID parameter setting for wbo2. II'll put config and tables on the MembersPage/SteenAndersen/MyInstallation page. Beware not all parameters is configured yet.
I downloaded the release candidate 007 from teh MegaTune page, uploaded the firmware to vems, and voila, instant success. I used megatuneto adjust batt_fact to match Vbatt reading to multimeter readings. I tried to have it running during a test run, and it show the reading nicely. In the realtime display i could see the %02 readings at 2.5% that matches the ritch setting that the car like, and the lambda reading's . The rpm seemed a little coarse at idle, it was jumping in 100 rpm step's.
I'm not sure what the reading should be, and i'm not sure about the kpafac adn kpaofs setting, but i adjusted in megatune so the map reading was 103 when barometer showed 1030 hPa. In car running the MAP goes from 10 on deceleration to around 60 on acceleration (not sure if the readout in LCD is in HEX, if so MAP=64 is 100 decimal and seemes OK on acceleration at WOT).
I have to hook up some more connections to IAT, CLT, and find out how to configure for acceleration enrichment using differential MAP, instead of TPS ,since i have no TPS on the 911. And if possible i like to have a PWM controlled output to control a frequency valve in the CIS system (it a 15Hz duty cycle controlled valve in the CIS fuel system, that controls back pressure, and the the amount of fuel delivered.) That's for a cheap start, so i don't have to change the injection system yet. (no money situation).
1 Mrs 2005
I downloaded and compiled the new release [release 1.0.11 since 2004-11-24] from GenBoard/UnderDevelopment/FirmwareChanges page.
I Can'not get the WBO2 to work right.
How do i turn on WBO2 without issuing mde02 command ? (when engine starts)
If i send mde02 command it starts WBO2, and it works fine, but not the egoC:, on display on LCD stays on 0.00.
A: EGO correction can be disabled in several ways, for cold engine, low RPM, high MAP, etc.. see config.ego_.... variables.
In GenBoard/Manual/Config/WBoxygen it say's to "set
config13 = 0x02
nothing happens when i turn on the engine, LCD shows La:?.??. and on lcd page 7, wbo2 is OFF.
It is very likely that your RPM reads 0000 because trigger is not enabled or applied.
I do have RPM readings, and pw, iat, clt, and mat is OK on LCD.
The problem is secondary_trigger=FF. Check GenBoard/UnderDevelopment/FirmwareChanges, especially anything about secondary_trigger (or changes after v8 release). Try secondary_trigger=02
secondary_trigger=02 solved the problem. Sorry I read the mesage on the firmware page, and thought i was set to 0x02, it was in my old config, but somehow it was changed to 0xFF
17 Apr. 2005
Time is a limiting factor in my progress, but i managed to do a little in the past weeks. I have started to modify "config.txt" and "tables.txt", to finish
testing the WBO2 controller:
- I adjusted wbo2_pump_pw_zero=64 for a target of 3.94V (it was the same value as the board was delivered with in the initial firmware).
- I took the warmup parameters from Mik's Example files as starting point
- I connected a light bulb to test the warmup process, and it all went fine, with the lamp glowing gradually lighter as the warmup values changed.
- Connecting a 50 ohm resistor on the sensor inputs showed Ri=49 on the LCD (measured Ri unit is not Ohm, but very close), so thats OK, and the heater voltage dropped imediatly, as expected when Ri gets low.
- Then i adjusted wbo2_nernstdc_target=A6 with LSU04 connected to give a measurement of 0.45 Volt across nernst cell.
- And finally i adjusted wbo2_calibration=C1 to give a o2 reading of 2095 on the LCD, as described in the html manual.
- Last i tried to breathe on the sensor to see the reading drop to around 1800, and back up again in free air.
I have also connected LED's on all the injector outputs, the ignition out, fuel pump out, and put a ptc on the clt_in and iat_in. Then i checked all the output with the mdhXX command. And with the finger as input trigger i se all the injektors fire in sequence, and ign fire, and fp turn on, and wbo2 turning on, and on the LCD i can see all teh parameters change as. iat, map, clt, rpm stays on 1000 since i use 50Hz stimulus on 6 cyl, coil type trigger with 6 teeth per cranck revolution (coil in distributor) configuration.
Still need a lot of decissions to make in config, and tables. But now the hardware seems to be tested OK. So maybee it's time to put the vems in it's box, nd start to plan the installation in the car.
04 Apr. 2005
Compilation of firmware problem from MembersPage/SteenAndersen/Questions page is solved.
1 - I did un-install WinAVR version "WinAVR-20050214-install.exe"
2 - Installed the version from "WinAVR-20040720-install.exe"
3 - used, make clean[Enter] ; sh [enter] , then make all [enter]; and this time no errors
Actually it only worked on my old download of the firmware from 27 Jan 2005, when i try to compile my latest download from 26 March 2005 it fail with tihis error.
sipr.c: In function `sipr_process_inc': sipr.c:69: error: `sipr' undeclared (first use in this function) sipr.c:70: error: `sipr_recCRC' undeclared (first use in this function) D:\app\WinAVR\utils\bin\make.exe: *** [sipr.o] Error 1 rm eventqueue.o ign_logging.o phasesignal.o benchmark.o dispatcher.o engine.o me nu.o injconf.o ignconf.o knock.o multitooth.o edis.o ringbuf.o injector.o boostc ontrol.o sh-2.04$
A: Spir is only added to latest CVS; It seems to me you are not using the released firmware from GenBoard/UnderDevelopment/FirmwareChanges, current CVS is _not stable_, stick to using releases - DB
OK : Follow UP
I was able to compile the "released" version download, so compilation enviroment must be ok, and the 26 mrs. 2005 download i have must be bad or broken. I'll stick to released version.
BUT in the MembersPage/JohanEriksson/VerThreeFirmForDummies that i followed, it says to download the firmvare from csv with the GETFIRM.bat; but that apperently not always a good idea.
So maybe a correcttion to the MembersPage/JohanEriksson/VerThreeFirmForDummies was a good idea :-)
Problem ALMOST SOLVED, THX to Answer A2 below. :-)
2 - Installed the version from "WinAVR-20040720-install.exe"
3 - used, make clean ; sh , then make all; and this time no errors
But it only compiles old version Firmware.
Se error on Progress page.
I'm nor sure if this question should be asked on BuildFirmwareFAQ? page, please let me know i'm new to this wiki concept.
I Cannot get the Firmware to Compile into VEMS.HEX with the make command. Iread the page
GenBoard/Firmware/BuildFirmwareFAQ several times, trying all the hint's about PATH variable, and SH command, but no good.
I run on XP SP2, and installed the latest versions off ActivePerl-22.214.171.1241 and WinAVR-20050214
And type like this in a CMD
Witch turn out fine to clean up in the firmware directory ending like this
rm -f vems.a90 rm -f vems.hex rm -f vems.sym rm -f vems.eep rm -f vems.hex rm -f vems.asm rm -f *.bak rm -f *.log rm -f *.*~ Errors: none
Then i try to compile within the SH Shell with the make command, like this.
D:\VEMS\Firmware\Copy\firmware>sh sh-2.04$ unset LIB sh-2.04$ make echo "runme from sh shell, win32 cmd is broken, dies with CreateProcess error" runme from sh shell, win32 cmd is broken, dies with CreateProcess error avr-gcc -c -O3 -g -Wall -Wstrict-prototypes -Wa,-ahlms=actuators.lst -D GENBOARD v3 -D FETDRIVER_INVERTING -D LCD -D LCD_4x20 -D PS2KEYBOARD -D BENCHMARK -D CELS IUS -D WBO2 -mmcu=atmega128 -I. actuators.c -o actuators.o . . . comm.o(.text+0x97a):D:\VEMS\Firmware\Copy\firmware/comm.c:834: more undefined re ferences to `PRG_RDB' follow D:\app\WinAVR\utils\bin\make.exe: *** [vems.elf] Error 1 rm avr/adc.o avr/lcd.o avr/eventqueue.o avr/kb.o injconf.o eventqueue.o dispatch er.o avr/iac.o avr/spi.o softpwm.o avr/wbo2.o injector.o spi.o engine.o ign_logg ing.o phasesignal.o avr/keyboard.o avr/dispatcher.o timing.o benchmark.o avr/sto rage.o avr/fuelcontrol.o avr/menu.o edis.o avr/button.o avr/timing.o ringbuf.o a vr/actuators.o ignconf.o boostcontrol.o multitooth.o menu.o knock.o avr/comm.o sh-2.04$
I did the above on firmware downloaded on Jan 27 and 26 Mar. 2005 with same result. I tried to reinstall Perl and WinAVR, same result.I even trid to install it on the labtop, same result. What is wrong.
I use the my_make from /docs with !WBO2 enabled.
I did manage to compile the tables with 'make mtt so something is working.
A: For production cars stick with the firmware release from:
http://www.vems.hu/wiki/index.php?page=GenBoard%2FUnderDevelopment%2FFirmwareChanges it has a precompiled vems.hex (with wbo2 enabled) in there- DB.
A2: The error you are describing seems to be related to a PRG_RDB macro change in the latest avr-libc, if you revert back to an older version you should be able to compile properly. If you do a wiki search on 'PRG_RDB' you'll see that GenBoard/UnderDevelopment/FirmWare page has another solution to your problem. Good luck - DB
Update: 03 Apr. 2005
OK. I gave up to compile the Firmware, and downloaded the released version form GenBoard/UnderDevelopment/FirmwareChanges
I got the serial port to work from perl by installing Win32-API + Serial port support. And succeded to upload Vems.hex file to GenBoard.
I tried to use Megatune, but the configuration files seems to be wrong. I can see the reealtime parameters like temp, rpm, clt, iat, a.s.o.
Then i trid to install MegaTunix, it seem to work until i enter the motor detail s page then i crashes.
So for now i only have RS232, LCD, PS2, and perl up working
I tested almost all the port's with mdhXX command.
Next i think i have to start consider how the tables.txt and config.txt will look like.
Update: 25. March 2005
I Have Connected and Tested Communication to RS-232, PS2 Keyboard, and LCD Display. I tried the mxc command, ant tried the mcd and got the whole set off parameters in return. YAHOOO....... :-)
So far it's a success; but i must say that it's not that easy, because of the lack off a better toturial or building manual.
The PS2 connection has been corrected in [the manual] - thanx for the feedback.