I for one love the "boring stuff"....You Sir are a great teacher...I appreciate your hard work not only on the project but also all the time editing and setting up the cameras...Well done.
The boring stuff is actually the "nerdy" stuff us geeks like Us mechanic/computer nerds are actually really stoked about this stuff...believe it or not
I've used encoder buffer chips like an LS7366 to read hall effect sensors. They just count the number of pulses and when the arduino needs to know the speed, it asks the buffer for the current count and divides it by the time elapsed since the last time it asked. If you use something like a Teensy 4.0, it has 4 encoder buffers built right into the microcontroller. Reading a variable reluctance sensor would require some digital filtering, but it looks like you already have that handled.
I had the same suggestion with the teensy for sensor input there is even premade lib made for measuring input frequency. Cool to see you watch this channel too I love your other videos.
He's broken it down so well into steps that it makes it easier to grasp what's going on. The big deal with modern computer controls is they're monitoring lots of channels and making changes based off a lot of information, and all those interactions can make things a lot more confusing. CAN still escapes my diagnostic skills and equipment. Lol just causes me grief, thankfully I'm not a tech at a shop, I'm a company mechanic and we don't have too many newer rigs.
@@fredv7487 a lot of the information that the system uses is locked, hidden away from access by non licensed scantools and it really makes it tough sometimes. All I want to know is if a solenoid is being commanded to do something and I can't even do that. It's a multi-facetted issue but overall your statement is correct. They don't want us working on them
Hey Jimbo, I hung around to the very end, not wanting to miss a chance to have my head drug through the mud. I am impressed that you are one of few folks that know the computer magic and still are not afraid to get your hands dirty. And also know righty/tighty lefty/loosey.
You sir are a real genius! Oscilloscopes, Arduinos, writing programs, fabricating! The thought process in making all these decisions! It's always a blast watching your videos!😮
I just grabbed some coffee and was about to head out into my own shop and realized that it was Sunday, so I just had to check for a new RC video. These episodes bring me great joy, and I learn a lot. I'm surprised at how dirty the signals are from these sensors. I had this imaginary vision of engine sensors in my head that they put out these perfect digital square waves and never have noise. In actuality they look like me trying to draw a sine wave with a broken crayon. Who woulda thunk?
Thanks again...GADGETS! This was a nice walk down memory lane; O-scopes, processing, etc. It's been decades since I got to think and work on things like this. Next: and, or, nor gates?
Excellent results. When I tinker my sucess rate is much lower than yours. I replaced one of the O2 sensors on my old truck with a signal generator. It took me nearly two years to get the signal to match the original sensor. Then after a month of working perfect the "simulator" died. Definitely jealous!
Jimbo, what you did with the sine signal was exactly what i was needing to do for a while with a project of mine, thank you for the ideas! Also, that H brige hack was genius. Transistor is transistor i guess... Anyways, greetings from Argentina!
i have to admit it ,i am hooked on your channel. I am so impressedc with your all round mechanical and electrical knowledge and abilities. Not to mention your programming and machining skills and of course your crazy imagination.
Thank you for the extra bit at the end.... I always like the extra information.. I get to learn stuff that I didn't really know relearn stuff that I once knew but forgot... I used to be the self-proclaimed dangerous but wannabe expert for writing the initialization string my old us robotics 28.8k bps modem. And when writing for an external modem, using the old serial port on my my dad's 286 I used to have to know all that stuff... irq or interrupt request, and many other things that I can't remember but a good initialization string help the modem perform the handshake faster which was important when running a bulletin board system, which I did in the early to mid-90s.. I loved running elk lodge, it was an awesome bbs. Running the Citadel 86 software.
I appreciate the bonus clip because I was a little confused about that specific thing during the main video and found the additional explanation very enlightening.
Instead of frequency to voltage converter to measure RPM. Using input capture to measure period of proximity signal uses less parts, and will be more accurate, and fast response if needed. I use timers for EFI and electronic advance ignition systems. AVR is easy and fast just using C. Have achieved over 10K RPM with 4 cylinders.
Hey Jimbo, this is my favorite channel on UA-cam. Thank you for all the fun builds and I completely and thoroughly understand and appreciate work done every episode. It's really cool what I have learned from you and your projects, so Thank You!
Awesome! For me its far from boring Not a complete novice (megasquirt , speeduino - NO2c of course!, and even made my own opensource arduino AFR gauge display and "convertor" so I can see what my wideband sensor is doing on an LCD screen and drives an analogue gauge - using a DAC...so this project is right up my alley!) Edited to add I got the same frequency generator a few months ago, only used it a couple of times, but seems to work OK Your explanations are second to none and I am 100% sure they will be referred to for years to come and inspire others to tinker/make or even just think about how you could approach a project Keep up the great work Jimbo Regards from the UK
I've been a auto mechanic for almost 25 years I understand how the sensors work and hoe to diagnose a bad one but never understood the whole "code" part of a pcm the stuff you call boring is the stuff I signed on for awsome job 👍
Amazing! Once again my favorite automotive start up JIMBO MOTORS is teaching myself and others valuable info about electronics and coding in a way I can actually retain it. I hope you are taking care of yourself Jimbo we love the content and its worth waiting till next week for the next update
Now for withdrawals to set in until I get my fix next Sunday. I have enjoyed your channel for years now. Keep up the great work and I cannot wait to see once this project runs its course to see what comes up next!
Not sure how fast you need to update the frequency measurement, but first thing I thought of when you were describing the interrupt cycle was to use the square wave input as a counter trigger and set it to do an interrupt every n counts rather than every single rising edge. Alternatively you can set a timer to trigger at known time intervals and read/reset the counter every j milliseconds. (Pick something smart like 125ms and your frequency in Hz is counter
The thing you have to consider is that this micro controllers has an 8 bit cpu that is running at 16Mhz (consider the cheapest, slowest x86 PC runs at 1.1Ghz and has a data width of 64 bits). Frequency calculation takes quite a bit of processing time. If he was running an esp32 (32 bits at 240Mhz) there would be more time for tach inputs. With the method Jimbo is using he can get the analog voltage with just 2 cpu clock cycles(its probably more like 6 cycles but that breaks my narrative) reading one of the internal 10bit ADCs. All the the scaling to units of measure is done in the external DAC (the electronic frequency gizmo). No cpu math needed to get a relative speed. It doesn't have to be 100% accurate, it has to fast and close enough. If the processor was a bit faster then your timer method would work well.
@@georgehooper429 "Frequency calculation" takes essentially no CPU time at all if you use the device properly. A timer/counter is a peripheral that utilizes zero CPU cycles unless and until the interrupt condition is met. Whether a counter incrementing on an external signal or a timer incrementing/decrementing on the system clock, the CPU itself is not involved until the interrupt triggering circuits are satisfied and the interrupt is triggered. The ADC actually operates in a similar way; You tell it to take a sample by setting the appropriate bit in the control register, and the CPU does other things until the ADC triggers an interrupt that the sampling/conversion is complete. The CPU then has to stop what it's doing and move the result out of the ADC's data register before doing anything else or risk the data getting overwritten. Alternatively you can put the ADC into free-running mode where it's constantly sampling and will trigger an interrupt every time a new conversion event is finished, or configure the ADC to sample and convert based on a timer or other trigger event with no CPU intervention. Again, if you're smart and pick a good time base for your sampling frequency, the counter/timer method is equivalent in terms of CPU utilization; The "math" is simply a bit shift left which is 1 CPU cycle. If you're smarter still, you can probably skip that "math" and just use the unscaled value as-is since it's just a constant, and if all you care about is relative magnitude then 0-32 in steps of 1 is exactly as good as 0-256 in steps of 8 if you don't need the full precision (as an example). Using an external DAC also works, clearly, but as mentioned in the video introduces another layer of imprecision as it converts pulses to analog that then needs to be converted back to digital. Squeezing the data through a 0-5v window, plus likely environmental noise, loses precision. Good enough is good enough, though...
A lot of folks seem to forget that the arduino is also driving two stepper motors. The core of the program is focused of moving those steppers as fast as possible. Doing direct frequency measurements on the RPM and vehicle speed would absorb too much time using standard code. And yes, I'm aware it can be done with advanced code.
Just like the rest of Jimbo's overkill, even using interrupts is too complex, inefficient and requires too much programming. The Arduino's ATmega328 has counter/timers that will do the whole job in just a few lines of code - and hugely accurately and quickly. His use of extra hardware, particularly those frequency-to-voltage converters, really messes with my OCD. Converting a digital frequency to a voltage and then converting it back to a digital value is just crazy. Also, Atmel AVRs inputs will trigger at about 1.0 - 1.3V, so the transistor/half-bridge was also unnecessary. The inputs also have schmitt triggers, so that will deal with noise. At the end of the day, Jimbo could have solved the coal-burning problem by opening up the governor and removing a spring to disable it - instead of all the servos, sensors and electronics. But his videos are nevertheless entertaining!
You may not have been proud of your gizmo but I would have been over the moon if I had managed to have even thought it, let alone achieved it, I can't imagine anyone ducking out before the end your video. Thanks for the enlightenment.
Gotta love when theory becomes reality, as boring as you may think it is it's really interesting to those of us that don't have an electronics background, thanks!
I suffered to the end and I'm always happy for analog solutions in the digital world. Sometimes a simple solution to a complex problem is elegant, sometimes it's a kludge. The important thing is to know the difference. LoL Thank you for the video.
Great Work, Jimbo ! Even tho electronics are not my favorite thing to mess with, you still make it watchable and dumb it down enough to keep a Caveman like myself entertained and seated until the end of each video.
So fun watching you interface with the A/C vehicle speed signal with an Ardiuno as I was doing the exact same thing with an arduino on my suburban to control the Torque Converter Clutch. Great stuff!
Ngl the "boring" items actually explain the very simple operation of a basic ecm, currently working on swapping a diesel motor into a jd lawn tractor so using your kids as a reference in the future, cheers
I really like your explanation of why your using a F/V board instead of direct software conversion. I may have to go and revisit an old project that has been gathering dust for various reasons. Thank you very much! 😀
I watched it right through to the end. I have a great interest in Arduino projects and learning about these limitations and workarounds is of great insight. I was completely glued to the entire episode Bravo!
Yup! We're getting there! Good work! Progress, progress, progress! I can see that we are getting closer to having the right electronics and sensors to get this "Kubonda" getting where we need to be. Soon, all of those knobs will be gone, and we be back to running performance tests. Keep it going!
As a car / van / motor cycle owner for over 73 years i must admit i have no idea what your doing or what all these gizmos are for but i love your videos thanks.
(EDIT: I see we get a special section talking about interrupts at the end.. EDIT2: As far as documentation, well, you're going to look at the datasheet and which registers are available and how to configure them. It's just not documented in a single place at that point, because now you have to find corresponding variables exposed for those registers.) Man, you mentioned a voltage converter and I'm sitting here thinking about a voltage regulator and wondering what on earth you're talking about with frequency (especially if it's linear) and why it would even matter. 😆... That said, I imagine if you configure an interrupt on an input pin on the Arduino (Or you might be able to configure a counter peripheral, not sure without looking at an ATMega datasheet, but an interrupt is definitely doable), you could just count the pulses directly instead of worrying about a frequency to voltage converter. At 200Hz I imagine the overhead wouldn't be terrible or necessarily impact the rest of the program. Do I think you're going to do this? Probably not, especially if your existing solution is functional. Now for some more information you may or may not know and may or may not care about.. The Teensy line of devices generally has a much more powerful processor than an Arduino while being in a smaller package, so if 200hz was a problem with the Arduino counting pulses directly, there are alternatives out there that have a much higher operating frequency and wouldn't care at all. Also, I've played with a few of the STM32 Discovery dev boards and those processors are also very powerful, also have a Nucleo I may not have touched in a while. Lots of good options /if/ you're ever interested in going further. Teensy is Arduino IDE compatible so pretty easy to use. The STM32 dev boards can be a bit more work.... Also your beep at 9:08 just now made me think my sump alarm was going off. How dare you? 😆
There are also the more powerful ST microcontrollers in the Arduino footprint, I was a fan of the M0 but I think they discontinued it. I ended up using a MKR series last time I was fiddling with them as it had a 16 bit ADC
@@Sevalecan totally home brew. The Pico outputs trigger op-amps that act as buffers and drivers to darlington transistors, which then fire the fuel injectors and bipolar stepper motor for IAC. I’m testing a second version now that adds distributorless ignition control. The Pico is easily fast enough, and the dual processors really helps.
I tend to wait until I've got 100% focus to watch these videos because they pack in so much information. The best time for me to ensure 100% attention is to wait until til everyone else is asleep. As such it's usually late and I'm tired. So I guess I fell asleep during the last video because I don't remember what's going on!
that frequency to voltage converter idea has probably solved some headaches for my future self on a project I've been planning for - as a part of doing an EFI conversion on a Suzuki Super Carry (yes the big block 1L engine! aus spec almost-kei truck) I've got a set of Suzuki GSX-R throttlebodies - these run a secondary set of throttles above the main set (that you control) and are ran by a stepper motor, most people just remove this but I feel like an arduino with some clever code, sensors/controllers should allow this to be utilised like its original intent - smoothing throttle response, increasing torque via inlet air speed, and overall just making it respond 'nicer'. anyway one of the challenges I knew was coming up was how to get engine RPM in a 'nice to work with' way for the arduino. anyway I'll put my order in for a few of those, thanks again for the ever-intriguing videos on these projects of yours.
Arduinio can count pulses much better than that pulse to analog thing, and it has two interrupt pins so you can have both sensors with nanosecond accuracy. To calculate rpm in that encoder is better to use the time between rising and falling edges, that way you have the rpm in every pulse and no need to wait counting pulses
@@jontscott you are right, with small frequecy signals it can be done easily in the main loop but doesn't make much sense. It is a very simple program, the rising interrupt is only storing micros() in a var and the falling one is micros() - that var. the main loop for a kalman filter and the ops to get from time to rpm
Oh yes, I stayed around. I like your theme music of the odd band of drums, bass, keyboard brass, ukulele and vibraphone. Yes, vibraphone! Anyway, I love the content too. I’m not only here for the music.
Brilliant, amazing content Jimbo, you are clearly a man of multiple talents. I'm loving the Arduino content and in-video graphics that you've added into this episode, they really help people to understand which bits you are working on and what they look like. Keep up the great work 🙂
You should switch to an adafruit m4 metro board. There is a lot more horsepower available, and it still mostly works like an arduino does. I bet any code you have now works just the same. The only downside will be the 3.3V limit... The biggest bit would be the multiple timers and the DMA, you can capture frequency/period directly with them to a very high accuracy and move those measurements into memory for your calculations without any cpu intervention at all. That all sounds really complicated to configure, but it's not too hard and there are plenty of examples on the net. I use a very similar DIY board to measure 4 wheel speed sensors and pipe them into an aftermarket ECU for traction control. All said and done, I can measure frequency from tenths of hz up to several kilohertz. Timers on an uno are pretty pitiful in comparison. I'm sure it would do the same, but you might run out pretty fast. They are also much lower resolution, and won't span such a large frequency range.
My Mercedes 300SD had a switch under the accelerator pedal called a 'kickdown switch' that engaged 1st gear if you really stomped on the throttle. That might be a good way to engage your full rack emergency acceleration mode in your Insight.
Fascinating again this week Jimbo! 😃 I'd just commented, liked and hit the screen to leave this discourse when I caught on that there was more! So I immediately returned to listen to your last part, thus proving my point of just how respected you and this series is in my estimation! 👍👌
Now were talking! 3D printed knobs on the manual controller!!! Love it. For vehicle speed. how about a magnet affixed to one of the half shafts with a Hall effect device as a detector?
Great work this is what i like to see. I have a few custom circuits I've designed and installed in my performance car. I even ran my own custom firmware for a while before I swapped it to Haltech for convenience.
Also ty for explaining why you are using frequency converter before the Arduino. I myself couldn't figure out why it was so hard to get stable signals in the Arduino when the spec sheets said it should do it, being software/firmware issue makes sense and explains why i had to do so much coding to get my projects working reasonably.
Jimbo there are oodles of channels out there that stuff a weird engine into a weird car, get it running and quit. I've always wondered what it would take to get one of those projects to be civilized as a daily driver. Thank you so much for showing all the 'boring stuff'. I'm now seeing why those mere mortals just stop, you're a mechanical AND electrical wizard Harry!
Hey Jimbo, as always love the crazy work you're doing! If you're wanting to have a 2nd look at the interrupts for the RPM measurement I'd be more than happy to help you through this. For your setup it can be done in just a few lines of pretty standard code in the Arduino environment and I have no doubt we could get it running a little nicer than the frequency to voltage if you want :)
The ultimate in tinkering video series. You know, it would be possible to programme the car so it could sense when it’s doing an emissions test and the engine could automatically go into a low emissions mode to pass the test! And then revert back to rolling coal settings once back in the real world. Brilliant
You know with a speed sensor and that rack controller you could quite easily incorporate cruise control .. I'm not saying you'd want to .. but you're in a prime position to be able to do so!
I for one love the "boring stuff"....You Sir are a great teacher...I appreciate your hard work not only on the project but also all the time editing and setting up the cameras...Well done.
I agree with everything in this comment. Thanks for adding the second part to the video for the rest of us.
The boring stuff is actually the "nerdy" stuff us geeks like
Us mechanic/computer nerds are actually really stoked about this stuff...believe it or not
@@haydenc2742 exactly
@@haydenc2742 Not only do we like it, but I'm impressed with the clear explanation for those who've never used interrupt-driven code.
I've used encoder buffer chips like an LS7366 to read hall effect sensors. They just count the number of pulses and when the arduino needs to know the speed, it asks the buffer for the current count and divides it by the time elapsed since the last time it asked. If you use something like a Teensy 4.0, it has 4 encoder buffers built right into the microcontroller. Reading a variable reluctance sensor would require some digital filtering, but it looks like you already have that handled.
I had the same suggestion with the teensy for sensor input there is even premade lib made for measuring input frequency. Cool to see you watch this channel too I love your other videos.
I love how simple you make all this look! Suddenly automotive computer systems don’t seem so difficult. Thanks Jimbo!
He's broken it down so well into steps that it makes it easier to grasp what's going on. The big deal with modern computer controls is they're monitoring lots of channels and making changes based off a lot of information, and all those interactions can make things a lot more confusing.
CAN still escapes my diagnostic skills and equipment. Lol just causes me grief, thankfully I'm not a tech at a shop, I'm a company mechanic and we don't have too many newer rigs.
They just want you to think it's so complex, so you bring it to them for repairs. Money, money, money.
@@fredv7487 a lot of the information that the system uses is locked, hidden away from access by non licensed scantools and it really makes it tough sometimes. All I want to know is if a solenoid is being commanded to do something and I can't even do that. It's a multi-facetted issue but overall your statement is correct. They don't want us working on them
Don't be fooled. The arduino here is doing next to nothing in comparison to a modern ECU. Sorry
@@surewhynot6259but it is comparable to a 80s-90s ECU, like a Motronic or a Digifant.
This episode, Jimbo drives 20 feet! And its exciting! 😁
And then we get punished for being interested in the bonus 🤦♂️
Great video!
"My favorite programming language is solder" - Bob Pease
hello... im pretty sure everyone that watches your channel is here for the rambling🤣
always a great day after ROBOT CANTINA...THANKS JIMBO
Hey Jimbo, I hung around to the very end, not wanting to miss a chance to have my head drug through the mud. I am impressed that you are one of few folks that know the computer magic and still are not afraid to get your hands dirty. And also know righty/tighty lefty/loosey.
Thanks!
Tbh, this is the type of stuff that keeps the world running. Ingenuity breeds invention and advancement. I love this stuff.
Your explanation of how interrupts work at the end is brilliant. I'm sure you would do a great job of explaining how a stack works.
You sir are a real genius! Oscilloscopes, Arduinos, writing programs, fabricating! The thought process in making all these decisions! It's always a blast watching your videos!😮
I just grabbed some coffee and was about to head out into my own shop and realized that it was Sunday, so I just had to check for a new RC video. These episodes bring me great joy, and I learn a lot. I'm surprised at how dirty the signals are from these sensors. I had this imaginary vision of engine sensors in my head that they put out these perfect digital square waves and never have noise. In actuality they look like me trying to draw a sine wave with a broken crayon. Who woulda thunk?
Thanks again...GADGETS! This was a nice walk down memory lane; O-scopes, processing, etc. It's been decades since I got to think and work on things like this. Next: and, or, nor gates?
Coffee, check, comfortable seat, check, annnnnnnd action!
Cool video. Liked the bit at the end that got a little more in depth in the technical challenges with the electronics.
Appreciate the little appendix bit. Good explanation of why the analog converter is necessary.
Excellent results. When I tinker my sucess rate is much lower than yours. I replaced one of the O2 sensors on my old truck with a signal generator. It took me nearly two years to get the signal to match the original sensor. Then after a month of working perfect the "simulator" died. Definitely jealous!
O2 signal simulators used to be available to "fix" the check engine light, Sadly they are hard to find these days.
Jimbo, what you did with the sine signal was exactly what i was needing to do for a while with a project of mine, thank you for the ideas!
Also, that H brige hack was genius. Transistor is transistor i guess... Anyways, greetings from Argentina!
Glad I could help
I learned a lot in the last 4 minutes. I can see why you put it there, but that's the
kind of stuff I enjoy.
I love learning the ins and outs of these sorts of things so the end bit was really appreciated.
Love the content Jimbo. Gearhead and Electrical Engineering all in one place.
Those are the best type!
I am glad I stuck around. Thank you Jimbo.
I came for the cool gear head stuff. I stayed for the informative electronics stuff. 😉
14:44 better stay till the end so glad I got to hear the whole jingle every Sunday.
That car runs cleaner now than a Volkswagen during an inspection. 😎
i have to admit it ,i am hooked on your channel. I am so impressedc with your all round mechanical and electrical knowledge and abilities. Not to mention your programming and machining skills and of course your crazy imagination.
3rd time watching this slice of genius. Thank you for sharing all your hard work and skills!
Thank you for the extra bit at the end.... I always like the extra information.. I get to learn stuff that I didn't really know relearn stuff that I once knew but forgot... I used to be the self-proclaimed dangerous but wannabe expert for writing the initialization string my old us robotics 28.8k bps modem. And when writing for an external modem, using the old serial port on my my dad's 286 I used to have to know all that stuff... irq or interrupt request, and many other things that I can't remember but a good initialization string help the modem perform the handshake faster which was important when running a bulletin board system, which I did in the early to mid-90s.. I loved running elk lodge, it was an awesome bbs. Running the Citadel 86 software.
I have learnt to stay 'til the end for the Easter eggs. It's fun watching this develop, waiting to see what happens next week. Good work Jimbo.
I loved the 2nd segment and the way that you didn't mention it and left it for us to figure out
Pretty cool
I appreciate the bonus clip because I was a little confused about that specific thing during the main video and found the additional explanation very enlightening.
Thanks for explaining how all these sensors and inputs work.
Instead of frequency to voltage converter to measure RPM. Using input capture to measure period of proximity signal uses less parts, and will be more accurate, and fast response if needed. I use timers for EFI and electronic advance ignition systems. AVR is easy and fast just using C. Have achieved over 10K RPM with 4 cylinders.
❤I look forward to every new video every Sunday 🎉🎉🎉🎉🎉 thanks guys
❤id love to spend a week or 2 with you guys...love your channel
Hahahaha great ending. Again I’m just loving the practical thought processing to solving problems for efficiency. Rock on.
the plate visible in the acceleration exhaust tests made me chuckle... looking forward to next episode as usual
Hey Jimbo, this is my favorite channel on UA-cam. Thank you for all the fun builds and I completely and thoroughly understand and appreciate work done every episode. It's really cool what I have learned from you and your projects, so Thank You!
I really appreciate the massive amount of time and effort you're putting into this project, you're one clever guy 😎
Awesome!
For me its far from boring
Not a complete novice (megasquirt , speeduino - NO2c of course!, and even made my own opensource arduino AFR gauge display and "convertor" so I can see what my wideband sensor is doing on an LCD screen and drives an analogue gauge - using a DAC...so this project is right up my alley!)
Edited to add I got the same frequency generator a few months ago, only used it a couple of times, but seems to work OK
Your explanations are second to none and I am 100% sure they will be referred to for years to come and inspire others to tinker/make or even just think about how you could approach a project
Keep up the great work Jimbo
Regards from the UK
I've been a auto mechanic for almost 25 years I understand how the sensors work and hoe to diagnose a bad one but never understood the whole "code" part of a pcm the stuff you call boring is the stuff I signed on for awsome job 👍
Great info Jimbo. Love the computer tech. Keep up the good work.
Amazing! Once again my favorite automotive start up JIMBO MOTORS is teaching myself and others valuable info about electronics and coding in a way I can actually retain it. I hope you are taking care of yourself Jimbo we love the content and its worth waiting till next week for the next update
Now for withdrawals to set in until I get my fix next Sunday. I have enjoyed your channel for years now. Keep up the great work and I cannot wait to see once this project runs its course to see what comes up next!
Thanks for demystifying the electronical stuff. 😎
I really like the fusion between the micro processor and mechanics
Its not boring to me. .
Not sure how fast you need to update the frequency measurement, but first thing I thought of when you were describing the interrupt cycle was to use the square wave input as a counter trigger and set it to do an interrupt every n counts rather than every single rising edge. Alternatively you can set a timer to trigger at known time intervals and read/reset the counter every j milliseconds. (Pick something smart like 125ms and your frequency in Hz is counter
I had the same thought and posted it in a separate comment. Hopefully Jimbo sees these.
The thing you have to consider is that this micro controllers has an 8 bit cpu that is running at 16Mhz (consider the cheapest, slowest x86 PC runs at 1.1Ghz and has a data width of 64 bits). Frequency calculation takes quite a bit of processing time. If he was running an esp32 (32 bits at 240Mhz) there would be more time for tach inputs. With the method Jimbo is using he can get the analog voltage with just 2 cpu clock cycles(its probably more like 6 cycles but that breaks my narrative) reading one of the internal 10bit ADCs. All the the scaling to units of measure is done in the external DAC (the electronic frequency gizmo). No cpu math needed to get a relative speed. It doesn't have to be 100% accurate, it has to fast and close enough. If the processor was a bit faster then your timer method would work well.
@@georgehooper429 "Frequency calculation" takes essentially no CPU time at all if you use the device properly.
A timer/counter is a peripheral that utilizes zero CPU cycles unless and until the interrupt condition is met. Whether a counter incrementing on an external signal or a timer incrementing/decrementing on the system clock, the CPU itself is not involved until the interrupt triggering circuits are satisfied and the interrupt is triggered.
The ADC actually operates in a similar way; You tell it to take a sample by setting the appropriate bit in the control register, and the CPU does other things until the ADC triggers an interrupt that the sampling/conversion is complete. The CPU then has to stop what it's doing and move the result out of the ADC's data register before doing anything else or risk the data getting overwritten. Alternatively you can put the ADC into free-running mode where it's constantly sampling and will trigger an interrupt every time a new conversion event is finished, or configure the ADC to sample and convert based on a timer or other trigger event with no CPU intervention.
Again, if you're smart and pick a good time base for your sampling frequency, the counter/timer method is equivalent in terms of CPU utilization; The "math" is simply a bit shift left which is 1 CPU cycle. If you're smarter still, you can probably skip that "math" and just use the unscaled value as-is since it's just a constant, and if all you care about is relative magnitude then 0-32 in steps of 1 is exactly as good as 0-256 in steps of 8 if you don't need the full precision (as an example).
Using an external DAC also works, clearly, but as mentioned in the video introduces another layer of imprecision as it converts pulses to analog that then needs to be converted back to digital. Squeezing the data through a 0-5v window, plus likely environmental noise, loses precision. Good enough is good enough, though...
A lot of folks seem to forget that the arduino is also driving two stepper motors. The core of the program is focused of moving those steppers as fast as possible. Doing direct frequency measurements on the RPM and vehicle speed would absorb too much time using standard code. And yes, I'm aware it can be done with advanced code.
Just like the rest of Jimbo's overkill, even using interrupts is too complex, inefficient and requires too much programming. The Arduino's ATmega328 has counter/timers that will do the whole job in just a few lines of code - and hugely accurately and quickly. His use of extra hardware, particularly those frequency-to-voltage converters, really messes with my OCD. Converting a digital frequency to a voltage and then converting it back to a digital value is just crazy.
Also, Atmel AVRs inputs will trigger at about 1.0 - 1.3V, so the transistor/half-bridge was also unnecessary. The inputs also have schmitt triggers, so that will deal with noise.
At the end of the day, Jimbo could have solved the coal-burning problem by opening up the governor and removing a spring to disable it - instead of all the servos, sensors and electronics.
But his videos are nevertheless entertaining!
I just watched the second part to the video. That is exactly the explanation I was hoping to get! Thank you Sir! I am learning a lot from you.
You may not have been proud of your gizmo but I would have been over the moon if I had managed to have even thought it, let alone achieved it, I can't imagine anyone ducking out before the end your video. Thanks for the enlightenment.
Gotta love when theory becomes reality, as boring as you may think it is it's really interesting to those of us that don't have an electronics background, thanks!
I suffered to the end and I'm always happy for analog solutions in the digital world. Sometimes a simple solution to a complex problem is elegant, sometimes it's a kludge. The important thing is to know the difference. LoL Thank you for the video.
Great Work, Jimbo !
Even tho electronics are not my favorite thing to mess with, you still make it watchable and dumb it down enough to keep a Caveman like myself entertained and seated until the end of each video.
So fun watching you interface with the A/C vehicle speed signal with an Ardiuno as I was doing the exact same thing with an arduino on my suburban to control the Torque Converter Clutch. Great stuff!
The ending segment was very informative, I learned something. I didn't realize that is how an IRQ acts. Very interesting
I learned that converting the frequency range to logic is simple and better than using a voltage converter.
LOVE the explanation at the end! Thank you!
LOVE LOVE LOVE your show! Your explanations help a lot -
After all this time working on this project, when it's all said and done, this car will become one out of the famous marvels of the world. 👍
Ngl the "boring" items actually explain the very simple operation of a basic ecm, currently working on swapping a diesel motor into a jd lawn tractor so using your kids as a reference in the future, cheers
I really like your explanation of why your using a F/V board instead of direct software conversion. I may have to go and revisit an old project that has been gathering dust for various reasons. Thank you very much! 😀
Glad it was helpful!
I watched it right through to the end. I have a great interest in Arduino projects and learning about these limitations and workarounds is of great insight. I was completely glued to the entire episode Bravo!
Yup! We're getting there! Good work! Progress, progress, progress! I can see that we are getting closer to having the right electronics and sensors to get this "Kubonda" getting where we need to be. Soon, all of those knobs will be gone, and we be back to running performance tests. Keep it going!
Not boring, fascinating and illuminating! 😊👍
As a car / van / motor cycle owner for over 73 years i must admit i have no idea what your doing or what all these gizmos are for but i love your videos thanks.
I never find your content boring, Jimbo. Another great video. 👍
I don't have a clue what you're talking about when it comes to Electronics, but I love it. You are really smart, Jimbo. Keep up the great work 👍🏻.
(EDIT: I see we get a special section talking about interrupts at the end.. EDIT2: As far as documentation, well, you're going to look at the datasheet and which registers are available and how to configure them. It's just not documented in a single place at that point, because now you have to find corresponding variables exposed for those registers.) Man, you mentioned a voltage converter and I'm sitting here thinking about a voltage regulator and wondering what on earth you're talking about with frequency (especially if it's linear) and why it would even matter. 😆... That said, I imagine if you configure an interrupt on an input pin on the Arduino (Or you might be able to configure a counter peripheral, not sure without looking at an ATMega datasheet, but an interrupt is definitely doable), you could just count the pulses directly instead of worrying about a frequency to voltage converter. At 200Hz I imagine the overhead wouldn't be terrible or necessarily impact the rest of the program. Do I think you're going to do this? Probably not, especially if your existing solution is functional.
Now for some more information you may or may not know and may or may not care about.. The Teensy line of devices generally has a much more powerful processor than an Arduino while being in a smaller package, so if 200hz was a problem with the Arduino counting pulses directly, there are alternatives out there that have a much higher operating frequency and wouldn't care at all.
Also, I've played with a few of the STM32 Discovery dev boards and those processors are also very powerful, also have a Nucleo I may not have touched in a while. Lots of good options /if/ you're ever interested in going further. Teensy is Arduino IDE compatible so pretty easy to use. The STM32 dev boards can be a bit more work....
Also your beep at 9:08 just now made me think my sump alarm was going off. How dare you? 😆
I’ll add that the RPi Pico is fast enough to directly count the pulses. I’m using one for fuel injection control on my old truck.
There are also the more powerful ST microcontrollers in the Arduino footprint, I was a fan of the M0 but I think they discontinued it. I ended up using a MKR series last time I was fiddling with them as it had a 16 bit ADC
@@gregholloway2656 That's fun. Did you use any of the Speeduino kit for FETS + drivers or go for a more home brew solution?
@@Sevalecan totally home brew. The Pico outputs trigger op-amps that act as buffers and drivers to darlington transistors, which then fire the fuel injectors and bipolar stepper motor for IAC. I’m testing a second version now that adds distributorless ignition control. The Pico is easily fast enough, and the dual processors really helps.
love the vanity plate Jimbo. thanks for all y'all do.
thanks for giving us some insight to the controls!
I tend to wait until I've got 100% focus to watch these videos because they pack in so much information. The best time for me to ensure 100% attention is to wait until til everyone else is asleep.
As such it's usually late and I'm tired.
So I guess I fell asleep during the last video because I don't remember what's going on!
Arduino/car integration vids make me happy... i am still watching...
Come for the music, stay for the content.
that frequency to voltage converter idea has probably solved some headaches for my future self on a project I've been planning for - as a part of doing an EFI conversion on a Suzuki Super Carry (yes the big block 1L engine! aus spec almost-kei truck) I've got a set of Suzuki GSX-R throttlebodies - these run a secondary set of throttles above the main set (that you control) and are ran by a stepper motor, most people just remove this but I feel like an arduino with some clever code, sensors/controllers should allow this to be utilised like its original intent - smoothing throttle response, increasing torque via inlet air speed, and overall just making it respond 'nicer'. anyway one of the challenges I knew was coming up was how to get engine RPM in a 'nice to work with' way for the arduino. anyway I'll put my order in for a few of those, thanks again for the ever-intriguing videos on these projects of yours.
Practical engineering at its very best.
this is turning into a very interesting project! the "boring stuff" wasn't so boring at all
Arduinio can count pulses much better than that pulse to analog thing, and it has two interrupt pins so you can have both sensors with nanosecond accuracy. To calculate rpm in that encoder is better to use the time between rising and falling edges, that way you have the rpm in every pulse and no need to wait counting pulses
Agreed, using input capture on a timer is a much more efficient option I think. However for these 'slow'
@@jontscott you are right, with small frequecy signals it can be done easily in the main loop but doesn't make much sense. It is a very simple program, the rising interrupt is only storing micros() in a var and the falling one is micros() - that var. the main loop for a kalman filter and the ops to get from time to rpm
I for one like the more technically stuff. I'm a construction plant mechanic but have interest in IT and programming 👌
Excellent presentation. Thank you. Amazing job at explaining things.
Perfectly explained. Fantastic video!
Thanks for the explanation at the end!
Oh yes, I stayed around. I like your theme music of the odd band of drums, bass, keyboard brass, ukulele and vibraphone. Yes, vibraphone! Anyway, I love the content too. I’m not only here for the music.
Brilliant, amazing content Jimbo, you are clearly a man of multiple talents. I'm loving the Arduino content and in-video graphics that you've added into this episode, they really help people to understand which bits you are working on and what they look like. Keep up the great work 🙂
You should switch to an adafruit m4 metro board. There is a lot more horsepower available, and it still mostly works like an arduino does. I bet any code you have now works just the same. The only downside will be the 3.3V limit...
The biggest bit would be the multiple timers and the DMA, you can capture frequency/period directly with them to a very high accuracy and move those measurements into memory for your calculations without any cpu intervention at all. That all sounds really complicated to configure, but it's not too hard and there are plenty of examples on the net. I use a very similar DIY board to measure 4 wheel speed sensors and pipe them into an aftermarket ECU for traction control. All said and done, I can measure frequency from tenths of hz up to several kilohertz.
Timers on an uno are pretty pitiful in comparison. I'm sure it would do the same, but you might run out pretty fast. They are also much lower resolution, and won't span such a large frequency range.
at the very least an ESP32...horsepower and 1/2 in relation to the Arduino
I always watch to the end. Nice bonus this time 👍👍👍
My Mercedes 300SD had a switch under the accelerator pedal called a 'kickdown switch' that engaged 1st gear if you really stomped on the throttle. That might be a good way to engage your full rack emergency acceleration mode in your Insight.
Shooooo, lets go! I already had a cup and im on my second coffee and ready to see what the Cantina has in store! Thanks as always, Jimbo!
Fascinating again this week Jimbo! 😃 I'd just commented, liked and hit the screen to leave this discourse when I caught on that there was more! So I immediately returned to listen to your last part, thus proving my point of just how respected you and this series is in my estimation! 👍👌
Thanks for that!
Jimbo is so humble dude is a genius.
or a mad scientist....or a mixture of both ;)
Thank you. IMO you didn’t have to edit anything out. That’s what we’re all here for if you ask me.
We would love to see a Blue Motion E6 AdBlue system on the diesel. And with a self cleaning system. Thank you.
I am looking forward to seing the MPG gains from the arduino setup. I really enjoy this video series. thanks
Glad to find this series....very entertaining 👍
I wish i had enough patience to build something as unique as this .
This is dope, mans making his own ecu
Now were talking! 3D printed knobs on the manual controller!!! Love it. For vehicle speed. how about a magnet affixed to one of the half shafts with a Hall effect device as a detector?
Great work this is what i like to see. I have a few custom circuits I've designed and installed in my performance car. I even ran my own custom firmware for a while before I swapped it to Haltech for convenience.
Also ty for explaining why you are using frequency converter before the Arduino. I myself couldn't figure out why it was so hard to get stable signals in the Arduino when the spec sheets said it should do it, being software/firmware issue makes sense and explains why i had to do so much coding to get my projects working reasonably.
You're a smart guy, Jimbo.
Jimbo there are oodles of channels out there that stuff a weird engine into a weird car, get it running and quit. I've always wondered what it would take to get one of those projects to be civilized as a daily driver. Thank you so much for showing all the 'boring stuff'. I'm now seeing why those mere mortals just stop, you're a mechanical AND electrical wizard Harry!
Hey Jimbo, as always love the crazy work you're doing! If you're wanting to have a 2nd look at the interrupts for the RPM measurement I'd be more than happy to help you through this. For your setup it can be done in just a few lines of pretty standard code in the Arduino environment and I have no doubt we could get it running a little nicer than the frequency to voltage if you want :)
The ultimate in tinkering video series. You know, it would be possible to programme the car so it could sense when it’s doing an emissions test and the engine could automatically go into a low emissions mode to pass the test! And then revert back to rolling coal settings once back in the real world. Brilliant
You know with a speed sensor and that rack controller you could quite easily incorporate cruise control .. I'm not saying you'd want to .. but you're in a prime position to be able to do so!
This didn't come up on my feed today. I had to search for it. Previously, it's always come up.