Arduino sniffer? bridge? signal replicator?

Hello smart people!

I need some guidance to get my project going.
Brief background, I am good at googleling and mostly be able to tackle through new projects,
but I am stuck at the moment, because I don’t even know the correct terminology to google.

I am basically trying to hack a coffee machine to do more and better things then the factory settings.
For instance, I would like to make the machine be able to make 2 consecutive espresso shots instead of 1 for stronger coffee.

[Front PCB] <----------------------------> [Back PCB]

The front PCB is for menu selection and Back PCB is for electronic control (motor, valve,etc).
I have very limited information on how and what they communicate.
The wire is a 4-wire (5v, GND, Rx and Tx) and Back PCB has an AtMega16A chip.

*** So which every data they are sending back and forth, I would like to intercept it and
send exact same data or send the same data twice, etc using an arduino (Uno, Mega, etc).

[Front PCB] <--------------[ Arduino] --------------> [Back PCB]

Any help and guidance will be greatly appreciated!

Monitor the switch with the Arduino.

When a push has been detected, have the Arduino send the signal to the existing circuit and then start a timer.

When the timer interval is over, send a second signal to the existing circuit.

Maybe add another (2 shot) switch to the front panel too.

Get the coffee making slave arduino working first by simply sending it commands from the serial monitor. When that is sorted out, then get the menu arduino working to send the commands to the slave arduino. The communication between the two is pretty simple.

Hi @zoomkat and @larryd

Thank you for the prompt response.
I am a beginner in electronics and programming and only have few experiences.
So please bare with me if I don't make sense or use wrong terminology.

What I have tried so far, is use arduino as oscilloscope, capture the serial data, and send it to the back board.
[Front PCB] --- (data A) ---> [Arduino osciloscope] ---> (data A*) ---> [Back PCB]
But every reading is slightly different by 0.5ms, and have a slightly different pulse width and the Back PCB does not recognize the signal and give error.

I think I need to first find out the coffee machine's baud rate?

Having double coffee shot made is one of the example. The coffee machine has many many functions that I wish to change.
So is there a simple way to capture any pulse or data given at any given time?
Say if the coffee machine's procedure is:

  1. Grind bean
  2. Brew coffee
  3. Dispense milk
  4. Dispense sugar

Then I would store 4 Tx from Front PCB (lets ignore ack data from back pcb for now) and re-arrange the order like this:

  1. Dispense milk
  2. Dispense sugar
  3. Grind bean
  4. Brew coffee

"I think I need to first find out the coffee machine's baud rate?"

You have not shared anything about the coffee machine, so right now that is your piece of the puzzle. Does the coffee machine itself have external communication capabilities for external input/control?

Hi zoomkat

I have very limited information on my coffee machine, and the coffee machine manufacturer won’t disclose the datasheet.
I’ve attached some pictures for better visualization.

The front and back pcb has 1 set of wires ( 5v, GND, Rx, Tx) and that is the only wire that they use for communication. I’ve marked it with red circle in the attached pictures.

So finding out baud rate, and other things is my task, which I need help with :frowning:

If the communication is a rs232 variant, then you might be able to use an arduino as a sniffer, but there are other communication protocols that might be in play. What is the resting voltage on the tx and rx lines?

Resting voltage on Rx, Tx line is 5v.

Edit: Resting as in if there is no data, then it is at 0v, and when data is transmitted, then the voltage goes up to around 5v.

"Resting as in if there is no data, then it is at 0v,"

TTL usually is at 5v with no data. You might explore the other data communication protocols the arduino can use and see if you can make a data sniffer using those.

Should I use something like RS232 to TTL convertor?

Or can I still use arduino to capture block of data with analogRead and send the same data with analogWrite?
Will this be possible?

The front pcb stores menu selection (eg: how much coffee, sugar, hot chocolate is dispensed in seconds).
My final goal is to eliminate the Front PCB, after successfully capturing all the data.
So that in future I can remotely make coffee with my phone, etc.

So ideally the best and simple solution would be that if I can just capture blocks of data that is sent out from the frontPCB and be able to replicate and send to back PCB, then it would be perfect.