I wonder if this LDR would fit in this application?
http://www.farnell.com/datasheets/1642607.pdf
VTL5C2 pdf, VTL5C2 description, VTL5C2 datasheets, VTL5C2 view ::: ALLDATASHEET :::
http://www.farnell.com/datasheets/1642607.pdf
VTL5C2 pdf, VTL5C2 description, VTL5C2 datasheets, VTL5C2 view ::: ALLDATASHEET :::
Attachments
Last edited:
The VTL5C3 and VTL5C4 could be better options since their resistance can go down to 1.5 ohm and 75 ohms respectively.
The VTL5C3 and VTL5C4 could be better options since their resistance can go down to 1.5 ohm and 75 ohms respectively.
I see ...thanks Nick
Attachments
Which is the line of code that must modified ?
I guess that's up to you to find out, I have no idea.
The VTL5C3 and VTL5C4 could be better options since their resistance can go down to 1.5 ohm and 75 ohms respectively.
Don't believe it, I think it's a huge misprint on their data sheet.
I have 20 samples they sent to me of the VTL5C3's and the lowest I could get from all 20 was 500ohms at 50mA!! and 900ohms at 20mA
And their max rating is 40mA at less tha 25c for no more than 24hrs, with no input on the ldr side which would add heat.
Cheers George
after enjoying the ldr for quite a while and being happy with it i wanted to try to figure out some kinks. I would be very happy if someone could help me troubleshoot.
Problem 1 is, that the rotary encoder readout seems to work only when i spin the encoder wheel rapidly. This means if I move it for only 1 step it isn't registered. When I move it rapidly for more steps it is registered. Could this be because the wires from the board to the encoder are approximately 20 cm long?
Problem 2 is the remote. I really would like to use the remote I already have also for the ldr. So i tried reading out c1-c4 and use the appropriate codes.
The problem is, when I enable debug and "dequote" the println lines (from the IRkey subroutine) I only get 0 as a result. I have only very basic knowledge about programming. I tried dequoting the println lines in funtion newpulsein and the signal seems to be registered (wait for end timeout appears when i keep a remote button pressed)
any idea how i could figure out why this is not working for me?
P.S. IRemote works, but in the description of your code it mentions this is not working for the ldr code because of some timers interference... so using that library is out of the question? (tested the example sketch provided in the Iremote library and i do get valid results there)
Problem 1 is, that the rotary encoder readout seems to work only when i spin the encoder wheel rapidly. This means if I move it for only 1 step it isn't registered. When I move it rapidly for more steps it is registered. Could this be because the wires from the board to the encoder are approximately 20 cm long?
Problem 2 is the remote. I really would like to use the remote I already have also for the ldr. So i tried reading out c1-c4 and use the appropriate codes.
The problem is, when I enable debug and "dequote" the println lines (from the IRkey subroutine) I only get 0 as a result. I have only very basic knowledge about programming. I tried dequoting the println lines in funtion newpulsein and the signal seems to be registered (wait for end timeout appears when i keep a remote button pressed)
any idea how i could figure out why this is not working for me?
P.S. IRemote works, but in the description of your code it mentions this is not working for the ldr code because of some timers interference... so using that library is out of the question? (tested the example sketch provided in the Iremote library and i do get valid results there)
Last edited:
after enjoying the ldr for quite a while and being happy with it i wanted to try to figure out some kinks. I would be very happy if someone could help me troubleshoot.
Problem 1 is, that the rotary encoder readout seems to work only when i spin the encoder wheel rapidly. This means if I move it for only 1 step it isn't registered. When I move it rapidly for more steps it is registered. Could this be because the wires from the board to the encoder are approximately 20 cm long?
Problem 2 is the remote. I really would like to use the remote I already have also for the ldr. So i tried reading out c1-c4 and use the appropriate codes.
The problem is, when I enable debug and "dequote" the println lines (from the IRkey subroutine) I only get 0 as a result. I have only very basic knowledge about programming. I tried dequoting the println lines in funtion newpulsein and the signal seems to be registered (wait for end timeout appears when i keep a remote button pressed)
any idea how i could figure out why this is not working for me?
P.S. IRemote works, but in the description of your code it mentions this is not working for the ldr code because of some timers interference... so using that library is out of the question? (tested the example sketch provided in the Iremote library and i do get valid results there)
Which version of the firmware are you using? The original code didn't handle the encoder well so I modified it to allow Gray code decoding. This fixed my encoder issues. Others have applied a hardware fix using a 0.1uf capacitor from the encoder output to ground.
Which version of the firmware are you using? The original code didn't handle the encoder well so I modified it to allow Gray code decoding. This fixed my encoder issues. Others have applied a hardware fix using a 0.1uf capacitor from the encoder output to ground.
thanks for the reply 🙂 I used the modified version of howarthcd. Did a quick compare and it looks like the encoder code is up to date. Will try adding a cap soon.
wined - i tried using caps but that didn't have any effect. Looks like the new encoder version is the problem for me. I tried switching back to the old version and everything is good now.
I am still stuck on implementing a non apple remote. any ideas why i can't read out any remote codes when turning on debug mode? My programming knowledge is not good enough to understand how the remote commands are read out :-(
I am still stuck on implementing a non apple remote. any ideas why i can't read out any remote codes when turning on debug mode? My programming knowledge is not good enough to understand how the remote commands are read out :-(
Here's latest fast OLED code. You need to use SSD1306Ascii.h lib and add modern.h font to the lib, plus replace file allfonts.h with the one from attachment. Code works with All-in-one pcbs. For original pcb, you need to switch places between R5 and R6.
Attachments
Hi Neb
Arduino 1.6.9
i run the code with all modifications and i get the message :
In file included from C:\Arduino\libraries\SSD1306Ascii\src/SSD1306Ascii.h:28:0,
from VxD_OLED_ADA_ASCII.ino:8:
C:\Arduino\libraries\SSD1306Ascii\src/fonts/allFonts.h:91:18: fatal error: neba.h: No such file or directory
#include "neba.h"
^
compilation terminated.
Error compiling.
The neba.h file its seems missing?
BR Nikos
Arduino 1.6.9
i run the code with all modifications and i get the message :
In file included from C:\Arduino\libraries\SSD1306Ascii\src/SSD1306Ascii.h:28:0,
from VxD_OLED_ADA_ASCII.ino:8:
C:\Arduino\libraries\SSD1306Ascii\src/fonts/allFonts.h:91:18: fatal error: neba.h: No such file or directory
#include "neba.h"
^
compilation terminated.
Error compiling.
The neba.h file its seems missing?
BR Nikos
Ah, please remove it from allfonts.h, and also others it complains about. These are old font versions.
Sent from my Redmi Note 4 using Tapatalk
Sent from my Redmi Note 4 using Tapatalk
Screen should be 128x64 ssd1306 based with i2c comms. Any with these specs should work.
Sent from my Redmi Note 4 using Tapatalk
Sent from my Redmi Note 4 using Tapatalk
Hi Neb
//#include "neba.h"
//#include "neba2.h"
//#include "bar.h"
//#include "line.h"
//#include "nebs.h"
Now shows me ..
Arduino: 1.6.1 (Windows XP), Board: "Arduino Nano, ATmega328"
screen.ino: In function 'void drawBar()':
screen.ino:30:16: error: 'bar' was not declared in this scope
screen.ino: In function 'void moveBar()':
screen.ino:38:16: error: 'bar' was not declared in this scope
Error compiling.
Its seems the bar.h file its necessary it is part of code...and missing also ....
//#include "neba.h"
//#include "neba2.h"
//#include "bar.h"
//#include "line.h"
//#include "nebs.h"
Now shows me ..
Arduino: 1.6.1 (Windows XP), Board: "Arduino Nano, ATmega328"
screen.ino: In function 'void drawBar()':
screen.ino:30:16: error: 'bar' was not declared in this scope
screen.ino: In function 'void moveBar()':
screen.ino:38:16: error: 'bar' was not declared in this scope
Error compiling.
Its seems the bar.h file its necessary it is part of code...and missing also ....
Last edited:
Hi Neb
//#include "neba.h"
//#include "neba2.h"
//#include "bar.h"
//#include "line.h"
//#include "nebs.h"
Now shows me ..
Arduino: 1.6.1 (Windows XP), Board: "Arduino Nano, ATmega328"
screen.ino: In function 'void drawBar()':
screen.ino:30:16: error: 'bar' was not declared in this scope
screen.ino: In function 'void moveBar()':
screen.ino:38:16: error: 'bar' was not declared in this scope
Error compiling.
Its seems the bar.h file its necessary it is part of code...and missing also ....
Sorry again, you need bar.h. Attached.
Attachments
- Home
- Source & Line
- Analog Line Level
- Arduino based LDR volume and source selection controller