Support our Sponsors, they keep FADU free:   AG Photographic   The Imaging Warehouse   Process Supplies   RH Designs   Second-hand Darkroom Supplies  

Notices

Go Back   Film and Darkroom User > Articles > Articles

  ***   Click here for the FADU 2015/2014 Yearbooks   ***

Comment
 
Article Tools Search this Article Display Modes
FADU F-stop Enlarger Timer App for Android
Bob
20th August 2018
FADU F-STOP ENLARGER TIMER



The project files for the FADU F-stop Enlarger Timer have now been moved to GitHub as that is a more appropriate place to maintain the project - but read on for an overview and release...
  #60  
By Bob on 22nd February 2021, 10:21 PM
Default

Hi Ariel.

Phew... I got the OTA to work by following your experience (and after some issues caused by my weird and rubbish cable router)!

I will write this all up in the manual and upload a new version to the google Play Store with the additional features I mentioned earlier.

I have experimented with the unprogrammed DIY API mode some more and obtained actual timings of the sonoff's relay switching times and unfortunately the delays though the router occasionally cause a >1/3rd stop error - about once in every 20 strips. It may improve if using a dedicated router but I do not have a spare one - at some point I will get an old one and experiment again.

BTW, I don't know if you have already discovered this yourself, but when having an issue not being able to pair to the Sonoff a second time (such as after you give it the wrong SSID), I have found that using eWeLink to pair to the Sonoff and then Deleting it from eWeLink forces a factory reset which allows you to go through the linking to DIY mode again successfully.
Reply With Quote
  #61  
By tillari on 23rd February 2021, 11:25 AM
Default

Quote:
Originally Posted by Bob View Post

BTW, I don't know if you have already discovered this yourself, but when having an issue not being able to pair to the Sonoff a second time (such as after you give it the wrong SSID), I have found that using eWeLink to pair to the Sonoff and then Deleting it from eWeLink forces a factory reset which allows you to go through the linking to DIY mode again successfully.
Hi Bob,
In my case it wasn't necessary, because I could reprogram my sonoff as I explained. But I discovered that helping other people to configure their sonoff. Yes, after I published the article, I found a lot of interested people in the spahish speakers analog photography community. And some of them are using the new unpublished version...
Reply With Quote
  #62  
By Bob on 26th February 2021, 11:24 PM
Default

Been a busy couple of days. I have added a few upgrades to the work in progress version at https://github.com/filmanddarkroom/FADU_Timer/tree/wip

The main update is that using the Sonoff Basic R3 or Mini R3 in DIY mode now has the option to use the "Inching" API call to pulse the lamp on and then off without having to send an OFF command which avoids random router delays (but adds small inaccuracies which seem well worth the trade-off).

If I can stop myself fiddling any more with it, I will update the manual and publish the update to the google Play Store in the next few days.


Work In Progress Version 1.4.2 [believed stable]:


