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

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • mikey.antonakakis
    replied
    Originally posted by It's Soda Not Pop
    The service interval lights in my car are going to be converted to shift lights. I already have the board to do so ( I've had it for 2 years now, lol being lazy) Would this be something you could do as well to work hand in with your touch screen or maybe a new thing all together. Just a thought. There is only one company I think actually doing it right now.
    https://www.e30ig.com/#1thing
    Whoa cool! I think that should be doable in several different ways. Do you know how I can find more details on how to program the set points or installation instructions or something? That might help clue me in on how it works.

    Leave a comment:


  • It's Soda Not Pop
    replied
    The service interval lights in my car are going to be converted to shift lights. I already have the board to do so ( I've had it for 2 years now, lol being lazy) Would this be something you could do as well to work hand in with your touch screen or maybe a new thing all together. Just a thought. There is only one company I think actually doing it right now.

    Leave a comment:


  • mikey.antonakakis
    replied
    Oh! Apparently the website did not lie, just got a shipment notification for the 3 full enclosure kits! Definitely lights a little bit of a fire to get PCBs ordered!

    Leave a comment:


  • mikey.antonakakis
    replied
    Slight delay on PCB revisions discussed previously, and therefore a slight delay in placing the order (got sidetracked working on my VGT control algorithm). As mentioned, I'm not an electrical engineer, but figured out how to use some of their tools with no formal training - a dangerous combo!

    I've been using this questionable skillset at my job to design some prototype PCBs for battery-powered IoT devices, with several iterations done by this point. This is an application in a very hard environment (freight railroad), albeit with very little in the way of EMI. They have been working great in the field, but to scale up to higher volume we've hired a design firm to review the current PCB design and either suggest revisions or redesign from scratch. Overall, I apparently did a decent job, but they had several "best practices" type suggestions to improve long-term durability, decrease power-supply noise, etc. Things like "if an IC pin uses multiple bypass capacitors, put the smaller one closer to the pin." Super helpful for me, and I will be including the suggestions in the revisions to the touchscreen OBC board design before I place the order.

    Goal is to make the revisions and order the boards before the end of the weekend. I've also ordered 3 full enclosure kits (enclosure, bulkhead connector header, etc.), as well as 15 bulkhead connector headers. The bulkhead connector is the part that's super difficult to find in stock, and I suspect the 3 full kits I ordered were not actually in stock as claimed by the seller. But the 15 hard-to-get connectors are on their way and should be in-hand very soon.

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici
    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.
    Recursive filter can be done pretty computationally efficiently too! Adding filter poles (sharper cutoff) increases computation, but in the case of PID control I want to minimize phase shift so I stick with 2 poles. You need two 3-element arrays to store recursive data, and you do a few additions and multiplications and one division each time around to update the loop. For example, here's the code for a 2-pole Butterworth low-pass for 8Hz cutoff at 50Hz sample rate.

    Leave a comment:


  • Panici
    replied
    Originally posted by mikey.antonakakis
    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!

    Leave a comment:


  • mikey.antonakakis
    replied
    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:	939
Size:	61.2 KB
ID:	10056651

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici
    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, 10:57 AM.

    Leave a comment:


  • Panici
    replied
    Originally posted by mikey.antonakakis
    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.


    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici
    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, 08:47 AM.

    Leave a comment:


  • Panici
    replied
    Originally posted by mikey.antonakakis
    • 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.

    Leave a comment:


  • mikey.antonakakis
    replied
    Originally posted by Panici
    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, 06:53 AM.

    Leave a comment:


  • mikey.antonakakis
    replied
    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!

    Leave a comment:


  • Panici
    replied
    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.

    Leave a comment:


  • mikey.antonakakis
    replied
    PCB design done, I think:

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

    Leave a comment:

Working...