Announcement

Collapse
No announcement yet.

Feeler - Touchscreen OBC with Megasquirt CAN interface, extra sensors, outputs, etc.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Feeler - Touchscreen OBC with Megasquirt CAN interface, extra sensors, outputs, etc.

    STATUS UPDATE 11/4/2023:
    New batch of PCBs ordered, with more features. See this post for more details.

    Click image for larger version

Name:	PCB-v3.0.png
Views:	183
Size:	314.7 KB
ID:	10107682


    Hi all,

    Want to get a sense of interest in a touchscreen OBC that, among other things, is a pretty feature-rich add-on to a Megasquirt installation, and can give a MS2 some of the features of MS3.
    It would have the following features and likely more. This list is mostly what I've already had running for 2+ years in my own car, working pretty flawlessly. Feature set is up to your imagination really:
    • read data from add-on analog sensors such as oil/fuel pressure, fuel pressure, etc.
    • read data from more complicated sensors such as turbo shaft speed, accelerometers, etc.
    • make your econometer work properly with Megasquirt and bigger injectors
    • read CAN broadcast data from Megasquirt
    • send sensor data back to Megasquirt for datalogging
    • control relays
    • control boost solenoids, using Megasquirt (for example, run dome pressure control on Megasquirt 2)
    • interface with other CAN devices
    • stock OBC simulation with functional touchscreen buttons (working digital time and date)
    • OBC buttons take you to simulated analog gauges
    • recreation of e30 analog clock
    • fully customizable display if you'd like digital gauges or bar graphs or anything
    Just to make it clear: if you're running a Megasquirt, pretty much anything you can see on the screen in TunerStudio is already supported with a simple CAN connection (2 wires). See this table for the parameters that MS2 and MS3 can broadcast. MS2 users, note that not all parameters are broadcast, a "Y" in the right-most column indicates MS2 compatibility.

    If you aren't running Megasquirt, you'll still be able to get up to 10 analog sensors connected, and more digital sensors than you'd know what to do with. If your ECU broadcasts CAN data and the protocol used is publicly documented, I can probably get it to work.

    Some background:
    I've touched this list a couple times in the build thread for my VGT turbo project car. The version in my car now is very much a prototype, and I'm already working on a custom PCB design to replicate the setup, maybe with a few extra bells and whistles. Part of this redesign will be to use a TE Connectivity/Deutsch ECU-style enclosure with 2 12-pin DTM connectors for wiring to the rest of the car, with the ability to mount anywhere in the dash/glovebox area (or anywhere else it would fit). Only the touchscreen module would live in the stock OBC location, and it only needs 4 wires to connect to the Deutsch enclosure. Main reason for this change is that I already have a 12-pin bulkhead connector, a 3-pin connector, and a 2-pin connector coming out of the enclosure and I still want to add a few more sensors. 2 12-pin DTM connectors are probably too big for the OBC envelope, not to mention that it's a pain to make any modifications since the climate control panel needs to come out.

    It looks like I can only buy these PCB-mounted bulkhead connectors in moderate quantities right now, which is a significant cost, and I only want one for myself. If there's any interest in these, I can come up with a price once I finalize the design. Should be much less than most other digital dash displays, in any case, and integrates nicely. Also no reason you couldn't upgrade to a larger screen in another location (up to 10" is available).

    Status and Teaser:
    I'm going to continue to do the design work on the PCB and will update the this thread with progress. In the meantime, a few pictures and an awful video of the current setup. Keep in mind the new OBC enclosure would be smaller and be wired to the remote-ish Deutsch enclosure that would be the real brains of the unit:

    Dash display by Mikey Antonakakis, on Flickr

    Untitled by Mikey Antonakakis, on Flickr

    E30 touchscreen OBC by Mikey Antonakakis, on Flickr




    And here's a video on the line of enclosures/connectors I'm interested in:
    Last edited by mikey.antonakakis; 11-04-2023, 01:17 PM.

    #2
    it would be cool (IMO) if this or a version of this could be mounted where the check panel goes in the roof.

    88' Seta 2.7i Zinno

    https://www.r3vlimited.com/board/for...430-my-88-seta

    Comment


      #3
      I can definitely look into that!
      Edit: should be doable, to an extent. At least in the left side of the panel. The panel enclosure is 60x150x21mm, which is a weird aspect ratio. Maybe could design something with 2 touchscreens to fill it. If you only use the left side, I think you could only fit a 2.2” screen. I’ll look into it more.
      Last edited by mikey.antonakakis; 05-24-2022, 07:40 AM.

      Comment


        #4
        Nice work!

        I don't have MS anymore but may be down for the same thing that can sniff my OBD2 traffic.

        Comment


          #5
          Originally posted by hoveringuy View Post
          Nice work!

          I don't have MS anymore but may be down for the same thing that can sniff my OBD2 traffic.
          I haven't messed with OBDII, but I believe the hardware as-is will support it with software changes.

          PCB design just about finished. Might do a little sanity check after taking a dinner break lol, gotta make sure I didn't miss anything. Will probably place the order tonight, should have a batch of functional boards in ~2 weeks.

          Comment


            #6
            PCB design done, I think:

            Screenshot 2022-05-24 182951 by Mikey Antonakakis, on Flickr

            Comment


              #7
              Amazing!
              Put me down for one.
              Any idea of pricing? Would be happy to send a deposit.

              Teensy should have plenty of grunt for whatever you want to implement.



              Two concerns, which are admittedly minor:
              • Screen display/match for original LCD screens. Obviously will be a little different due to the white backlight/full colour screen. An option for backlight brightness adjustment would be ideal.
              • Texture match for surrounding plastic.

              Comment


                #8
                I'm glad I slept on it before ordering the boards. I think I will make a few changes, and I'd like to explain my reasoning:
                • The version shown above is a recreation of my prototype unit, including features that were specific to my build such as VGT interface, turbo shaft speed, etc.
                  • I added traces to the bulkhead connector for these - convenient for me!
                    • This includes things like redundant pins because I added a feature to my car after building the engine harness and didn't want to tear the harness down.
                  • But this means fewer available pins on the bulkhead connector for another person to do something different with, not a good tradeoff.
                • One of the key design features of this board is the ability to modify and prototype:
                  • There will be some standard connections that all/most setups would use, such as 12V power, CAN, analog sensor power and signals, at least one relay control, etc.
                  • Spare I/O pins of the microcontroller are broken out, as well as spare bulkhead connector pins (H14/PAxx/PBxx for bulkhead, H7 next to it for microcontroller pins)
                    • You can add a jumper wire between any microcontroller and bulkhead connector pin to add custom functionality
                    • There are blank 5-pin strips (as well as strips for the various operating voltages and ground) to give a little bit of breadboard-type capability for further modification
                In consideration of that, I'm specifically going to remove a few of the bulkhead connector traces that are specific to my car and break them out for general purpose use, configured with jumper wires. I may also:
                • Add a few more circuits for controlling relays (low side control, i.e. switching ground)
                • Wire the external display connection to the bulkhead connectors
                  • Uses up 2 pins, but might be better than doing a hole/grommet in the enclosure for a cable
                • Wire USB to the bulkhead connectors
                  • Uses 2 more pins, but again might be better than adding hole/grommet to the enclosure
                  • needed for reflashing firmware (can be used for updating the display unit software/gauge design)

                Anyway, here's a summary of the circuits in the current design, these will stay on the board:
                • Designed for the Teensy 4.0 microcontroller board. Like an Arduino on steroids with 2JZ and NOS. 600MHz, floating-point in hardware, 3 CANBUS ports (1 CAN FD), 40 digital IO pins, etc.
                • Designed with smart-touchscreen HMI displays in mind, like Nextion - only needs a serial connection, has its own processor onboard which means flexibility - don't want your display in the OBC spot or want a bigger display? No problem!
                • 5v, 3A regulator onboard to power Teensy, display, and whatever else you need
                • Teensy provides a recommended maximum of 250mA of 3.3v power.
                  • Mostly this would be used for things like analog sensors (pressure transducers are usually <10mA each)
                • SN65HVD230 CAN transceiver, works perfectly with Teensy and has great Arduino library support
                • Logic level shifter for CAN transceiver, may add breakout pins (allows 5V devices to work with the 3.3V logic level of Teensy)
                • Breadboarding/prototyping features mentioned above
                • Econometer circuit, generates the proper signal for your econometer to function properly with Megasquirt and non-stock injectors (need to adjust for injector size in software)
                • VR sensor signal conditioner, can be used for turbo shaft speed or something else (maybe vehicle speed sensor?)
                • High-side relay control - solid-state switch for switching power to an external relay coil
                Current idea of what would be in the package:
                • PCB
                • PCB enclosure with bulkhead connectors (has two mounting holes built in, mount where you see fit)
                • Teensy 4.0
                • Two 12-pin Deutsch DTM connectors with flying leads
                  • Requires you to wire into the car, but no connector pin crimping needed, like an aftermarket head unit
                  • Maybe with a couple pigtails built-in for display unit and USB
                • Adhesive-lined heat shrink for making boots for the DTM connectors (or DTM/ATM-specific heat shrink boots if I can source them)
                • Wire for using as jumper wire on PCB
                • Optional - 2.8" touchscreen with enclosure to fit in stock OBC location (optional in case you want to run a larger touchscreen or locate it elsewhere)
                  • Would include wiring to connect to the control unit
                • Optional - maybe a yet-to-be-designed touchscreen/enclosure option for check panel location
                  • Would include wiring to connect to the control unit
                Of course, open to suggestions and feedback!

                Comment


                  #9
                  Originally posted by Panici View Post
                  Amazing!
                  Put me down for one.
                  Any idea of pricing? Would be happy to send a deposit.

                  Teensy should have plenty of grunt for whatever you want to implement.



                  Two concerns, which are admittedly minor:
                  • Screen display/match for original LCD screens. Obviously will be a little different due to the white backlight/full colour screen. An option for backlight brightness adjustment would be ideal.
                  • Texture match for surrounding plastic.
                  Great suggestions! Might be able to make that delete plate work. Current concept is 3D printed housing (PETG or maybe ABS - might need to outsource to a friend or printing service for ABS) including bezel for OBC location. Would be finished smooth and painted flat black. Texture won't match but IMO it's hard to notice when you're in the car - it looked better than I thought it would. I'd love to figure how to get matching texture, so I'll go ahead and order one of those delete panels to see how feasible it would be to integrate it.

                  I've already got a brightness control page on my display, uses a slider, can turn the backlight off completely. The display... quality(?) doesn't look perfect in the car, but the tradeoff is the flexibility to program it with literally anything that fits the pixel count. Graphics is definitely not a core strength of mine but the unit will be endlessly tweakable for someone more skilled! There are monochrome amber OLEDs out there that should be relatively easy to integrate hardware-wise, but for my own project I wanted the full-color smart touchscreen since it made the microcontroller code significantly simpler and offered huge flexibility. Teensy can definitely handle driving the OLED but it would be a lot more work to get customization. For using an OLED, might be most sensible to add another microcontroller just to drive it (using serial or CAN or something to send the data).

                  Will have a more concrete idea of pricing in the next day or two. Right now I can say more than $100 for sure, and definitely less than $500. Makes it cheaper than just about any aftermarket dash display, and more feature-rich (admittedly I haven't done a thorough scan of what's out there - but I don't think I've seen anything with this price/feature ratio on diyautotune).
                  One of the trickier portions of the BOM right now is the Deutsch enclosures/connectors. I found a source that supposedly had everything in stock, but I have a feeling their e-store may have been lying since they supposedly have something that literally one other retailer in pretty much the entire world has. That other supplier has minimum order quantity of 15, which at this point I might just pull the trigger on...

                  EDIT: oh, that delete plate/box is 3d-printed, interesting. Need to look into that more.
                  Last edited by mikey.antonakakis; 05-25-2022, 07:53 AM.

                  Comment


                    #10
                    Originally posted by mikey.antonakakis View Post
                    • One of the key design features of this board is the ability to modify and prototype
                    • Wire USB to the bulkhead connectors
                    • Econometer circuit, generates the proper signal for your econometer to function properly with Megasquirt and non-stock injectors (need to adjust for injector size in software)
                    Key indeed to have modification and prototyping in mind. Considering this is designed for an aftermarket ECU, your customer base will already have this mindset and appreciate the flexibility.

                    What will be needed to interface with the USB if you go through the bulkhead connector? I can see myself having the USB connected semi-permanently as I play with the units operation until I get it where I want. It's hard to beat a female type B USB connector.

                    I was going to scrap my econometer and put a boost gauge in it's place. But if your unit makes it easy to implement, then I'll keep it for originality sake. I just have the econometer wire hanging out in my glovebox for now!


                    You may have addressed this already in your design, but I am always concerned with the "dirty" nature of a car's electrical system. (Especially since you are planning built-in analog I/O.)
                    Proper filtering, voltage regulation, shielding, and grounding are needed to make microelectronics last for the long-term in a car. It's not as bad as an Industrial environment, but there are similar considerations in terms of vibration etc.

                    Comment


                      #11
                      Originally posted by Panici View Post
                      What will be needed to interface with the USB if you go through the bulkhead connector? I can see myself having the USB connected semi-permanently as I play with the units operation until I get it where I want. It's hard to beat a female type B USB connector.

                      You may have addressed this already in your design, but I am always concerned with the "dirty" nature of a car's electrical system. (Especially since you are planning built-in analog I/O.)
                      Proper filtering, voltage regulation, shielding, and grounding are needed to make microelectronics last for the long-term in a car. It's not as bad as an Industrial environment, but there are similar considerations in terms of vibration etc.
                      The idea would be to terminate a short pigtail from the bulkhead connector with a male type-A (or B if that’s preferred). Add USB extension cable wherever you need it to go.

                      I’m admittedly not an electrical engineer, but I do analog data acquisition at my day job on a nearly 30-year-old system. Also following Megasquirt’s lead on this one, where most signal wires are not shielded. In fact I have a few of my unshielded analog signal wires laying almost directly on my igniton coils and parallel to my spark plug wires, and I see zero noise in the signals. The 5V regulator on the PCB follows datasheet design recommendations for filtering and whatnot, and all other ICs on the board do the same. 3.3v that would be used for analog signals comes from Teensy’s on-board regulator. Both layers of the PCB are filled with copper ground plane. You’d connect this to the same robust ground as Megasquirt. You’d want to twist the CAN wires, shield a VR signal, etc., but wiring harness best practices are going to be left to the user since I won’t be wiring these to people’s cars. Will definitely include recommendations, though. Let me know if you want more details on this, happy to share details of the PCB schematic on these points. For now: 12v-5v regulator will have 1000uF output buffer cap and 100uF input buffer (C1 and C2). Everything on the board is powered by that regulator.

                      I’m definitely an amateur in this area though, which will be reflected in the price compared to similar products lol.

                      Last edited by mikey.antonakakis; 05-25-2022, 09:47 AM.

                      Comment


                        #12
                        Originally posted by mikey.antonakakis View Post
                        I’m admittedly not an electrical engineer, but I do analog data acquisition at my day job on a nearly 30-year-old system. Also following Megasquirt’s lead on this one, where most signal wires are not shielded.
                        I think Megasquirt generally gets away without shielding as they advise to route signal wires away from ignition leads etc. And a lot of folks making their own wiring harnesses heed this advice.
                        Indeed on my MS3X (where I scratch built the engine loom) I have good data quality coming into the logger. Although I haven't hooked a 'scope up to the signal wires to see what is electrically present vs what is filtered out on the megasquirt side.

                        I can tell you that in my miata running a Speeduino (arduino-based ecu) on the mostly factory harness, there is sensor noise. The speeduino is a hobbyist product (and the price-point is fantastic), so I'm not expecting commercial quality out of it when connected to 30+ year old wiring.
                        The system is definitely still usable and tunable though, and that is what matters.
                        IMO with modern hardware we are asking for more then what the original ECU would have demanded in terms of signal quality.


                        Thinking out loud here about possibilities: What happens when the battery loses a negative terminal when running, and the alternator output isn't filtered by the battery? Or what about a failing voltage regulator on the alternator? People running high-energy ignition systems? Analog sensor wires get shorted to +12v when hooked up incorrectly?

                        Check out some of the tech used in the rugged arduino boards by these guys for some ideas: https://www.rugged-circuits.com/


                        All that said, you're designing and building a hobbyist product for a niche market, and it doesn't have to be perfect. As long as it doesn't fail spectacularly and set things on fire, the other points are probably moot to everyone except us nerds.


                        Comment


                          #13
                          Originally posted by Panici View Post
                          I think Megasquirt generally gets away without shielding as they advise to route signal wires away from ignition leads etc. And a lot of folks making their own wiring harnesses heed this advice.
                          Indeed on my MS3X (where I scratch built the engine loom) I have good data quality coming into the logger. Although I haven't hooked a 'scope up to the signal wires to see what is electrically present vs what is filtered out on the megasquirt side.

                          I can tell you that in my miata running a Speeduino (arduino-based ecu) on the mostly factory harness, there is sensor noise. The speeduino is a hobbyist product (and the price-point is fantastic), so I'm not expecting commercial quality out of it when connected to 30+ year old wiring.
                          The system is definitely still usable and tunable though, and that is what matters.
                          IMO with modern hardware we are asking for more then what the original ECU would have demanded in terms of signal quality.


                          Thinking out loud here about possibilities: What happens when the battery loses a negative terminal when running, and the alternator output isn't filtered by the battery? Or what about a failing voltage regulator on the alternator? People running high-energy ignition systems? Analog sensor wires get shorted to +12v when hooked up incorrectly?

                          Check out some of the tech used in the rugged arduino boards by these guys for some ideas: https://www.rugged-circuits.com/


                          All that said, you're designing and building a hobbyist product for a niche market, and it doesn't have to be perfect. As long as it doesn't fail spectacularly and set things on fire, the other points are probably moot to everyone except us nerds.

                          Couple of responses, I love FMEA so please keep firing away with what-ifs:
                          • I think a fuse would handle of lot of potential bad situations. Not sure if I want to add one to the board, gotta see if I have the space, and would need it to be user-replaceable.
                          • 5V regulator is rated for 45V so unless someone wires it to ignition coil output instead of 12V I think it will be okay in most anomalous circumstances like disconnected battery or alternator regulator dying.
                          • Generally this unit won’t be used for critical control purposes (e.g. ignition or fuel outputs). This avoids a ton of risk with things like signal noise issues causing any hardware damage in the car. With less-critical things like my VGT or wastegate solenoid control, failsafes are needed, such as failing to vanes wide open or running overboost protection on the ECU and plumbing solenoids intelligently.
                          • Pigtail out of the unit will be short, up to user to shield signal wires if their install necessitates it. Doing any wire-specific shielding negates some ability to customize. Maybe I could run a shield over that whole pigtail, though.
                          • Running analog sensors on 12V or something will probably first kill the sensor. Gotta think about how to save the Teensy if a device internally shorts its signal to 12V, that’s a good point.
                          • Low-pass analog filters might be nice to clean up analog signals. But easy and effective to implement in software (I use this on my dome pressure sensor, I’m not running any restrictors in the air lines and the pulsing solenoids add a lot of ripple to the air pressure). Tradeoff here is that it would be pretty tricky to make adjustable filter cutoff frequencies, so what fixed value do I use? They would need to be selectable in case a user doesn’t want it.
                          Last edited by mikey.antonakakis; 05-25-2022, 11:57 AM.

                          Comment


                            #14
                            In other news, who likes orange? The enclosure I have in mind comes in an orange Ultem material option (aka PEI). Also comes in black PA66 and clear polycarbonate.

                            Click image for larger version

Name:	EEC-325X4A-E016.jpg
Views:	531
Size:	61.2 KB
ID:	10056651

                            Comment


                              #15
                              Originally posted by mikey.antonakakis View Post
                              Low-pass analog filters might be nice to clean up analog signals. But easy and effective to implement in software (I use this on my dome pressure sensor, I’m not running any restrictors in the air lines and the pulsing solenoids add a lot of ripple to the air pressure). Tradeoff here is that it would be pretty tricky to make adjustable filter cutoff frequencies, so what fixed value do I use? They would need to be selectable in case a user doesn’t want it.
                              Ah, I keep forgetting how much power the Teensy processor has to work with. Much easier to implement in software so that it's fully configurable.

                              Ooo I like that orange case. Any kind of transparent gets my vote, nice to get a peek at the inner workings!

                              Comment

                              Working...
                              X