EnviroDIY / Mayfly-Modbus-Wing

A hardware adapter for using ModbusRTU with RS-485 on the Arduino-framework Mayfly datalogger board.
4 stars 2 forks source link

Support Mayfly v1.1 with many sensors #3

Open aufdenkampe opened 2 years ago

aufdenkampe commented 2 years ago

Continuing the conversation from: https://github.com/EnviroDIY/SensorModbusMaster/issues/21

There is a need for an updated RS-485 Half Shield or Modbus Wing that:

  1. Takes advantage of the new features of the Mayfly v1.1; and
  2. Can handle five or six sensors with high power demands (i.e. auto-cleaning brushes).

From @neilh10:

The Mayfly 1.1 can generate +12V_SW of 12V at 5W of power. However the Mayfly 1.1 has NO path power switch. When the boost is disabled, there is still a power path to the input through a diode.

There is a benefit of being able to turn on the boost (typically +12V), allow it to stabilize. Then when stable the +12V can be applied to the external +12V circuit.

A possible solution is attached. For the power switch MP5030D QFN10/0.5mm "USB Charging Port Controller with Load Detection"

This would use Mayfly Arduino virtual port D9 for 12VswEn

knh002r8 schematicRs485.pdf

cc: @s-hicks2

aufdenkampe commented 2 years ago

@neilh10, it looks like these new designs still have a 155mA fuse on the power line to the sensors.

However, we know that we need to be able to handle higher power loads, especially when we have many sensors and/or during power spikes when a brush starts spinning (see https://github.com/EnviroDIY/YosemitechModbus#power-supply).

Can we increase the size of that fuse?

neilh10 commented 2 years ago

Oops yes I got the wrong place to post it, thanks for moving it Yes the fuse could be increased, or a greater power delivery could be designed in ~ see below on options.

I think its better to state target powering. From the link my understanding is the target requirement spec is 52mA hold (representing one instrument), and then surge to 280mA <10mS (representing brush turn on)- though the objective is perhaps 150mA (three instruments?) with surge capability to 100+280mA <10mS

The critical issue is dynamic power, what power can be consumed and still maintain the processors integrity. With the Mayfly1.1A components I was able to maintained a 11.2V@500mA from a Liion at 3.8V

The PRG18BC4R7MM1RB with a hold of 155mA should work for this at room temperature, but perhaps not at 60C. If each individual instrument lines is fused then it would support a greater overall power rating can be maintained while also preventing individual line failures from taking the system down.

As an analog thermal device, the core issue is too look at when it trips so that it guarantees electronic protection of the devices behind it, over what temperature range. As its outdoors, plastic enclosure, the range of temperature could be -10C to 65C

In fault theory - the assumption is one fault at a time - in this case that the instrument line has short circuited. For the processor you don't want anything to happen that can cause a reset - or if so put in the work to manage the effect. (ie implement brown-out processing)

The fuses as analog thermal devices guarantee a hold current and a trip current - and are sometimes rated for the energy - time and current - that it takes to exceed the trip. For the PRG18BC4R7MM1RB which isn't now available at Digikey PRG18BC4R7MM1RB it has a hold rating of 155mA@25C but this is derated to 100mA@60C . The trip current for this is max 400mA at -10C Using the next in the range that is available it probably fits PRG18BC3R3MM1RB it has a hold rating of 180mA@25C but this is derated to 120mA@60C . The trip current for this is max 480mA at -10C

Then the next available is PRG18BC1R0MM1RB it has a hold rating of 330mA@25C but this is derated to 220mA@60C . The trip current for this is max 850mA at -10C So its likely to be a problem under some edge conditions.

GArrigotti-cws commented 2 years ago

@neilh10 Please reach out to Anthony for my cell phone number or personal e-mail, our requirements which are vastly different then a majority of the users on your platform caused issues with your Modbus wing. Anthony said you were revising it to accommodate more of our use case, I would like to discuss the status of where that board is at and how much it would cost to manufacturer them.

neilh10 commented 2 years ago

sure happy to chat neilh the usual at azonde.com or http://azonde.com/w/contact.html

neilh10 commented 2 years ago

Just to announce I'm coming up with a design that is an extension of the last board ~ higher power and more sensor interfaces.

The process is I'm going to do a design with an open review for anybody interested, design will be published next week after the July 4th, then one week for feedback, and then committing the design to PCB.

The design criteria requirements are Requirement Output: Fixed +12V +/ 5% @0.5A
https://www.pololu.com/product/4016 U3V40F12
Requirement on Input: Power (nominal 3.8V) 2 * 2pin JST
Requirement: 6 (3+3) RS485 ports – 4pin screw term, & optional 4pin grove 2mm
Optional : 4pin grove may be optionally assembled after final testing
Objective: Board break off of 3 RS485 ports to shorten.
Requirement : RS485 2wire (UART Tx & Rx) with auto-direction
Requirement: 2 Physical SDI-12 ports – both 3pin screw term, & optional 3pin grove 2mm
Requirement: SDI-12 has standard ESD
Requirement : All physical ports fused @25C hold 155mA, trip 330mA
Objective : Reliable Physical Tie in - can’t unseat itself. Use mayfly compatible sub-panel.
Requirement : Mayfly interfaces at 3.3V and Ioff Safe

neilh10 commented 2 years ago

I’ve released an expanded Modbus/RS485 Wingboard for community design review

https://github.com/EnviroDIY/Mayfly-Modbus-Wing/tree/master/knh002-MayflyWingShield/rev8

I’d welcome design comments, here by Monday 2022-July-20 12noon PST. Easier to correct any possible problems early on, than find them later on the PCB. As the old clothes tailor saying goes “measure three times, cut once”. 🙂

Discussion on desired Modbus usage or general questions to be posted https://www.envirodiy.org/topic/modbus-wingboard/#post-17144

aufdenkampe commented 2 years ago

@s-hicks2, any thoughts on Neil's rev8 design, described in https://github.com/EnviroDIY/Mayfly-Modbus-Wing/issues/3#issuecomment-1179571964 above?

neilh10 commented 2 years ago

I've updated the description from reviews time frame knh002rev8 circuit description_220720.pdf

and this is the candidate for starting the PCB creation. knh002r8 schematicRs485_220720.pdf

neilh10 commented 2 years ago

I've got the PCB returning today and should be building a proto in the next day or two. Very exciting, I always love this stage of the detailed design work coming together,
.... and before any errors are found. :)
KNH002rev8_3Dtop220726a

