I will try and answer the recent questions:
gcjr
but would you mind providing a more succinct description of what you're trying to do ... rather than how you think to do it.
... looking over the code, what doesn't it do that you want?
As I alluded to earlier, the first big obstacle I kept facing was the chaotic output from the sensors. I attributed this to coding but it may be that the type of sensor or placement relative to each other is causing misreading and miscalculation of direction and thus net count.
I also could not manage to transition from the working Uno sketch to the ESP2866 or ESP32 S3 without the coding for the counting process getting all messed up. I also could not get the BLE on ESP32 S3 to work.
I am asking for help in doing the following
-
Streamlining Code if deemed necessary
-
Advice on transitioning this sketch to one that will port to cellular phone by Bluetooth or Wi-Fi (if I can make Wi-Fi connect conveniently).
-
Advice on what is optimal arrangement for Hall Effect sensor setup. I didnāt completely understand optimal placement of sensors relative to each other. Some said they need to be far enough apart that one sends clearly after the other. Others seemed to suggest that they should be close enough that the High of one overlaps temporally with the Low of the other as appears on oscilloscopes. I am hoping someone knows about using Hall Effect sensors for determining rotational direction, or can refer me to someone who does. I was told to consider rotary encoders earlier but I donāt think this is possible as this apparatus does not have a spinning axil or a rotor surface conducive to this.
-
Advice on getting an android app to display the data. Also need to have two reset buttons, if possible, to reset each unit when needed.
-
Advice on which platform to use. The Uno is too limited in resources. I thought the ESP32 S3 would have adequate resources for processing and memory but I could not get the above sketches to work on this platform. I couldn't seem to even get the OLED, or Serial Monitor to work. Or the count processing would become completely erratic and unreliable. It looks like the ESP32 might also provide the wireless connection but I didn't want to buy another platform without trying to get help.
StefanL38
You seem to write to the EEPROM very (if often.
Are you aware of that the EEPROM will be worn out after 100 000 write cycles?
If you want to want to do 10^12 writings use a FRAM-module
I need to have the last count stored so if the phone or microprocessor powers off, it will display the last net count as this still indicates the current depth of the downrigger. On occasion, If the digital counter loses accuracy relative to the mechanical counter, they can periodically be resynched by the reset button when the mechanical counter is zeroed out.
I was aware that the EEPROM had limited write cycles but with all the current problems I figured Iād cross that difficulty if I ever get this running.
That FRAM-module looks like a good option.
StefanL38
Displaying
10CCW11____02CCW21
S1L S2H______S3H S4L
is not a selfpurpose
I would like to know what the finale purpose of displaying such numbers is
Iām sorry, working with these variables so much it seemed it was evident what they correlated with but I see now this is not clear.
Line 1: absolute rotational count (+and ā rotations); direction CCW or CW; Net Count (CW count minus CCW count) for rotor 1 and 2
Line 2: the complementary sensor states in each pair for rotor 1 and 2
The real numbers of interest are the digits that follow the directional indicators, CW or CCW. In this 2.42 OLED display these are the large numbers indicating the net count of each rotor. This should indicate the current actual depth of the downrigger at any given time. (I had to write it in such a confusing manner because itās the only way I could cram it into the 1602 limitations of the LCD.
This is how the data would appear when not constrained to the 1602 LCD display.
The 3 parameters in line 3 and 4 are used to backcheck the processing underlying the Net Count.
The absolute count can be checked with the mechanical digital counters. The direction should correlate with the sensor state indicators.
On a large display like a phone only the Net Counts would be emphasized and the other data could be in a very small box or eventually omitted if it proves accurate with use.
If I can get the data to the phone, I could use something like Remote XY though Iād prefer a subscription free option.
gcjr
i needed to change the partition to allocate more memory when i added Bluetooth to an esp32 application.
how frequent? how fast can your eye see a change? would once a second be adequate
I need to have frequent updates because in an urgent situation, like a sudden rocky obstacle, you see it coming in advance on the fish finder and need to know what the current count is and run back and raise the downrigger line if it's too low. You could hit something in 5-15 seconds depending on boat speed.
i've been working on an esp32 program that transmits a string with 3 acceleration and 3 gyro
6-digit values over broadcast UDP msg and am using a Java program to display them on a laptop. A string is sent every 100 msec.
wifi doesn't seem to need as much memory as Bluetooth
I would take whichever path I can get to work and is the easiest to connect with from the cell phone,