Replace PI: Advice on wireless comms / control between arduino devices

Hi community,

I’m pretty new to the Arduino world!

I realise a couple projects with the PI previously but I got sick of the PI (not python). It is too“powerful” for my demand.

However, I just finished my first project for my pool valves with an Arduino and now I would like to proceed on Arduine, replacing an existing project I realised on the PI.

I operate 3x8 Outlet Bars via the PI, hard wired via I²C.

Main Functions is to switch the outlets ON/OFF in a timed sequence but each outlet can also be switches individual.

Reason behind that is that I run a bunch of studio audio equipment, computers and office stuff what I don’t want to switch on in one go (mixer, speakers’, outboard equipment, monitors, PC, etc.) to avoid possible cracking noise on the speakers + convenience :blush:.

I would like to substitute my PI as it is interconnected hard wired to the 3x8 Outlets and doesn’t give me flexibility when I changed my studio setup (cabling, routing change), what happens twice in the last 5 years.

Also, it’s just annoying waiting for the Pi to boot up. I usually power all down.

So I’m looking for the power up and it straight works solution “wireless”.

Since my SW skills are moderate I would like to ask you guys what Arduino’s I can use to realise my project? Wi-Fi or Bluetooth? What would be easier for a kind beginner to program to communicate with several devices? I also look for a rapid function in comms once I power on the stuff.

I attach a sketch and pictures so you guys have an impression what I’m looking for.

I look forward to you attaching a sketch and pictures...
But seriously,

Thanks
C

Since I can only attache one image per post

Cheers Richard!

On the left side is the new Arduino world, I'm thinking of. Wireless, with an "Keyboard via USB, Numeric." I guess any other design as per sketchg would blow up investment. But numeric would be fine with me,

Any Arduino like controller with WiFi will do for the three units controlling outlets. With the MCP23017 setup you have in the picture, one could handle it but I suspect that you want to have them physically dispersed. An ESP32 would do, maybe a Wemos D1 mini, even though the latter doesn't have many I/O pins.

I'm not sure what your head unit needs to do, specifically how it's supposed to command sequences and how those would be set up. Will they be hard wired in the code, or is there to be a mechanism to change them without refreshing the unit?

Hi, thanks for your reply.

I couldn't answer earlier as I was limited 24h to 3 replies.

I would like to remove the MCP’s. Connect the Relays Board directly.
So 8 DO’s per socket Arduino is required.

From the SW side I want the same kind of I did on the PI, but I’m not sure in the moment if it can work with class objects and real time as I did with the PI.
I guess with a Wi-Fi device it can request the time from my NTP server (router), but also needs an RTC.

---- Simplified SW pilosophy ----

Head Unit

The head unit requests at start, after change or periodically the state of 3x 8 sSockets.
When a sequence or a single socket switch get entered at Head Unit:
Head Unit set’s a timecode & switch state for relevant socket(s) and sends it to the 3x8 socket Arduinos dependently.

3 Bars Units

Each of them will receive it’s new struct and switch dependently when the current time is >= the timestamp in struct.
If the 3 Socket Arduino have no RTC, I might just keep this part in the Head Unit and tell them straight to switch from Head Unit.

User Input

I segregated the Sequences from single toggles via an Input Mode selector.

I used a 4x4 matrix so Key 13 Mode 1 => Socket Bar 1, Key 14 => 2 & Key 15 => 3. To toggle a single socket via 1-8 Keys.

Key 16 would enter the Sequence Mode, where I would switch a sequence via 1-8.

The sequences where hardcoded to my demand as I pretty much have only 4 ON sequences and 2 OFF sequences. They usually don’t change.

100% exact timing is not a problem. I have only one more important sequence where the mixer boots up, so the Speaker must come on after full boot of the mixer.

With the key input I would change values in the relevant Arrays (class).
Once the current time is >= timestamp at the Arrays (class) -> SW switches the Socket depending of the Switchcode and sets the Switchcode back to 9 (do nothing).

The class:
Class Socket (DeviceName, MCPAddress, PinNr,Switchcode,SwitchTime)
DeviceName “Mixer” a Sting for the Device connected on Socket
MCPAddress 0x21 – 0x23 for the MCP’s
PinNr What Output Pin on the MCP
Switchcode 0= Switch OFF, 1= Switch ON , 2= Toggle, 9 Do Nothing
SwitchTime Switchtime in form of datetime.now()

Than I created 3 Arrays for each of the SocketBars
I hope it's not confusing :slight_smile:


I think the best solution would be that the Head Unit manages all.
Reads & sends state of sockets as it will require a RTC.
The Sockets Units will just receive 8bits and set the outputs or answer to a state request.

Cheers Richard!

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