2 posts / 0 new
Last post
dopey
Control esp32/Ardruino from OVMS Module

Hi,

 

I am trying to find the best approach to control a separate micro controller from the OVMS v3 module.

 

Reading the docs, perhaps i'm just dense. But troubling to understand if anything is 'already available' on the DB29 port or do I need to order an extension PCB board first?

https://docs.openvehicles.com/en/latest/userguide/egpio.html 

 

At the moment I have my solution working on a small Feather huzzah with Wifi. Tho it can also work on Ardruino without wifi, etc. 

 

A couple approaches I have considered. 

1.) Control the power on via the OVMS to the device itself. 

2.) Trigger the device to 'do its thing' via an EGPIO via DB29 port.

3.) Join the OVMS Wifi, poll the OVMS for some custom js page I create to know when to do it's thing.

 

I believe #2 be the 'best' and lowest power consumption. Additionally I could monitor a different EGPIO pin where the device can give feedback. 

 

 

...Bit more details what I have done. 

 

I have an I-Miev and installed a chinese heater in the back.  I'd like to turn this on remotely over the internet. I've captured the RF of the remote control, and can replay it using a small micro controller. Since the OVMS has celluar connectivity that seems the best path to trigger the microcontroller which will turn on the diesel heater. Which lead me to the above options. 

Cleanest thought be somehow with the EGPIO stuff. The most hack way be via js pages on the device that the controller polls for a change and that I somehow change via the internet too :)

 

The next step after turning it on be to measure amp draw on the power of the diesel heater to indicate that it is 'on'. If I do #2 or #3 above I believe this feedback loop would be possible.

 

 

Sorry if this has been done before, not found any articles of folks controlling an Ardruino or similar from the OVMS. 

 

Thank you for any feedback :)

dexter
dexter's picture
Control esp32/Ardruino from OVMS Module

To route the EGPIO ports to the DB29 port you'll need the respectice bridges at the expansion port, i.e. make connections from some "EIO" pins (EGPIO) to the "GEP" pins (DB29) you'd like to use.

Another option is using a CAN bus to connect the Arduino. That way you can transport complex commands & data without the need for Wifi. You'll only need a CAN shield for your Arduino.

Regards,
Michael

Log in or register to post comments