(1) Added [PULSE R3] mode. Similar to (2) below but uses the "inching" mode of the R3 DIY mode API (http://developers.sonoff.tech/basicr...-http-api.html) to send fixed duration lamp-on commands to the Basic R3 or Mini R3 in DIY mode. For example, we send a command that says "switch on for 17.5 seconds and then switch yourself off". The app does not need to send the OFF signal and hence avoids random timing delays through the router. Set [PULSE R3] to use.

Of course, Sonoff have once again messed things up - in this case by only allowing multiples of half a second to be set! This does not help with accuracy but is not as bad as it first seems for typical lamp ON times of several seconds and it does at least mean that the timing is consistent, which you could argue is more important.

The worst-case error when rounding to the nearest 0.5s is 0.2s. The percentage error depends on your base time. For example, 10.7 seconds will round down to 10.5s which is an error of just 1/37th of a stop which is not detectable by the human eye. Longer times will be more accurate but shorter times will be worse: 5.3s for example would round to 5.5s which is an error of 1/19th of a stop - which I think is still very acceptable. I prefer the repeatability of the timings in this mode over the random router dependent delays in (2) below.


(2) Added the ability to select a Sonoff R3 device in DIY mode. Tested with a Mini R3 running version 3.5 of the Sonoff firmware. Option "BASIC R3" added to the Settings tab's "Lamp Controller" section. To use: Place your R3 device into DIY mode per Sonoff's instructions. Once working in DIY mode, set the IP Address of the R3 device in the IP ADDRESS section in the SETTINGS tab (just the IP address, do not add the port etc - this is added in the app's code): e.g. 192.168.0.22 It may be a freak of my network router but I had to use Fing on my phone to find the device's IP address - it did not appear on my router's list of connected devices - very odd.

The downside of this mode is that all the on and off signals go via your WiFi router which adds random delays of typically 5 - 100ms on my network - and occasionally more. 100ms is just under 1/8th of a stop for a 1 second time exposure so you will need to consider if this is still sufficient accuracy for your purposes. In practice, I could only empirically detect a delay once in every ten or twenty switches. If you have a spare WiFi router then creating a separate network and dedicating this to the timer with no other devices or Internet connection would make these delays both smaller and much less random in duration allowing you to use the timer's Lamp Adjust setting to compensate. I have not tried this but it should work well (in theory!). Alternately, consider using the [PULSE R3] mode described above in (1).


(3) Added the ability to use the camera's flash LED. I'm not entirely sure what use this is except for demo or testing purposes. Possibly could be used for flashing paper if you add a diffuser over the LED and use the Delay setting to give you time to raise it to the right height after setting the time. Light activated relay boards do exist but keeping the bright light out of the rest of the darkroom may prove difficult.


(4) Added individual volume controls for the various beeps and buzzes (scroll down the SETTINGS tab if you don't see them). A bit tricky to use due to being small (I could find no way to enlarge them in App Inventor). The settings are reloaded the next time the app is launched.


(5) You no longer need to use the [SET] button on the STRIPS tab: the strips times automatically update when changing the base time or opening the STRIPS tab. The [SET] button is retained although it is now mostly redundant.


The manual still requires updating from release version 1.4.
Last edited by Bob; 26th February 2021 at 11:30 PM..
Reply With Quote
  #63  
By Bob on 3rd March 2021, 08:37 PM
Default

I published the 1.5 update to the Google Play Store 20 hours ago but it is still stuck waiting for approval - even the updates to the store text are still waiting. Last few times I did this it took about 30 minutes...
Reply With Quote
  #64  
By Bob on 8th March 2021, 12:34 AM
Default

Google has still not approved 1.5.0 to be published

In the meantime, in a flurry of activity (and lock-down boredom) version 1.5.1 has been uploaded to github (https://github.com/filmanddarkroom/FADU_Timer/tree/wip). I will upload it to the play store once google finally publish 1.5.0.


Change log:

1) Added functionality to switch the display between Red and Green - potentially useful for colour printing. Keep the backlight brightness as low as possible as colour paper is very sensitive. The setting is retained between restarts.

2) Can now sequence through the first 5 memories. Intended for the paper processing sequence, so Lamp switching hardware (if connected) is disabled during this time. If the RUN button is not visible on smaller screens, use a long-press on the FOCus button instead. Honours the Delay and Tick Mode settings.


BTW, if anyone was thinking about this and was put off by the electronics programming required, it can now use newer versions of the Sonoff Basic R3 and Mini without needing to reprogram them - normal DIY skills to wire a plug are all that's required. At least, it will be when Google FINALLY publish version 1.5.0 (or you side-load the app's APK build from github)!
Last edited by Bob; 8th March 2021 at 12:40 AM..
Reply With Quote
  #65  
By Bob on 8th March 2021, 09:40 PM
Default

1.5.0 now published to the google play store. I will upload v1.5.1 in the next couple of days - giving time for any issues I may have missed with 1.5 to be found...
Reply With Quote
  #66  
By Hansm on 15th March 2021, 01:34 PM
Default

Hi,
I bought a Sonoff R3 basic and upgraded the Firmware to the latest version 3.6.0 with EWLink. After that I deleted the device from the app to force a factory reset and followed the procedure to connect it to my local network.
I have set it to DIY mode and connected the Sonoff R3 Basic to the app and can control it.
Now I want to activate the pulse mode and set the pulsewidth to minimum 500 msec.
However I cannot get into the device.
Tried postman but if I set http://[ipaddress]:8081/zeroconf/info I don't get any response.
Looks like the postman api gets into a loop or something?
If I ping to the IP address it responses very well, only few msec timings.

The IP address is the one I entered also in the app and it communicates.

Can one give some hints so I can enable the pulse mode and change the pulsewidth to max 500 msec?
Or is pulse already enabled and the pulsewidth set to 500 msec by default?

I have to admit that I'm not a real experienced API user.

Many thanks in advance :-)

Best regards, Hans
Last edited by Hansm; 15th March 2021 at 02:10 PM..
Reply With Quote
  #67  
