How can I measure/track current pulses from machines?



  • Hello everyone,

    for a student's project, I have to find a way to track current impulses from a machine, so that I can record the times that impulses were triggered in a given time (e.g. per hour). Unfortunately I am no electrical engineer and therefore struggle with the hardware side, which is why I came to you guys after searching the Internet (which is pretty difficult if you do not really know the terms to search for :cold_sweat: ).

    What I have though so far: Using a relay module, connecting the "machine" to the Arduino with the relay in between and logging the impulses with the binary sensor. Does that make any sense to you?

    The analysis part including Grafana and influxDB is easy peasy, but I have to get that far in the first place.

    I would really appreciate your help with this as it really is frustrating. :disappointed_relieved:

    So far, I managed to do everything I wanted with mysensors and help I found here, but this time I am overstrained...

    Thanks in advance,

    MaKin


  • Mod

    @MaKin have you looked at https://www.mysensors.org/build/pulse_power ? Not that I want to ruin your learning experience at school, but it sounds pretty similar to that example.


  • Mod

    You could use node-red to route data to any database if you like.



  • @mfalkvidd said in How can I measure/track current pulses from machines?:

    @MaKin have you looked at https://www.mysensors.org/build/pulse_power ? Not that I want to ruin your learning experience at school, but it sounds pretty similar to that example.

    You're absolutely not. Thanks a lot. But am I right to use a relay instead of the light sensor? Because in mysensors relays are (obviously) used as actuators.



  • @gohan said in How can I measure/track current pulses from machines?:

    You could use node-red to route data to any database if you like.

    Thanks for the info. I already had a look at node-red but so far, I am satisfied with the myController interface for influxDB. :-)


  • Mod

    Probably an optocoupler is better, but if you only have a relay then you could work with that. If voltage is less than 5v you could also use digital pins directly


  • Mod

    @MaKin if the signal is ttl level you can connect it directly to the Arduino. An optocoupler can be added between for isolation.



  • @gohan thanks for your input! Can you explain how exactly you would do that? I think I should have some optocoupler in my starter kit - does it have to be some special kind of optocoupler? Can you tell me how to connect the Arduino, Octocoupler and the "machine" I want to measure? Are there mySensor sketches I could work with?

    @mfalkvidd thank you too. I just had to do some research on what ttl means and unfortunately, I am not sure whether this true for our machine. Same question here, is there a sample sketch available?

    Thank you very much guys. I really appreciate your support.


  • Mod

    @MaKin there is a sample sketch. The one I linked before.

    As for how to connect your "machine", well it depends entirely on what "machine" you have. What signal does it output?


  • Mod

    What signal voltage do you need to measure? Octocouplers need to be choosen accordingly



  • @mfalkvidd I can have it output in either 12V or 24V - my choice.

    I have various SRD-12VDC-SL-C octocoupler relays, but I have no idea how to set it up as a sensor instead of an actuator. :(

    @gohan see my reply to mfalkvidd

    I had a look at the Power Meter Pulse Sensor but I am clueless on how to transfer it to my components.

    Thanks again for taking the time to help.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.