and finally, the mega-post about the Megajolt Nixie Tacho, with a link to the youtube video !
(some of these comments about needing the Megajolt may seem obvious in this forum, but I'll be posting this blurb in a couple of other places, which is why it may refer to where it already is..
Greetings Hardware Hackers..
I have been enjoying the warm orange glow of the nixie appreciation fancy for a few years now and have always wanted to do something other than make a clock or a piece of lab-test equipment with them. To get nixies off the private shelves at home and into public view. (A bit like Davids famous Nixie Watch).
So for the rev-retro-heads out there. Here is the Open-Source Megajolt-Nixie-Tach !
*** Funky Music Video of Install here ***
This project has resulted in lots of questions about nixies from everyday (non tech heads) people as they notice this wacky contraption sitting on my dashboard looking like something that belongs in a De-Lorean glowing weirdly.
No doubt there have also been a few sadly shaken heads as I enthuse over a 50yo display technology - but I usually compare it to an appreciation of a fine old musical instrument with a unique warm sound that modern LED/LCD displays just don't have..
Some "Get it", but to many I probably sound like one of those old DJ's who (mistakenly) think you cant beat Vinyl & Gold Monster Speaker cables for sound or something, but who cares what they think ? The world is nuts, Everyone has to have a crazy passion for something
(I'm sure all the nixie heads will be noddling "you-know" ingly
The device is just a simple engine-tach in its current form, but there is plenty of opportunity to make it display all sorts of things. It communicates with the Megajolt Ignition System and extracts *all* the status parameters ready for display. It can have other inputs, displays and functions easily added (peak Hold RPM, Logging etc), or it can just be used as it is for a funky tacho..
It currently requires the Megajolt Ignition System to feed it engine data, but Theres no reason it couldn't be easily modified to pickup data directly from an RPM sensor, Fuel Injection System or any other source. For more information on the Megajolt, go to www.autosportlabs.com
(for their forums).
If Nixies aren't your thing, but you want a way to read and display or act on data from a Megajolt, you can just build the Arduino and OLED/LCD control part, and ignore the Nixie code. The nixies are just another device on the I2C bus and the receive/extract/display code will work fine even if they arent there. You could use the Arduino to drive an RC Servo with an needle on it for example for digitally controlled analog gauges. The possibilites are endless..
Detailed Circuit diagrams or PCB artwork are not available (yet) since it is a prototype development unit and is hand-wired with a wiring pencil. If someone wants to build their own and is prepared to draw up a circuit diagram or pcb, I will assist with descriptions of the relevant circuit details (not *every wire*, but its not that complicated because its all bus-driven - sorry, no novice kits yet) to match the code (I2c, Serial connections etc).
Otherwise, wait a month or three until I have finalized more of the software and hardware functions and I will develop a pcb and schematic for it then.
If you don't want to wait for those details and can follow basic Microprocessor wiring and read the code then I'll help (Somewhat - I wont promise to hold your hand the whole way if you're very new at it)..
I can say the Arduino is *much* easier to use, code, program and wire-up, than most C or Assembly code PIC/AVR micro programming rigs I have considered before) - More like a Basic Stamp or a PicAxe in ease of use, but Faster and more flexible.. (In my opinion of course
no flamewars please) - check their website out - www.arduino.cc
You can program the pre-made Arduino board with a usb cable, free simple software and no special programmer needed.
Future plans include more display parameters option modes, , auto-scan-mode-change, hi/low level (of whatever parameter you like from the status string) Blinking alerts. Screen savers (I just love doing the 'Nixie Wave with a row of tubes - if you know what I mean
The software I have written is open-source, available for free to everyone. Use it, Read It, Modify it, Criticize It, Improve it, and share any improvements back with everyone please
The Megajolt Status String dis-assembly and decoding into all the seperate (appropriately named - Current_Advance, RevLimit Flags etc) parameter variables is already done in software for you, it just needs minor code tweaks to select whichever one you want to display. so feel free to dive in and fiddle with that if you wanted an Advance meter or a temp gauge or something instead of a Tach.
Or add even more Smart Nixie Boards to the Bus and have both ! You can run up to 200-something digits if you're feeling rich
A Whole Nixie Dashboard is possible with this bus technique with just a few more wires and tubes if you want a big display. The Smart-Nixie sockets are also available in different types to drive just about any style of nixie you want, In-4,s In-18's, whatever...
The Buttons and Potentiometer on the control unit are wired in but have no code written for them yet .. Thats on the 'round-tuit list.
Heres a feature I want to put in there soon.. Sending Adjustments back into to the Megajolt's Ignition Advance Curve programming. Giving you a live advance knob on your dashboard for tuning the advance in unusual conditions - say on an extra hot day, and your tweaked-up-performance motor is pinging unhappily pulling under a load up a hill.. You can just dial back a few degrees of advance on-the-fly and make that nasty piston-pounding-pinging immediately vanish without having to pull out your laptop and reprogram the megajolt curve in a big block. Or if its a cool night, or you've just fed some premium fuel in and you want to try a bit more advance to see how it goes. Make the adjustments temporary - just for this drive, or permanent by writing them to the flash ram if you think your tweak is a good long-term improvement. Tune-as-you-drive. (eyes on the road - you do it by *feel*
. Sounds good, now I just need to get around to writing that bit of code
The ability to send commands and parameters back to the Megajolt are already written into the functions, I just have to do the user-interface (screens and button/knob control).
If this sounds like a must-have feature to anyone with a motor with a tendency to ping at odd times (as many rev heads know), feel free to either hack it in yourself (please share), or offer some form of inducements (not requests
to hurry up and get 'round-to-it !
If you cant induce me with temptations, then you'll just have to wait for me (or someone else) to do it, or shock-horror .... learn to do it for yourself (gasp) !!! .. Try it, its fun !
As long as you keep an unmodified copy of the original code handy, the worst you can do is turn your modified code into a crashing buggy spaz attack. If that happens, you just <sigh>, put the original saved code back in place (easy) and you're back to square 1 with a working tach while you figure out where your version of the code divided by Zero and Imploded the Arduino's Brain or something
Another possible thought is a light-level sensor on the Nixie Displays, detecting the outside (away from tubes) ambient light level, and modifying the smart sockets-PWM-Bightness parameter appropriately. As the night gets darker, the smart-nixies can be dimmed via software. If its a bright sunny midday, then return them to full brightness. (they need to be, to read in the sun unless you have them under a shady ledge).
... some more detailed descriptions on the various bits and options..
Quite a few of the components draw on the nifty gadgets and work done by others. The Boarduino is from www.adafruit.com
- The OLED/LCD is driven by an I2C interface board from www.spikenzielabs.com
and the I2C bus "SmartNixie" modules and the pre-built high voltage setup-up (5v->180v) miniature switchmode tube power supply are from http://www.tayloredge.com/storefront/index.html
If you just want the Nixie Display feature, You can leave the OLED/LCD out and connect only the smart-nixies to the I2C bus saving some cost and wiring. Not much wiring though, since the LCD and Nixies are both bus-driven, so there aren't 10 wires going to each tube like most designs. Just 4 wires in series to each unit - power, ground, data and clock, so adding the LCD or more digits (as many as you like) doesn't add much complexity, just some cost.
I found the OLED display on Ebay, I haven't seen them on many LCD suppliers websites, I think I got it from a chinese Ebay seller called "Sure Electronics" about a year ago, but I cant find them now, so might need to hunt for it.
You can use an ordinary 44780 controller type 2x20 LCD in its place if you want, but the OLED is much easier to read in Sunlight than any LCD I tried. I'll give a Futaba 4x20 VFD I have a try later
The controller can extract any parameter from the megajolt stream (as mentioned above), and has spare inputs for other pulse/analog/digital inputs (thanks to the sparing of i/o pins from using the I2C bus for the displays), so if you want to read/display any other parameter you like, voltage, turbo boost, mpg, or whatever, theres lots of room for expansion.
The existing tach/megajolt code will run on a mega168 powered Arduino (for Arduino newcomers, there are two models available, the older mega168 micro, and the newer mega328 powered board).
If you are going to expand and add more features, you might want to get the double-program-memory '328 arduino board, since the current code (with all the I2C and LCD Libraries, plus a lot of future-use code I put in there) takes up about 75% of the '168s space. The 328 will have more room to add features if you want.
I used the Boarduino variant of the Arduino - (there are many of Arduino clones) because it fitted the donut/prototype board and the case profile I wanted to use. You can use the standard Arduino with a prototype shield attached for permanent wiring or any other variant that runs Arduino code, whatever suits you.
You might find some odds and ends of code in there that don't quite seem to fit this function. I recycled some of the code starting from an earlier Arduino project (a RobotWars coin-op Controller), so if something looks superfluous or irrelevant in there, don't complain, fix it -
Likewise, if you find any bugs, or significant technique improvements, tell me.. nicely
My state-machine programming skills are years old and a little rusty, so it might look a bit weird to experienced multi-tasking coders, but it all worked first time, so they cant be *too* bad.. There was only one small bug - to do with long-to-int conversions that made the display numbers spaz out - and flicker the (currently unused) blue led tube backlights rather funkily when I reached 3276. Rpm.
When it first did that on a test run, I wondered if the (to be added) Flux Capacitor had triggered with all the blue flashing lights ! (we use metric down here in Oz, you can keep your 88mph
Experienced Programmers will likely notice the significance of that rpm number to do with the bug, Non-coders ignore it, its a binary joke
I was a bit worried about the reputedly short-lived and fragile In-4 tubes in an automotive environment. I had heard of Cathodes touching each other and sticking in bumpy applications, 0 cathodes evaporating and short In-4 life (compared to other nixies with Mercury gas added instead of pure Neon).
But so far, the NixieTach has been bumping along in my 30yo Gemini Panel Van (which hardly has the ride of a Limo), sitting free on the dash and sometimes rattling against the windscreen for over 2 months with hundreds of kilometers driven every week without a hiccup so far.
I sometimes move the unit and and out of my workshop for code tweaks, so there was no point mounting it properly. Besides I figured In-4s are cheap enough to be replaceable if one dies, wheres as the more-liked models of nixie are pricey units to risk testing in a rough auto environment until a cheaper one has paved the way, Also, it looks very "Back-to-The-Future" sitting on the dash like that
The I2C bus is running at 100Khz which provides for the potential for thousands of display updates per second (with code optimisation - it probably wouldn't go that fast, as it is at the moment), but theres no point in running that fast any. There is a software limiter/timer in there that holds the updates down to around 25 (IIRC) per second, which is plenty fast enough. Any faster and it just gets jittery.
In fact, I had to put a rather convoluted averaging & delta-limiter routines in to stop the last 2 digits being a blur of fluctuation.
Did you ever wonder why most digital tachos usually only read to the nearest 100rpm ? - Internal Combustion Engines don't hold that steady at any RPM, so there's usually no point in more precision and its difficult to do. But I didn't want to have 2 wasted nixie tubes just displaying "00" all the time, and I was sure I could get better accuracy - I could see there was only about a 10-20 rpm fluctuation on the OLED/LCD display, but even that was enough to blur the last 2 digits into an unreadable flicker..
So I fiddled around a fair bit with first averaging the RPM readings from the Megajolt, then running them through the weird bit of code I call a "delta filter".
Basically, it stores the last few rpm readings and checks the current reading against the last one to see if it has gone up (+) or down (-).
(follow closely here guys - this bit is hard to figure out by reading the code)
If it has gone down *this* reading, and the the *last* reading had gone *up* from *the one before* that, then-*if* the current delta *doesnt* exceed the pre-programmed threshold amount (currently 25), then it considers the current up/down direction reversal change *by a small rpm amount* to be noise, and ignores it, continuing to display the last rpm reading.
If the current delta-rpm (change) is in the opposite direction from the last time, and *exceeds* the threshold level (say, it last went up 10rpm, but this time has gone down by >25), then it updates with the new value.
If it has gone *up* this time, then the next block of opposite logic applies.
If it goes up or down by even *1* rpm, *and* the direction is the *same* as it was last time (indicating a constant increase or decrease, not noise jitter), then it displays even that one rpm change and updates the currently displayed value memory.
Got all that ? Phew
I tried several techniques of software filtering before I hit upon this one that seems to do the best job of stabilizing the displayed rpm, whilst still leaving it responsive and snappy (as a simpler long-period averaging function wouldn't have). I have seen Digital Tachos with 1-per-second update time which is near-useless to me, and besides looks boring to watch as the readout jumps between wide readings once a second. With this code, my tach can update RPM readings 25 (or more) times a second and still be stable to read at a constant RPM. Looks much better !
This function also allows you to read the RPM down to an accuracy of 10-20 rpm, 5-10x better than your average 100rpm minimum-step Digital Tacho. This should be useful when one gets installed in my triple-Weber-carburetted Hemi for accurate carb tuning and RPM balancing.
If you can see a better, cleaner, simpler way of simplifying that untidy big blob of if-then logic and implement the same delta-filter in some easier-to-understand code, please show me
The currently not-operating blue tube-backlights are controlled by the Auxillary output channel of the Smart-Nixies. All that is needed to activate them is to set the high-bit of the value you send them to be displayed. 88mph or 9999 Rpm anyone ? Maybe a shift-light, rev-limit warning (The megajolts Rev-Limit Status bit could trigger this) or perhaps a speed limit warning if you add a speed sensor ? Refer to the Smart Nixie documents for more detail. I'll get around to this soon
I think thats about all the bits of the code I should explain right now. No doubt if you haven't worked with I2C before, bits of the SmartNixie/LCD driver code might look confusing, but trust me, they work, if you don't understand it, dont worry, just use the I/O routines as is, and fiddle with the other bits
If the comments tabs and things are all over the place, sorry, it seems my several text editors dont agree on how long a <tab> is so different programs display the formatting differently.
Well, that was a long ramble. A bit like the video.. I meant to just snap a few pics a few months when I got it going, but the video got a bit out of hand, like this blurb
As I said, I'm not building them for anyone, but if someone else wants to build one, or make them for others, feel free.
I hope you enjoyed watching and reading about my Nixie Tach !
Last edited by Spockie-Tech on Mon Mar 29, 2010 3:08 am; edited 13 times in total