DTU

GRUPPE6

41030 MECHATRONICS ENGINEERING DESIGN

Two way communication prototypes

What have we done so far?

  • Tested 2-way communication with LED-strips and radar via NodeRed.
  • Send relevant data through NodeRed that the arduino processes and runs as a variable in a function.
  • We implemented a trigger to smooth out the blossoming because of internet latency
  • Used interrupts for the radars

Next Steps

  • Implement the stepper motor
  • The power could be a problem
  • Rewire as small as possible

For the last couple of days we have been working on getting the product to work as intended. Wednesday that culminated in two working prototypes that share the same code base. We have gotten this to work with only the LED's and the radar so far. We have structured the code in such a way that every stage of the flowers cycle runs correctly. When we get the mechanism to work and figure out where the LED's are gonna be placed, the coding of the LED's specific patterns can start. 

The coding works by having Node-RED send an array of strings to the Arduino which the Arduino then processes. It is known throughout the system what data corresponds to what place in the array, that way the Arduino knows that the second index of the given array corresponds to the color of the LED's at that time. This allows us to change the colors of the LED while it is running as long as it keeps getting an updated color each time we change it in Node-RED. This is now working and it works very well.

Due to internet latency and hardware limitations it is not possible for the Arduinos to light and turn off in real time. We have therefore added a buffer system in Node-RED that makes sure the products light up and fade when they have to. We have made a trigger system that resets a timer every time it receives an activity message from the Arduino. If it doesn’t receive a message within a 20 minute time period, Node-RED will send a fade command to the corresponding product. This way the products won’t feel hectic while in use, and won’t turn on and off if you are just getting a cup of water.

We had some problems with the radars, the Arduinos wouldn’t always send the information to the MQTT. We fixed this by implementing the radars through interrupts to bypass polling. This way we reduce the active processing of the Arduino and make sure the radars always send out the information.

We wanted to power the whole system using our 12 V power supply. What we did was try and use a voltage divider using two resistors to make two voltage outputs, one with 12 V and one with 6 V. The 12 V was to power the stepper motor driver and stepper motor, whereas the 6 V was used to power the nodeMCU. By doing this we would be able to power the whole device only by our power supply of 12 V. However, we couldn’t successfully power the nodeMCU using the voltage divider providing 6 V. The system did not turn on, which is likely because of the internal resistance inside the nodeMCU creating a parallel system pulling the voltage further down providing not enough voltage for the nodeMCU to power on. We are now looking into solutions to provide the nodeMCU with a stable 6 V using our 12 V power supply, making our system only dependent on our 12 V power supply.

Our next step is to make sure all the hardware can fit inside our product by making the electronics more compact using smaller breadboards.