Date   

Re: New OCS developments

Howard Dutton
 

Speaking of new features... one of them is due to using the Sense class (from OnStepX) for digital inputs:

Now these digital inputs have a built-in ability to filter noisy conditions.

Normally, you specify the ON state as follows:
#define SENSE1_ON_STATE HIGH

To enable filtering add an extra bit specifying the filter time (how long the signal needs to be stable to be accepted.)  In this example it's 50 milliseconds...
#define SENSE1_ON_STATE HIGH|HYST(50)

The above line (and similar) can be added to the Config.h file if you want to change the default behavior for any sense inputs.


Re: New OCS developments

Howard Dutton
 

I have things mostly working I think (on a Mega2560).

The BME weather sensor works (new design/code there so that's good.)
The website and charts work.
NPT works.
Relays almost work.  The fast relay pwm has problems, so its commented out, but otherwise things look ok.
Sense inputs are untested.
I see Analog inputs floating as they should when disconnected (test h/w).

Memory is tighter on the Mega2560, as expected... you don't get lots of new features without a price.
So the new much more elaborate DEBUG mode makes things REALLY tight if enabled.  If disabled things seem fine, not sure how many sensors can be enabled all at once though.  As this is targeted primarily at more capable h/w (Teensy etc.) this is an acceptable situation.


Re: New OCS developments

koal01
 

Never mind, i'm candidate for bugs and crashes LOL , ok just tell me when i can test OCS3 !


Re: New OCS developments

Howard Dutton
 

On Thu, Sep 30, 2021 at 02:19 AM, koal01 wrote:
i'll try the update tommorrow and let you know.
It's very much a work in progress at this point, lots of bugs, so you should wait for a little while still.


Re: New OCS developments

koal01
 

Hi, i'm currently at the 2.3i version and  I'm a candidate to the new version 3, i'll try the update tommorrow and let you know.
Always a pleasure to test the latest improvements 
Thank you for ALL


Re: New OCS developments

Paul Romero <paul@...>
 

Howard,
I am happy that your project is top notch. I look forward to buying a board, as it looks like the most professional design (hardware) I've seen! My current plan is to get a simpler Arduino uno board and put it together as shown in the Joe's Astrophotography part 2 video on YouTube. As my learning curve progresses and I begin to understand the how tos associated with Arduino based projects, I will complete an OCS.
Clear Skies,
Paul


Re: New OCS developments

Howard Dutton
 

I've started work on the OCS update, it's on Github as the master branch.

The last stable OCS is now release-2.3 and the default branch, which is a good thing as this new version 3 of the OCS will take a fair bit of time to become stable and actually work well I'm sure.

The main features it has integrated at this point...

  • Much easier code to work on (using Visual Studio) and still compiles in the Arduino IDE as usual.
  • Uses tasks for better/smoother concurrent operation.
  • All code I had for weather sensors was given a good once over then integrated in a consistent manor.  You simply select the sensors you want in the Config.h file and they are activated, no need to edit the source code as before.
    • When more than one sensor for a given feature (temperature for instance) are present the first one gets ownership of that feature and the others are denied.
      • They may fail to init. in this case OR if they provide other features (humidity for instance) they may still init and handle just those other features.
  • The (serial and IP) command processing code is now unified (leaning on the work done in OnStepX.)  It has (untested) code for both Wifi (ESP32) and Ethernet (W5100/W5500) IP command channels.  Basic testing of the serial command processing seems to show at least that works.
  • The functions that create the web-page content were broken down and logically grouped together, and have better naming.  Much easier to see what they are doing now.  This paves the way for expansion of features without the whole thing becoming ungainly.
  • The web-page design was changed to allow use with either ESP32/Wifi or Ethernet (just not both at once.)  The Wifi web server is not implemented yet.
  • Analog inputs are now numbered (1 to 16) instead of being specified directly by the pin.
  • There are now per processor pin maps.
  • Pin initialization and logic states can be specified by adding #defines to the Config.h file.  You can invert the logic (LOW is ON) and control the initialization (pullups, etc.) using this capability.
    • Note that this control is not by the pin# but rather by sense# input# or analog# that's associated with the pin# in the pin map.


Re: New OCS developments

koal01
 

Ok for analog inputs changes, very good !
I confirm the Teensy 4.1 is cheaper than the 3.6, i was surprised about that, it is on the way as well as the w5500.
Ok for the green connectors with screws replacing male headers for molex connectors in OCS2.
Hope that these connectors will maintain wires strongly over time.

Thank you !


Re: Digital input pins pullup

Howard Dutton
 

OCS.ino file has...

const volatile sense_t sense[] {
  { 0, INPUT, HIGH},  // not used
  {22, INPUT, HIGH},  // Sense 1: pin#, initialize, ON state
  {24, INPUT, HIGH},  // Sense 2: pin#, initialize, ON state
  {26, INPUT, HIGH},  // Sense 3: pin#, initialize, ON state
  {28, INPUT, HIGH},  // Sense 4: pin#, initialize, ON state
  {30, INPUT, HIGH},  // Sense 5: pin#, initialize, ON state
  {32, INPUT, HIGH}   // Sense 6: pin#, initialize, ON state
};

Change the needed sense#'s to:
INPUT_PULLUP


Digital input pins pullup

Rakios
 

Hi Howard
Could you tell me what I have to do to turn on the pullups on the digital input pins?
I don't know how to do it and if that change can be made.
Thank you


Re: New OCS developments

Howard Dutton
 
Edited

On Sun, Sep 26, 2021 at 02:09 AM, koal01 wrote:
So 3 different MCU, great !
To be honest the T3.5 is more than fast enough and appeals as it's 5v tolerant and a little cheaper than the other options.  The 3.6 is overkill, and the 4.1 is much faster still (many times) but it makes sense as there are no downsides (other than less EEPROM which the OCS doesn't strictly need a lot presently) since it doesn't cost more (the 4.1 is cheaper than the 3.6.)

