{"action":"created","issue":{"url":"https://api.github.com/repos/martinberlin/FS2/issues/9","repository_url":"https://api.github.com/repos/martinberlin/FS2","labels_url":"https://api.github.com/repos/martinberlin/FS2/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/martinberlin/FS2/issues/9/comments","events_url":"https://api.github.com/repos/martinberlin/FS2/issues/9/events","html_url":"https://github.com/martinberlin/FS2/issues/9","id":382108678,"node_id":"MDU6SXNzdWUzODIxMDg2Nzg=","number":9,"title":"Take steps to get consumption down","user":{"login":"martinberlin","id":2692928,"node_id":"MDQ6VXNlcjI2OTI5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2692928?v=4","gravatar_id":"","url":"https://api.github.com/users/martinberlin","html_url":"https://github.com/martinberlin","followers_url":"https://api.github.com/users/martinberlin/followers","following_url":"https://api.github.com/users/martinberlin/following{/other_user}","gists_url":"https://api.github.com/users/martinberlin/gists{/gist_id}","starred_url":"https://api.github.com/users/martinberlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinberlin/subscriptions","organizations_url":"https://api.github.com/users/martinberlin/orgs","repos_url":"https://api.github.com/users/martinberlin/repos","events_url":"https://api.github.com/users/martinberlin/events{/privacy}","received_events_url":"https://api.github.com/users/martinberlin/received_events","type":"User","site_admin":false},"labels":[{"id":1089704675,"node_id":"MDU6TGFiZWwxMDg5NzA0Njc1","url":"https://api.github.com/repos/martinberlin/FS2/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":1089704676,"node_id":"MDU6TGFiZWwxMDg5NzA0Njc2","url":"https://api.github.com/repos/martinberlin/FS2/labels/help%20wanted","name":"help wanted","color":"008672","default":true}],"state":"open","locked":false,"assignee":{"login":"martinberlin","id":2692928,"node_id":"MDQ6VXNlcjI2OTI5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2692928?v=4","gravatar_id":"","url":"https://api.github.com/users/martinberlin","html_url":"https://github.com/martinberlin","followers_url":"https://api.github.com/users/martinberlin/followers","following_url":"https://api.github.com/users/martinberlin/following{/other_user}","gists_url":"https://api.github.com/users/martinberlin/gists{/gist_id}","starred_url":"https://api.github.com/users/martinberlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinberlin/subscriptions","organizations_url":"https://api.github.com/users/martinberlin/orgs","repos_url":"https://api.github.com/users/martinberlin/repos","events_url":"https://api.github.com/users/martinberlin/events{/privacy}","received_events_url":"https://api.github.com/users/martinberlin/received_events","type":"User","site_admin":false},"assignees":[{"login":"martinberlin","id":2692928,"node_id":"MDQ6VXNlcjI2OTI5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2692928?v=4","gravatar_id":"","url":"https://api.github.com/users/martinberlin","html_url":"https://github.com/martinberlin","followers_url":"https://api.github.com/users/martinberlin/followers","following_url":"https://api.github.com/users/martinberlin/following{/other_user}","gists_url":"https://api.github.com/users/martinberlin/gists{/gist_id}","starred_url":"https://api.github.com/users/martinberlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinberlin/subscriptions","organizations_url":"https://api.github.com/users/martinberlin/orgs","repos_url":"https://api.github.com/users/martinberlin/repos","events_url":"https://api.github.com/users/martinberlin/events{/privacy}","received_events_url":"https://api.github.com/users/martinberlin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-11-19T08:41:28Z","updated_at":"2018-12-11T00:29:56Z","closed_at":null,"author_association":"OWNER","body":"This week is arriving a new Multimeter I got in amazon.de and my goal is to do a systematic analysis to get consumption down with this facts:\r\n\r\n- Sketch (develop branch) without Arducam connected compiled for Wemos D1 is using 70mA. \r\n- Same sketch but with Arducam OV5642 connected is consuming about 170mA. That is way too much and unthinkable to work with a 2000mA battery. \r\n\r\nFor that we need to measure this properly with both ESP8266 / ESP32 based boards and make some proper measurements about: \r\n\r\n- Consumption on setup()  (meaning WiFi setup / SPI Arducam connection and so on)\r\n- Idle consumption (Doing nothing on the loop() )\r\n- Consumption while sending a Photo through API upload ( I can imagine this is the consumption peak )\r\n\r\nAnd then if you can give me a hand on this @tablatronix we can try to take some reasonable steps to make consumption go down without affecting usability. \r\nFirst 3 TOP actions here would be: \r\n\r\n1. Power the camera via a MOSFET or using VEXT if your board supports it, only power it in the second that you take the picture and then disconnect it the **hard way** \r\n2. Same with OLED display show anything for no more than 8/10 seconds, then make it off (Or sleep)\r\n3. If you don't do any server.handleClient() action or you don't press the shooter the ESP32 will go into Deep sleep mode ( Not sure if it makes sense a sleepAfterMinutes new setting, for the moment no )\r\n\r\nCurrent scenario with 2000mA battery is that the camera takes between 18/24 pictures and eats the battery out like a sweet donut. Let's see how far it will go with this updates.\r\n\r\n\r\nPost research:\r\n\r\n19.Nov.18 **Looking for a nice solution to switch the camera off on the \"high side\"**\r\nhttps://forum.mysensors.org/topic/1991/turning-off-connected-arducam -> Here same request. At the recommends to use one of this transistors: https://www.fairchildsemi.com/datasheets/ND/NDP6020P.pdf\r\nMaybe that's the way to go. The only detail is that turning the camera completely off will loose the configuration in setup()  so we will have to make a function that puts HIGH this transistor and also does the camera setup (Jpeg_size, flags, etc) before taking each photo.\r\nNot only the camera should be turned of disconnecting the VCC pin, but also the SPI should be turned out, since will also draw some consumption through the data GPIOs (To be confirmed soon, if it's too little maybe I won't bother with this)\r\nSome feedback around for my colleagues was that a 1 K resistor per data line of SPI will also work to reduce this consumption when the camera is in sleep mode.\r\n@carlosfasani tells me that doing this may affect SPI speed (And it makes sense of course)\r\nSaved for later: [ESP32 pinout reference](https://randomnerdtutorials.com/esp32-pinout-reference-gpios/)\r\n\r\nArduCam research: [Low-power](https://github.com/ArduCAM/Arduino/issues/136 ) "},"comment":{"url":"https://api.github.com/repos/martinberlin/FS2/issues/comments/446027136","html_url":"https://github.com/martinberlin/FS2/issues/9#issuecomment-446027136","issue_url":"https://api.github.com/repos/martinberlin/FS2/issues/9","id":446027136,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjAyNzEzNg==","user":{"login":"martinberlin","id":2692928,"node_id":"MDQ6VXNlcjI2OTI5Mjg=","avatar_url":"https://avatars2.githubusercontent.com/u/2692928?v=4","gravatar_id":"","url":"https://api.github.com/users/martinberlin","html_url":"https://github.com/martinberlin","followers_url":"https://api.github.com/users/martinberlin/followers","following_url":"https://api.github.com/users/martinberlin/following{/other_user}","gists_url":"https://api.github.com/users/martinberlin/gists{/gist_id}","starred_url":"https://api.github.com/users/martinberlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinberlin/subscriptions","organizations_url":"https://api.github.com/users/martinberlin/orgs","repos_url":"https://api.github.com/users/martinberlin/repos","events_url":"https://api.github.com/users/martinberlin/events{/privacy}","received_events_url":"https://api.github.com/users/martinberlin/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T00:29:56Z","updated_at":"2018-12-11T00:29:56Z","author_association":"OWNER","body":"Yeah but if my measurements are correct, at least the 5MP cam still consumes like 150 mA on low power mode that plus the WiFi running still eats your battery like a donut :). But I will try it again.\r\nBy the way I find arducam documentation and examples quite scarce"}}
{"actor":{"display_login":"martinberlin"}}