Digital Relay Box

Hi you all. Bit of an Arduino noob here. I do have some experience with C++, PLC and tiny bit of Arduino, but I'm not very good in that.

I have dreams for my biggest Arduino project to date. A Digital Relay Box for my motorcycle. The design will also be applicable for cars. I really need some guidance on this project so please criticize or help as you want. Best would be if someone could point me to similar projects that I can modify to fit mine (I tried search but had little results, maybe some search guru can advice). Prototype will initially be built on Arduino Mega with a display shield, that I have from RepRap project that died when 3 Printers came to cheap to build yourself (I will print housing for the project with my Ender 3 Pro). I will try to build the final version on Arduino Nano or similar. Apparently there are some new ones with lot of nice features like bluetooth and wifi.

Phase 1. 4 momentary button inputs turn on 4 different outputs. This will be with waterproof buttons with indicator LED and I'll use FETs to drive outputs.
Phase 2. Add voltage sensing to prevent the battery from being damaged by discharging. Some outputs will only work at, for example, over 13,2V, other at over 12,5V. The Arduino will turn itself off at 12.5v. Probably 10+5 megaohm voltage splitter, maybe small cap to reduce fluctuations.
Phase 3. Add PWM function to the outputs. This will be either using a resistor on analog input, or by having another button, so pressing one increases duty cycle, pressing the other decreases duty cycle, probably in 10-15% steps. This is for heated gear and dimmable LED spotlights.
Phase 4. Add current sensing to the outputs. This will be with ACS712. If the current exceeds certain preset amount, the output will shut off. It can then be turned back on by using the button. This will also have LED to indicate overcurrent status. If the buttons have multicolor inputs they will turn red when in overcurrent, green when on, blue when standby (?).
Phase 5. Implement the display to show which outputs are on and off.
Phase 6. Implement the rotary button by the display to navigate views.
Phase 7. Implement menus in the display to select values; on, off, PWM duty cycle, current threshold.
Phase 8. Add Bluetooth to control the options from my phone/tablet.

Phase 9 to infinity. Extras, extras, extras. Okay, some of these are unlikely to ever be implemented but here is a list: More inputs/outputs, GPS module for current speed, to track traveling, GSM module to call home if stolen, trip meters, fuel tank sensor, lean module for fun, accelerometer to flash the brake light when slowing down, also act as alarm when stationary, and measure acceleration, display battery voltage, real time clock to display time, display date, display outside temp, engine temp, oil pressure, turn signal option for changing out standard turn signal bulbs for LED, max speed (GPS).

Beginning guidance is the Scooterputer project that can be found on the internet archive, and various home automation projects.

Sorry for the lengthy post. :slight_smile:

What, specifically, do you want help with at this time?

Do you have code to post that we can help with? Read the forum guidelines to see how to properly post code and get the best out of the forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

If you mention hardware, post a schematic and data sheets of components.

Thank you groundFungus.
I apologize. I thought I was in the correct subforum, this one says "Project Guidance", "Advice on general approaches or feasibility."
What I'd really prefer is "if someone could point me to similar projects that I can modify to fit mine". or give me advice on general approaches or feasibility. It might save me some time if I didn't have to start from scratch, or get lost in blind alleys that I'd have to backtrack from.
Maybe some wiser person than me tells me that this project is hopeless because of some Arduino limitations that are unknown to me, or is commercially available for less money than the components.

If you are looking at “ commercially available “ , most car now use a Canbus system and Linbus in less critical areas connected to various modules - electronic control units (ECU) .
Most switches on your car connected to an ECU with semiconductor or relay outputs - it will be hard to compete against that.

Thank you hammy.
I was thinking of piggyback system that is completely isolated from the motorcycle/car communication systems. Just plus and minus to the battery, one multi cable to a switch box and one to the display (or combine these two into one box above the speedo) and then the outputs. There is a product called Addio (digital-relay-fuse-boxes that are used in fire trucks and ambulances in Sweden) that is similar to what I have in mind, but the manufacturer doesn't show prices on the website. Ergo, I cannot afford it :grinning_face_with_smiling_eyes:.
Therefore I was thinking to roll my own. While I was doing that I thought about what could be useful on top of a micro controlled relay. So I thought a vibration sensor could be brake light assist, be theft protection, maybe even sense catastrophe and call for help. GPS module for tracking, measuring distances and location finding. GSM module (or have most of these as a phone app) for call home functions. These would be included at later stages. IOT means that control by mobile phone is easily included in the latest Arduino hardware.
This project is very much in the clouds at the moment. I do have lot of the hardware needed (from other projects) but the software seems at the moment to be a nearly insurmountable mountain to climb. That is why the project has been broken into so many steps, to try to keep it more or less manageable.
I did find Scooterputer which will form the basis for some of the later stages.
I'm also open to purchasing an object like this, at a fair price, but I haven't found one.

In doing any project , have the dream in mind but tackle little bits and get them working first .
Start with your alarm for example and get that working on its own , then say gps and so on .
On the way you’ll learn a lot about the software and the rest.
Get an Arduino and play with it

And so it is the correct forum. :sunglasses:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.