I saw a part on the PCB with 2 unprotected Analog in. I suppose i would use those for the Wind and Anenometer sensors, in my case i'm going to use 2 hot wire anenometers so 3 analog inputs in total , do you think it is possible to change this in you design ?
As I mentioned below there are now 4 general purpose inputs as I felt 2 wasn't enough.  Still 12 total inputs but more flexible now as you can do digital or "unprotected" analog on those 4 GP.  I put current limiting resistors on those four and two are still diode clamped.


Re: New OCS developments

koal01
 

So 3 different MCU, great !
I saw a part on the PCB with 2 unprotected Analog in. I suppose i would use those for the Wind and Anenometer sensors, in my case i'm going to use 2 hot wire anenometers so 3 analog inputs in total , do you think it is possible to change this in you design ?

Thanks
Koal01


Re: New OCS developments

Howard Dutton
 

On Sat, Sep 25, 2021 at 11:26 AM, Howard Dutton wrote:
As for the MCU, the mega 2560 is limited, the Teensy 3.5 or 3.6 will certainly bring a more stable solution, why not an ESP32 wich is cheaper and powerful as well ?
Cheaper yes.  More powerful than a T3.6 is debatable.  The 3.6 is much faster.  The 3.5 is about as fast.  The ESP32 downside is the lack of pins, that can be worked around by imposing limitations and/or using additional h/w but it's a hassle and complexity.
I just modified the design a little, so the Teensy4.1 should also work.


Re: New OCS developments

Howard Dutton
 

On Fri, Sep 24, 2021 at 01:43 PM, koal01 wrote:
Howard, here are some words around this new OCS design :

Much more capable on the software side with Teensy3.5 and W5500 for Ethernet.
Great ! i built the W500 component with a Teensy 3.2 this year for the Maxpcb in Onstep, it is very compact and works fine, is it the same than the one in onstep ?
Same as OnStep uses.

As for the MCU, the mega 2560 is limited, the Teensy 3.5 or 3.6 will certainly bring a more stable solution, why not an ESP32 wich is cheaper and powerful as well ?
Cheaper yes.  More powerful than a T3.6 is debatable.  The 3.6 is much faster.  The 3.5 is about as fast.  The ESP32 downside is the lack of pins, that can be worked around by imposing limitations and/or using additional h/w but it's a hassle and complexity.

The SD card will now be directly on the MCU and not the ethernet shield, hope you won't have debugging extra job around charts
Shouldn't be an issue.

