Coder Social home page Coder Social logo

CAN Bus for sensors and relays about mycodo HOT 6 OPEN

samuk avatar samuk commented on June 15, 2024
CAN Bus for sensors and relays

from mycodo.

Comments (6)

FlooSz avatar FlooSz commented on June 15, 2024 1

You can also use MQTT for good communication between Mycodo and e.g. Tasmota on a ESP, if you only care about the RJ45 connector: It doesn't matter which cable you use for sensors or relays, as long as the cable is designed for the appropriate voltage, but for this side of the relay you could also connect an RJ45 socket to the I2C bus and use the same wires on the other side

Until there is a solution to your problem/upgrade, I would also find the topic interesting

from mycodo.

FlooSz avatar FlooSz commented on June 15, 2024 1

I can try to write you a code for a custom input, but we maybe must troubleshoote and and upgrade the code, I need for this all errors that will happen, and for starting I need to know which Sensors you want to use and which measurements will be required (Temp, Moisture,...and the units please)

from mycodo.

LucidEye avatar LucidEye commented on June 15, 2024 1

@samuk

If you need to increase the distance between your Raspberry Pi and your wired sensors there are a few options that are inexpensive and already available instead of having to develop hardware and software to adapt the CAN bus for Mycodo.

Adafruit has this active terminator which allows you to use a standard Ethernet cable (RJ45) as an "extension cord" (up to 100 feet) between the Pi and your i2c sensors. It changes the signal for longer distances so you don't have to worry about things like line capacitance, pull-up resistors, or EMI. There are several people on the DIY Forum and on the Discord who are successfully using these active terminators to increase i2c distances.
https://www.adafruit.com/product/4756

Sparkfun also makes these i2c range extenders that use standard Ethernet (RJ45) cables as i2c extension cords (up to 100 feet). They also use the STEMMA QT or QWIIC connectors which makes it easy to connect sensors. You need to attach one Endpoint adapter to your Pi's i2c pins, and then use the Ethernet as the long cable run, and then have another endpoint adapter on the far end of the Ethernet cable, and that's where your sensors go...
https://www.sparkfun.com/products/16988

They also have these mid-point adapters for dropping sensors anywhere along the cable run.
https://www.sparkfun.com/products/18000

from mycodo.

samuk avatar samuk commented on June 15, 2024

Thanks, I'm not particular about the cables. As you say they don't matter all that much with CAN Bus or I2C.

I do have a preference for cabled over wireless. Improving the reliability of cable runs of 10m - 20m would be my goal.

This is just at research phase at the moment, but good to know it seems possible. Initially I'd probably look to emulate the sensors from https://atlas-scientific.com/product/wi-fi-aquaponics-kit/

from mycodo.

wbard93 avatar wbard93 commented on June 15, 2024

I've tried a few different I2C interfaces but have not been able to get it to be reliable. I'm currently working on a custom design using an ATMEGA328 on an interface board to go between the RPi I2C and an external RS485 bidirection bus.

I'm not familiar with CAN parts so it would be a while before I'd be able to look into that and experiment.

from mycodo.

samuk avatar samuk commented on June 15, 2024

The carrier board uses the standard MCP2515 which is in the Linux kernel.

https://www.amazon.com/dp/B0BVH43P9L

from mycodo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.