Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Count input
Author | Message | ||||
steveizett Newbie Joined: 15/05/2012 Location: AustraliaPosts: 21 |
Hi people I am wondering if a Micromite Count input can simultaneously (not actually at the same time, but using the same pin) read a fuel injector signal to read both: A. Frequency for RPM B. Period for calculating fuel flow I'm using 64 pin chip and only have 1 x Count input available. Thanks very much. Steve |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3167 |
Yes it could, just reconfigure the pin using SETPIN and it will switch measuring modes. However, for measuring the fuel consumption you want to measure the pulse width (time that the injector is open), not period. To do that you would need to switch the pin to a digital input and use the PULSEIN() function to measure the pulse width. After that you could switch back to measuring frequency. Geoff Geoff Graham - http://geoffg.net |
||||
steveizett Newbie Joined: 15/05/2012 Location: AustraliaPosts: 21 |
Thanks very much Geoff. And of yes 'period'! when I meant pulse width. I hadn't thought of resigning the pin function. Had only seen this as something fixed at initialisation. Has anyone done this (fuel flow) with a micromite and have example code. I think the injector setup is pretty standard with 14v feed and low side fet's switching Ov to energise. Would you recommend your circuit from "Getting Started with Micromite" for input conditioning? 10k in series with input and schottky to 3.3v rail. I take it I just need a low current sckottky like a BAT85 30v 200mA?Again, thanks for the help. Steve |
||||
robert.rozee Guru Joined: 31/12/2012 Location: New ZealandPosts: 2294 |
my understanding is that there are both low voltage (solenoid) and high voltage (piezo electric) injectors, but that both use a fairly hefty current. see: http://autoditex.com/page/common-rail-injector--piezo-crip-26-1.html piezoelectric: over 120v, 8A or more. you may find it more convenient to use a small current transformer to measure this. wrt reconfiguring micromite pins, why not just use several pins connected together, each configured differently? remember, you only really need to measure the drive to one of the injectors, as they will all be driven pretty much the same (assuming no fault). cheers, rob :-) |
||||
Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3167 |
I'm not much of an expert on cars but that sounds fine - perhaps someone else can chime in. Geoff Geoff Graham - http://geoffg.net |
||||
steveizett Newbie Joined: 15/05/2012 Location: AustraliaPosts: 21 |
Thanks guys. Rob, I only have one Count pin left due to other commitments. I'm measuring the fuel burn of a 13b Rotary with Primary and Secondary injectors which are different flow rates. Under low power the secondaries will be off so planned to measure pulse width of both. Your question has got me thinking if the pulse widths vary between Pri and Sec's. I should put a CRO on them and check under load with secondaries firing. If not then I just need to know when the secondaries are firing in order to calculate the total flow. Then any activity on the secondaries is enough information to do the calc. I was wondering about timing and how much work the micromite will have to pack in between injector events etc. if redline is say 8000rpm and each injector fires once per revolution then we have 450mSecs between events so I suppose its going to be asleep a good part of the time. Steve |
||||
steveizett Newbie Joined: 15/05/2012 Location: AustraliaPosts: 21 |
What was I thinking. 7.5mSec per event. Steve |
||||
steveizett Newbie Joined: 15/05/2012 Location: AustraliaPosts: 21 |
Question for clarification! Does Pulsein require the associated pin to be one of the COUNT pins? Steve |
||||
Print this page |