Switching voltage regulators for both 3.3V and 5V for respectable current supply levels on both of those rails.
Howard i can't see the level shifter is it downside on the pcb ?
There is no I2C level shifter as the MCU is 3.3V already.

This has 10 relays, 4 solid state (1A), 4 mechanical (16A), and 2 other "relays" that are high current n-channel MOSFETs for running large DC motors (like my roof motor.)  All are optically isolated.  It also has a header to allow plugging in a cheap eBay 8 channel relay module for expansion to 18 total relays.
Yes the 2 high current relays that i intend to use for moving my shelter which is on rails and not a roof opening shelter, i'll certainly use Nema 23 or 34 certainlu RE5 and RE6 ones i can see on your design

Provision for an BME280 onboard for inside TPH monitoring.The SPI interface has the correct pin order and orientation so the common eBay DS3234 RTC modules can plug right in.
Good, the Ntp time is not accurate in my current setup but i had to remove the DS3234 i initially installed as it was in conflict with the SD card on the ethernet shield using the same SPI interface
The OCS3 will use OnStep's TLS class (portable code, basically a library) with all that brings (DS3231, DS3234, GPS, and I'll add the NTP to it.)

There are 12 total input channels, 6 digital only and 6 analog.  Most are current limited and ESD protected.
Good, many inputs for future needs
Not mentioned are the 2 TVS diode array SMT components on the PCB back.  Optional, and not too difficult to solder (fairly large for SMT) they save a lot of PCB space.  The ESD protect the 6 digital inputs, 4 analog inputs, and the I2C data and clock lines.  I actually changed the design of inputs a little, there are now 4 digital, 4 analog, and 4 general purpose that can do either analog or digital.  Added a bit more flexibility having the general purpose inputs.

The I2C interfaces use RJ45 connectors so sensors can be plugged in using Cat5 Ethernet cables.  I settled on a scheme where 3.3V (or 5V on I2C 2) and +12V are present too for powering those sensors.
Nice, the RJ connectors are more reliable than Molex for that purpose, what kind of I2c component can work on 12 V ?
Not really for I2C directly but anything else that might be at the end of that cable that might need power and 12V is much better for delivering that than 3.3V or 5V.  Say one wanted to run a little heater on an optical window, etc.  BTW the 3.3V and 5V outputs on the PCB left side and on the RJ45's is polyfused at 500mA.  The 12V uses the main blade fuse.  If you happen to short an I2C 3.3V or 5V it shouldn't bring the OCS down (its onboard 3.3V/5V will still be there.)

And there are two TTL serial interface
Can you give examples of TTL components on that interface ?
Another Arduino.  OnStep.  Etc.  You could also adapt to USB. Or Bluetooth.  Etc.  Usually these run on 5V (with their own regulator to make 3.3V) so 5V is there on the connectors.

Many components can be ordered directly from LCSC which is associated with EasyEDA where this PCB was designed and will be ordered from
Good, when the PCB will be avalaible it would be nice to find easyly the components, some relays where not easy to find in the previous version, not your fault but manufacturers deciding to stop selling relays hard to find.

Other questions and observations :

Thank you for all these changes in this brand new design, very nice job !
The w5500 is a nice improvement and a so good heritage from an Onstep feature
Will there be any weather forecast feature integrated in OCS even through an API with a remote Weather solution ?
Some demands on the previous version like extending periods for charts will be possible in this design ?
I'll consider additional features once OCS3 exists.

Will the commands to query sensors remotely change, i'm python scripting them and it works nice so any changes will havee to be taken into account ?
I plan no changes there.


Re: New OCS developments

Paul Romero <paul@...>
 

Hi all,
After reading...not just skimming the posts...I realize that the OCS still runs on the old hardware, but the new hardware is much more capable. I have invested in the sensors for the Arduino, and these same sensors can be used with the new hardware. With only a simple push button roll off roof and relay driven outlets, I think the software can be easily modified. I'm going to learn on the Arduino board and sensors and get that up and running. Does anyone know a good how to for programming the OCS on my board for an absolute beginner?
Clear Skies,
Paul


Re: New OCS developments

koal01
 

Howard, here are some words around this new OCS design :