By Bob on 15th March 2021, 02:34 PM
Default

Hi Hans.

I'm not sure if you are asking me how to get Postman to work or how to get the timer app to work in Inching mode.

Which version of the app are you using - 1.5.0 from the Google Play Store, or one of the development versions from github (1.5.1)?

You say you can control the Sonoff with the timer app? Can you control the Sonoff by setting [BASIC R3] in the Settings tab's "Lamp Controller" section? If it works in [BASIC R3] mode it should also work in [PULSE R3] mode.

Attached is a screenshot of my Postman getting a /info response from my Sonoff. You need to use "POST" with the same "Body" as mine
Code:
({"deviceid": "", "data":{}};)
- your IP address will be different of course. The response is the: "seq": 4439 etc part.

If it cannot talk to the Sonoff, Postman should show an HTTP error (usually a 404) after a while or will try forever to connect if you use "Get" instead of "Post".

500ms is the shortest time the Sonoff API will accept (see the "Inching" API here: http://developers.sonoff.tech/basicr...i.html#Inching) . If you set a time on the app less than 0.3 seconds, it will not switch the Sonoff on. Setting 0.5s should work OK - or use the FOC button to toggle the Sonoff on and off.

Let me know how you get on.

Cheers, Bob.
Attached Thumbnails
Click image for larger version

Name:	SonoffInfo.png
Views:	349
Size:	46.4 KB
ID:	4073  
Reply With Quote
  #68  
By Hansm on 15th March 2021, 03:16 PM
Default

Thank you Bob.
I tried with exactly the same commands as you gave me but no info received from the Sonoff.
Doublechecked everything like POST, IP etc., but no info displayed.

However I set the app to Pulse R3 and tested with short times.
0.2 sec nothing happens.
0.3 sec lights gets on and very shortly off again, 0.5 sec?
1.2 sec light on and off after short time, most likely 1 sec.
1.3 sec and light on and off slightly but noticeably longer.
It could be that the pulse width is already set by default to 500 msec?

Best regards

Hans
Last edited by Hansm; 15th March 2021 at 03:41 PM..
Reply With Quote
  #69  
By Bob on 15th March 2021, 03:47 PM
Default

Yes, the app takes care of setting the Sonoff to the correct mode when you set it into [PULSE R3] mode.

The times you observed are as expected. Because the Sonoff Inching API can only accept times in multiples of 500ms, the time set on the display (and when calculated internally) is rounded to the nearest 500ms before being sent to the Sonoff as per the API's requirements. Therefore, the timer does not send a pulse for <250ms so 0.2s will not switch the lamp (the timer will still beep to let you know to move your mask to the next strip when creating test-strips). Probably best to avoid such short steps.

As discussed in the manual, this is annoying, but is a limitation of the way Sonoff created their API. In practice, you rarely send times that short and by the time you are at 5.3 seconds, the error is only 1/19th of a stop - the longer the time, the more accuracy you get.


Since updating the Google Play Store, I have discovered an issue with the PULSE R3 mode when using it with [AUTO] (and [CONT]) strips method. A workaround with [AUTO] mode is to set a 2 second Delay. This gives the Sonoff time to respond to the Inching API call - unfortunately, it can take over a second to respond (which is VERY annoying - Sonoff spec says <=200ms!) and this can cause a strip to be missed. I am working on a fix, but I suspect the 2s delay will still be required - we shall see...


I'm not sure what is wrong with your Postman unfortunately. If you are not getting an error message then it is difficult to tell. Are you sure your PC is on the same network as the Sonoff?


Cheers, Bob.
Reply With Quote
Comment
Support our Sponsors, they keep FADU free:   AG Photographic   The Imaging Warehouse   Process Supplies   RH Designs   Second-hand Darkroom Supplies  

Article Tools Search this Article
Search this Article:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Article Article Starter Category Comments Last Post
Wanted: Enlarger Timer ianbarber Sale or Wanted 5 22nd August 2018 03:20 PM
Hauck MSA 100 or Mk II enlarger timer fotofundi Darkroom 0 26th February 2017 02:02 PM
Enlarger timer RussKelly Darkroom 0 14th September 2014 11:10 AM
FS: Baeuerle enlarger timer paulc Sale or Wanted 2 7th May 2012 06:56 PM
Enlarger timer issues PaulG Darkroom 20 27th November 2009 12:29 PM


All times are GMT. The time now is 08:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Article powered by GARS 2.1.9 ©2005-2006