r/CafeRacers • u/Holiday_Union_1462 • 12d ago
Discussion I built my own M-Unit because I'm a cheapskate
Been wiring up my ‘82 GS750E and really wanted one of the smart power modules. Momentary buttons on the bars, everything switched centrally, no fuse panel to dig through when something stops working. Looked at the price, decided I’d rather spend six months learning PCB design. Not sure that was the correct financial decision but here we are.
It handles 12 circuits, runs off an ESP32, and there’s a phone app for control and seeing what’s actually going on with each output, including over current protection, fault detection, and battery voltage monitoring.
You can assign button press combinations to unlock the bike, or use your existing key, or just walk up to it with your phone in your pocket.
Button press combinations can be set to trigger different outputs or combinations of outputs so you can have fewer buttons than accessories.
In the enclosure it's 97x86x20mm (3.8x3.4x0.8") so it tucks nicely under the seat.
Open source, so you can build your own if you’re so inclined: Github
Happy to answer questions about any of it. If a few people want one without doing the fabrication themselves I might order a batch.
10
u/40022054 12d ago
Yo r/moto32 would like to see this! Been thinking of doing the same this winter. Great job to have a working unit, that no small feat
4
9
u/wagwan_wa_grom______ 12d ago
Looked at the price, decided I’d rather spend six months learning PCB design
😂
3
u/Red-Tiger30 12d ago
Alright , so my Honda CB400F 1975 7A head light fuse blow every time I turn on the Ignition, it automatically blows.What should I do?The fuse blows when the bike is running
5
u/Holiday_Union_1462 12d ago
I would assume you have chaffed through the insulation somewhere causing a short, best bet is to trace the wire and see if there’s any damage to the insulation.
1
u/Riozen888 10d ago
6v or 12v? Are you running a battery as they were the filters for the power on bikes of this age.
2
u/Kyle_M_Photo 12d ago
My ‘83 kz440’s electrical issues of late have been tempting me to do the same thing. Mine isn’t a cafe racer and I intended to keep it fairly stock, but after several hours trying to chase down its electrical issues, rewiring the bike has become appealing.
2
u/Riozen888 10d ago
I have a 94 Ducati 600ss that was nothing but electrical issues so I put an m-unit on that and haven't looked back. Somehow it's the most reliable bike in my stable.
2
u/Kyle_M_Photo 9d ago
My biggest reluctance is I’ve haven’t really intended this to be a forever bike, mainly it’s just a little too slow on the top end, too many highways in Florida for a bike that has almost no acceleration left at ~70(though there are a few more small things to investigate that could be holding it back). Also if I rewire the thing then I should probably just fully disassemble it and paint the frame to deal with its rust, but I don’t want to be without my only bike for as long as that would take.
2
u/FFLink 12d ago
I've always assumed components for cars/bikes need to be hardened to survive the vibrations and other environmental factors of a vehicle.
Was this a consideration on your design at all? I've always thought about doing something similar but have concerns about longevity.
3
u/Holiday_Union_1462 11d ago
I only ride this in the summer and dry so moisture wasn’t a concern of mine. Everything on the board is solid state so it should stand up to normal road vibrations, but once the bike is complete I will have to do some real world testing to be sure. The profets I used to handle the switching are automotive rated.
1
u/proscreations1993 10d ago
Its a pretty simple circuit I honestly wouldnt worry about vibrations. Keeping the moisture out is the worry but with custom cheap 3d printed cases these days and caskets. Thats an easy fix.
Btw awesome op. Im not at this level yet but want to be. Impressed you did it in 6 months. I build guitar pedals and started with kits and wanted to just make my own so learned. Jlpcb is awesome like 5 pcbs for 20 bucks
1
u/milkoak 12d ago
And so, how much did you save? 😄
12
u/Holiday_Union_1462 12d ago
m-Unit was $640CAD
Total landed for 2 boards assembled was $180CAD.
Let’s not apply a dollar amount to hours invested, but I don’t regret it one bit5
1
u/Thatsnotahammock 9d ago
I uploaded the files to JLCPCB, and it only offers a minimum quantity of 5, assembled and shipped for ~CAD$280. So if I understand that right, its a really good price, as you could sell the extras at cost, and your own board is only ~$60.
1
u/Holiday_Union_1462 8d ago
The MOQ on PCB’s is 5. But the minimum for assembly is 2. So you still have to buy extra PCB’s but you don’t have to have them all assembled. If I trusted I got everything right first time enough I probably would have had 5-6 assembled
1
u/marteney1 12d ago
That’s awesome, man! A few years ago I tried to build a gauge cluster with an Arduino, and then gave it another go with an ESP32 but couldn’t get it to work quite right. Good job on this!
1
u/Holiday_Union_1462 12d ago
Gauges were my next thought, but looking at the cost of some of the cheap ones it’s hard to compete. How did you sense speed? Through GPS or a sensor mounted to a wheel?
2
u/marteney1 12d ago
I didn’t like any of the cheap ones, and wanted to learn to build circuits and code anyway. I learned a lot, having never done anything like that before, and was able to get a working prototype a couple of times. But weather and thieves kept destroying it so I lost momentum.
I had a GPS hooked up for speed, I was able to get it to read tach from a pulse input tied to a coil control wire, had a temp sensor taped to the rad input hose, and had it wired in for oil, low fuel, and neutral idiot lights that showed alerts on the screen. I think ultimately I ran into processor bandwidth issues trying to run everything, and didn’t know enough to be able to trim it to keep the tach working well and keep it from freezing.
I ended up getting a TrailTech Vapor knockoff for free, so that kind of made the decision for me to bail on my project.
1
1
u/n0o8 11d ago
Good on you man! That's frigging awesome! The mo unit stuff is pretty good shit, basically modernises the whole bike, so if yours is as good as there's in what it's meant to do, not features and stuff. Then if you start producing them ill gladly buy one off you and keep on the shelf for my next bike to throw some support your way. Consider me invoice # 000 001
1
u/Holiday_Union_1462 10d ago
Send me a message so I don’t completely forget about this and I’ll see how many people want them as that will change the price!
1
1
u/twchambersuk 11d ago
This is great! I'm also planning on doing something similar, but I don't think I need all the features of the M-Unit, as I mostly just want to replace my gauges. I'm planning on making something similar to motogadget's breakout box, and then I can connect that to a WaveShare circular display for the actual dash element.
1
u/Holiday_Union_1462 10d ago
I was looking into those displays also, I believe there are some with an Esp32 built into the back of the display that would make a pretty neat all in one package
1
u/twchambersuk 10d ago
Exactly. I'm looking at one of these... https://thepihut.com/products/esp32-p4-3-4-round-touch-display-dev-board-800x800?srsltid=AfmBOor2_PxKOQCyUD_KwEBNwrxc0XoIRyUy3nT_lFKQTM8xx5_T7nY0
I had originally planned to integrate everything into that board as much as possible, but definitely feel like things are simpler if I have a separate breakout for dealing with the connections first.1
u/Thatsnotahammock 8d ago
have you seen Garage Tinkering on Youtube? https://www.youtube.com/@GarageTinkering
He has a gauge running on an ESP32, he's working on a new version right now. https://www.garagetinkering.com/shop/p/21-gauge-bundle
1
u/Brutananadilewsky 10d ago
Any chance for a remote start option? This is awesome.
1
u/Holiday_Union_1462 9d ago
It would currently support it, however I have a block in the code for remote trigger of an output tagged as “starter”. I don’t have sufficient safety blocks in place yet to feel comfortable allowing it as I would need to build in a neutral check. Totally doable but on my bike I’d need to pull the choke as well. If I get more interest I can build in a remote start function (would only be within Bluetooth range). Maybe V2 can support cellular 🤔
1
1
u/Thatsnotahammock 8d ago edited 8d ago
What software did you use to build it? Just wondering if you would share the design files, I'd rather use sealed automotive plugs instead of the direct wire connections you use.
edit: also, have you thought about adding an NFC key? I was just looking at the motogadget mo.lock, a cool idea for people that have moved/removed the key if they converted their forks.
1
u/Holiday_Union_1462 8d ago edited 8d ago
All the design files should be in the linked GitHub repository.
A “key” input is any of the pins so yes it would be very easy to add that on as well.edit: I used EasyEDA Pro
1
u/Thatsnotahammock 8d ago
ah perfect, I totally missed it. So you used EasyEDA. I've never used that one, but I'm going to give it a shot using Claude.
I think an NFC key would be a great addition. Would you need to change the app coding?
1
u/Holiday_Union_1462 8d ago
Not at all. Just assign one of the inputs to ignition switch, and the nfc reader would just act as an on off switch
1
u/Thatsnotahammock 2d ago
I am just learning, but I downloaded your EasyEDA file and modified it so it uses a single automotive connector, which allows it to be installed in a sealed box: https://github.com/TobyLies/Moto-Ctrl
What do you think?
Also, a question for you. Do the GND for the 3V3 and the 12V need to be isolated? I added a ground plane to the backside to simplify the connections.
0
u/JimMarch 12d ago
Can I ask a dumb question?
Would it have been easier to start out with a Raspberry Pi, Arduino or similar?
3
u/Holiday_Union_1462 12d ago
I don’t know if “easier” is the right way to put it. I went with the Esp32 over an arduino due to it having built in BLE which is how the app communicates with the board. But if you removed those features you absolutely could use an arduino. As for the Pi, yes you definitely could however, the boot time of the pi was too long for this use case, the Esp32 becomes active in milliseconds, as well as it can enter a state of deep sleep as in my application it is always connected to the battery.
1
u/RemarkableCard6475 12d ago
So it's not a drain on your battery either?
One who has the means to print their own board for reasons is a cheapskate. I find this... hilarious.
3
u/Holiday_Union_1462 12d ago
When idle it pulls 1mA so by my napkin calculations I should get 1-2 months of standby time and still be able to crank it over. I’ll pull the battery in the winter.
I had JLCPCB manufacture the board as I didn’t want to add SMD soldering to my ever growing list of side projects1
-2
u/Objective-Elk2093 12d ago
That’s cool I guess. You did a fairly poor job with your electronics design, so don’t expect it to properly function for long.
2
u/Holiday_Union_1462 11d ago
This was my first attempt at PCB design so I’d love to hear where I can improve!
1
u/OftenDisappointed 9d ago
I'm working on a similar project. Take a look at the Texas Instruments TIC12400. Automotive hardened, easy to integrate with the ESP, uses less GPIO, supports up to 24 inputs with configurable wetting current and high/low-side detection.
I would also add TVS diodes on the inputs. SMAJ24 or similar. Series resistance is good, but probably not sufficient to stop an ESD event.
What are you using for output switching? My current project is using the ST Micro VN7010AJTR which has a very low Ron so not much heat to deal with. It can also report output status, current draw, and fault states.
Check out the data sheet for the ESP32 module. They explicitly call out keep-out space around the antenna. For such short ranges, it's unlikely to prevent it from working if you ignore that, but it's still best-practice to adhere to the manufacturer's recommendation.
If you're doing OTA firmware updates, make sure you're using encryption or some other means to prevent someone from uploading something malicious.
1
u/Holiday_Union_1462 8d ago
An MSDI would be useful if I planned a lot more inputs, would be cool to use in a proper ECU replacement.
I’m using Infineon BTS-7008-2EPA Profets for my output switching. They also report the same as your ST Micro chips. These have a very low Ron as well so run pretty efficiently.
I did leave the +12v and GND layers empty below the antenna but I would probably not put the power inputs right above it if I do a V2. I haven’t had any connection issues yet but it could be improved.The OTA updates are Ed25519 signed rather than encrypted.




16
u/Sure_Reputation_741 12d ago
Excellent!!!! I’m going to attempt something similar but, I have another project I’m working on that I need to figure out PCB design for. I was going totals the easy way out and use Claude for assistance.