Much more capable on the software side with Teensy3.5 and W5500 for Ethernet.
Great ! i built the W500 component with a Teensy 3.2 this year for the Maxpcb in Onstep, it is very compact and works fine, is it the same than the one in onstep ?
As for the MCU, the mega 2560 is limited, the Teensy 3.5 or 3.6 will certainly bring a more stable solution, why not an ESP32 wich is cheaper and powerful as well ?
The SD card will now be directly on the MCU and not the ethernet shield, hope you won't have debugging extra job around charts

Switching voltage regulators for both 3.3V and 5V for respectable current supply levels on both of those rails.
Howard i can't see the level shifter is it downside on the pcb ?

This has 10 relays, 4 solid state (1A), 4 mechanical (16A), and 2 other "relays" that are high current n-channel MOSFETs for running large DC motors (like my roof motor.)  All are optically isolated.  It also has a header to allow plugging in a cheap eBay 8 channel relay module for expansion to 18 total relays.
Yes the 2 high current relays that i intend to use for moving my shelter which is on rails and not a roof opening shelter, i'll certainly use Nema 23 or 34 certainlu RE5 and RE6 ones i can see on your design

Provision for an BME280 onboard for inside TPH monitoring.The SPI interface has the correct pin order and orientation so the common eBay DS3234 RTC modules can plug right in.
Good, the Ntp time is not accurate in my current setup but i had to remove the DS3234 i initially installed as it was in conflict with the SD card on the ethernet shield using the same SPI interface

There are 12 total input channels, 6 digital only and 6 analog.  Most are current limited and ESD protected.
Good, many inputs for future needs

The I2C interfaces use RJ45 connectors so sensors can be plugged in using Cat5 Ethernet cables.  I settled on a scheme where 3.3V (or 5V on I2C 2) and +12V are present too for powering those sensors.
Nice, the RJ connectors are more reliable than Molex for that purpose, what kind of I2c component can work on 12 V ?

And there are two TTL serial interface
Can you give examples of TTL components on that interface ?

Many components can be ordered directly from LCSC which is associated with EasyEDA where this PCB was designed and will be ordered from
Good, when the PCB will be avalaible it would be nice to find easyly the components, some relays where not easy to find in the previous version, not your fault but manufacturers deciding to stop selling relays hard to find.

Other questions and observations :

Thank you for all these changes in this brand new design, very nice job !
The w5500 is a nice improvement and a so good heritage from an Onstep feature
Will there be any weather forecast feature integrated in OCS even through an API with a remote Weather solution ?
Some demands on the previous version like extending periods for charts will be possible in this design ?
Will the commands to query sensors remotely change, i'm python scripting them and it works nice so any changes will havee to be taken into account ?

Conclusion :
No words to qualify such an amazing sharing.

Thank you !


Re: New OCS developments

Howard Dutton
 

On Fri, Sep 24, 2021 at 10:57 AM, Paul Romero wrote:
Hey guys, now that I have an Arduino board and Ethernet shield, does anyone know of an all sky camera DIY project that can use it?
I'm not aware of any, but it would be a neat thing to have.


Re: New OCS developments

Paul Romero <paul@...>
 

Oops mistake,
 
I just received my Arduino and accessories.
 
For a layman, can someone provide a Google searches l parts list for the new OCS (Howard thanks for taking this up again..I will donate $20 to help support. I am in no hurry...I have an Aleko push button for my roll off roof in the meantime.
 
 
 
Hey guys, now that I have an Arduino board and Ethernet shield, does anyone know of an all sky camera DIY project that can use it?
 
 
 
Clear Skies,
 
Paul


Re: New OCS developments

Howard Dutton
 

On Fri, Sep 24, 2021 at 08:01 AM, koal01 wrote:
Is the PCB smaller in size than the older one ? Is it avalaible in Easyeda ?
Same footprint and mounting holes as the prior board.

I'll sleep on the design for a little while then order and build one for testing, this will take a while but I will make it available.


Re: New OCS developments

koal01
 

Absolutely incredible ! but I was expecting a real revolution on OCS from you !
Is the PCB smaller in size than the older one ? Is it avalaible in Easyeda ?
It’s a rapid answer from my cellular, I’m going to see your big job carefully when i’be back at home.

Thank you Howard 

101 - 120 of 538