KNH002rev8b2_3Dbtm220726b

neilh10 commented 1 year ago

Boards build and tested nicely.
Updates in https://github.com/EnviroDIY/Mayfly-Modbus-Wing/tree/master/knh002-MayflyWingShield This discussion is at an end, but suggest leave open for information

GArrigotti-cws commented 1 year ago

I’ll reach out to Anthony for a status of the order, the schematic still leverages the larger battery from voltaic correct?

aufdenkampe commented 1 year ago

@neilh10, thanks for your commits last night that updated the schematics (7d3721d6d180bf555ae24611a0175a1656c94f90, 214f66d3fb0015ce07614df52c59b98d03c84622) and descriptions (e1bef3db8d1f9ee331eb184f0d3ed6dc4e49c5c7, f6986fd373b4701e9667b6c32f6a64f7a664bbe0, 7ed412f844b457f7d1db1c8f651ccbf6d5bdb327) of your new Mayfly Modbus Wing v2 (knh002)! I'm excited to test them with the full set of 6 YosemiTech sensors!

@GArrigotti-cws, I'll get them next week and will let you know how it goes!

aufdenkampe commented 1 year ago

@GArrigotti-cws, here are my thoughts on wiring your station to the Voltaic's V70 19,200mAh (71Wh) battery pack with unregulated 10-12.6V output.

The ideal approach, due to simplicity, would be to purchase/build 12V-to-5V USB-C converters, which would provide power to the Mayfly, which in turn would charge a standard 3.8V Lipo battery. The modbus sensors would then get powered from the lipo via this new Modbus Wing v2, which @neilh10 carefully designed to regulate power to each 12V modbus sensor.