You are not logged in.

#1 2019-09-25 13:03:45

F.m
Member
Registered: 2017-12-22
Posts: 147

young optics NVM Hex cammands needed

any body can help me for hex commands for nvm light engine from young optics. for example: projector on/off    led on/off and led amperage settings.
i attach the data sheet commands here, it includes i2c commands but there are not the complete commands. i just want to use nano dlp itself to send the commands


User I2C Command set (I2C bus speed

100 kbit/s

I2C commands conform to
the Philips I2C specification)
Command format:
Slave device address:0x1B [0x37 (Read) / 0x36 (Write)]
1st Byte = Command
2nd Byte = Data [0]
3rd Byte = Data [1]
(1) LED Current Setting
Command: 0x54
Data [0] Reserved ( set to 0x00)
Data [1] Reserved ( set to 0x00)
Data [2] LED current parameter (LSByte)
Data [3] LED current parameter (MSByte)
Data [4] Reserved ( set to 0x00)
Data [5] Reserved ( set to 0x00)
LED Current Formula=[(Bit value+1)/1024] x 6 For Bit value=1 to 1023
The step of current setting is 5.8593mA.\Example as below,
If the UV LED current is 5000mA then the setting value is 0x354 (5000/5.8593=
852 = 0x354).
Command: 0x54 // Write LED current
Data[0] = 0x00 //
Data[1] = 0x00 //
Data[2] = 0x54 // LED current parameter (LSB)
Data[3] = 0x03 // LED current parameter (MSB)
Data[4] = 0x00 //
Data[5] = 0x00 //
(2) LED Enable / Disable
Command : 0x52 // Write LED Enable / Disable
Data[0] = 0x02 // LED enabled
Command : 0x52 // Write LED Enable / Disable
Data[0] = 0x00 // LED disabled
Note

Please make sure the video signal presented, otherwise the LED will be
turn off automatically.
(3) Read LED Junction Temperature
Step 1: write command
Command: 0xD6
Date 08/10/2017
NVM UV Engine User’s Guide – Version 3.1
Page 18 of 31
Step 2: read data
Data [0] LED Junction Temperature (LSByte)
Data [1] LED Junction Temperature (MSByte)
LED Junction Temperature need to be calculated according to LED On/Off and
current status
If LED is on:
LED_Junction_Temp = (Data[1]*256 + Data[0])/10 + DW*Vol*LED_I/1000
Else if LED is off:
LED_Junction_Temp = (Data[1]*256 + Data[0])/10
Note:
- DW is the LED thermal resister is 1.6 (°C/W)
- Vol is the LED operating voltage is about 4V
- LED_I is the LED current (mA)
(4) Projector Image Flip Setting
Command : 0x14 // Write Projector Image Flip Setting
Data[0] = 0x00 // No Flip
Command : 0x14 // Write Projector Image Flip Setting
Data[0] = 0x02 // Horizontal Flip
Command : 0x14 // Write Projector Image Flip Setting
Data[0] = 0x04 // Vertical Flip
Command : 0x14 // Write Projector Image Flip Setting
Data[0] = 0x06 // Horiontal and Veritcal Flip
(5) Read Light Sensor Value
Command format
Slave device address: 0x39 [0x73 (Read)]
1st Byte = Command
2nd Byte = Data [0]
3rd Byte = Data [1]
Step 1: write command
Command: 0xAC
Step 2: read data
Data [0] Light sensor value (LSByte)
Data [1] Light sensor value (MSByte)
Light_Sensor = (Data[1]*256 + Data[0])
Note: Suggest reading the light sensor value with a fixed pattern. Light sensor
value may differ with different patterns.
Date 08/10/2017
NVM UV Engine User’s Guide – Version 3.1
Page 19 of 31
(6) Projector Source and Test Patterns Selection
a. HDMI
Command : 0x05 // Projector input source selection
Data[0] = 0x00 // HDMI input source
b. Ramp
Command : 0x05 // Projector input source selection
Data[0] = 0x01 // Test Pattern
Command : 0x0b // Pattern type selection
Data[0] = 0x01 //Ramp
Data[1] = 0x70
Data[2] = 0x00
Data[3] = 0xff
Data[4] = 0x00
Data[5] = 0x00
c. Checker
Command : 0x05 // Projector input source selection
Data[0] = 0x01 // Test Pattern
Command : 0x0b // Pattern type selection
Data[0] = 0x07 //Checker
Data[1] = 0x70
Data[2] = 0x04
Data[3] = 0x00
Data[4] = 0x04
Data[5] = 0x00

Offline

#2 2019-09-26 04:08:57

Yianni-VJ
Member
Registered: 2016-05-24
Posts: 95

Re: young optics NVM Hex cammands needed

Glad to see others using DLP light engines for 3D printing !
Adam from this forum, wrote a python script to send the commands via I2C to Young Optics module.
See if you can contact him.

Also, you will want to read the factory image file for the mask. You need to do that with SPI mode.
Let me know if you need help with that.

Offline

#3 2019-09-26 09:48:43

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

Thank you very much. sure, i need help for both.

Last edited by F.m (2019-09-26 09:49:34)

Offline

#4 2019-09-26 09:54:03

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

but at first order, i need to control it via usb to serial by sending commands with nanodlp.
i think by sniffing the com port which their software using to control the device, commands can be extracted.

Offline

#5 2019-09-26 23:29:55

sidastig
Member
Registered: 2019-08-23
Posts: 1

Re: young optics NVM Hex cammands needed

I'm looking for the same answer. Thanks for posting this F.m
Yianni-VJ is there any public documentation to read the factory image for the mask in SPI mode?
Any help would be greatly appreciated.

Offline

#6 2019-09-26 23:44:22

Yianni-VJ
Member
Registered: 2016-05-24
Posts: 95

Re: young optics NVM Hex cammands needed

sidastig: The only public documentation I m aware is the sample code attached to the PDF document you received from Young Optics.

Not having programming know-how, I commissioned this task to a third party. They had some hard time, they claimed the sample code had lots of bugs. They were successful though, they read the png file. I think I might have kept the source files they used I have to look for them. Contact me privately to exchange notes if you like.

Offline

#7 2019-09-29 13:20:23

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

any idea for HEX codes, to control uv led amperage, turn off/ on led and projector?

Offline

#8 2019-09-30 05:52:11

peaceblackhair
Member
Registered: 2018-12-11
Posts: 42

Re: young optics NVM Hex cammands needed

Hello,
I'm using a young optics projectors too but im not commanding with nanodlp.There is 2 way to use young optics projectors.
1)via USB
2)Direct I2C communicate (you need a cable for this).

if you want to control via usb there is a dll which name is cyusbserial you can use it.(you download from cypress offical web site.)

But i think they changed light source or something in projector.Because my older projectors work better then the newer ones.

Offline

#9 2019-10-03 20:35:14

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

Hi peaceblackhair, then how do you send commands to your projector? do you use relays for turning on/off the projector and LED?

Offline

#10 2019-10-04 07:31:34

peaceblackhair
Member
Registered: 2018-12-11
Posts: 42

Re: young optics NVM Hex cammands needed

F.m wrote:

Hi peaceblackhair, then how do you send commands to your projector? do you use relays for turning on/off the projector and LED?

just read carefully projector datasheet.in the datasheet they explained everything well.you dont need any relay or something.

Offline

#11 2019-10-06 07:10:02

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

i read it word by word, for example how do you turn off the projector? you need to remove the jumper by hand? so you need to use relay. if it is possible share your method.
if you control it by provided software, it is not the case i pursue.

Last edited by F.m (2019-10-06 07:11:37)

Offline

#12 2019-10-07 06:34:23

peaceblackhair
Member
Registered: 2018-12-11
Posts: 42

Re: young optics NVM Hex cammands needed

F.m wrote:

i read it word by word, for example how do you turn off the projector? you need to remove the jumper by hand? so you need to use relay. if it is possible share your method.
if you control it by provided software, it is not the case i pursue.

I'm controlling with my own software but not directly via nanodlp.

If you are using windows you can refactor the controlling software and get the codes.It's written in C# or Vb.net as i remember.

smile))

Offline

#13 2019-10-24 17:44:00

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

i used reflector, didn't find something useful. i controlled SM7 from sicube successfully by below example code sending by nano dlp via usb:
\x02\x03\x01

but still can't find nvm codes from young optics.
in nvm datasheet current control and led on/off is mentioned but there is no code for light engine itself turning on/off explenation.

can anybody help?

Last edited by F.m (2019-10-24 19:34:55)

Offline

#14 2019-10-25 00:15:07

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

another question, i pluged nvm light engine by usb to rpi. running ls /dev/ttyUSB* , result ls: cannot access '/dev/ttyUSB*': No such file or directory

when executing lsusb, result is:  Bus 001 Device 007: ID 04b4:000a Cypress Semiconductor Corp.

serial port is not accessible.

Offline

#15 2019-10-26 08:58:55

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

i installed the driver and run : "udevadm monitor". here is the result. i can't understand what is the address of node created. (what is the node address that must be filled in nano dlp to communicate to light engine)

monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[160.676982] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
KERNEL[160.678585] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
KERNEL[160.679188] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
KERNEL[160.680377] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
KERNEL[160.680794] bind     /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV  [160.781430] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)
UDEV  [160.788155] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0 (usb)
UDEV  [160.792292] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1 (usb)
UDEV  [160.792574] add      /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.2 (usb)
UDEV  [160.819003] bind     /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3 (usb)

i also made a diff check for dev contetnts in device plug and not plugged check and it shows nothing.

Last edited by F.m (2019-10-26 09:09:06)

Offline

#16 2019-10-28 09:37:44

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

Dear shahin really need your help. i had some progresses, i ran: "udevadm monitor" when the device was unplugged and then plunged it back, i could find the node which was located at "/dev/bus/usb/001, i listed the nodes and then unplugged the device, the node gone. so i found the node. i tried to communicate with the node with minicom, when i type  "minicom /dev/bus/usb/001/<node name>  it opens for tty8!
when i want to find the baud rate of the node by "sudo stty -F  /dev/bus/usb/001/<node name>, results: stty: /dev/bus/usb/001/006: Operation not permitted, even when i gave full permission by chmod.
i am confused about what i must put in "USB/Serial Port Address", /dev/tty8 or /dev/bus/usb/001/<node name> and how can i find the right baud rate? how can i be certain that the device receives the commands?
i should also say that, i checked the rules file and for this device, the subsystem is usb not tty. below is the rule file contents:

# Cypress USB driver for FX2 and FX3 (C) Cypress Semiconductor Corporation / ATR-LABS
# Rules written by V. Radhakrishnan ( rk@atr-labs.com )
# Cypress USB vendor ID = 0x04b4
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666", TAG="cyusb_dev", RUN+="/usr/bin/CyUSBSerial.sh A"
KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/bin/CyUSBSerial.sh R"

and here is msg results:
[   69.391726] usb 1-1.3: new full-speed USB device number 5 using dwc_otg
[   69.527623] usb 1-1.3: New USB device found, idVendor=04b4, idProduct=000a, bcdDevice= 0.00
[   69.527640] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   69.527650] usb 1-1.3: Product: USB-Serial (Dual Channel)
[   69.527659] usb 1-1.3: Manufacturer: Cypress Semiconductor
[  457.959751] usb 1-1.3: USB disconnect, device number 5
[  462.093553] usb 1-1.2: new full-speed USB device number 6 using dwc_otg
[  462.229499] usb 1-1.2: New USB device found, idVendor=04b4, idProduct=000a, bcdDevice= 0.00
[  462.229516] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  462.229526] usb 1-1.2: Product: USB-Serial (Dual Channel)
[  462.229535] usb 1-1.2: Manufacturer: Cypress Semiconductor

Last edited by F.m (2019-10-28 12:34:11)

Offline

#17 2019-10-28 14:56:33

Shahin
Administrator
Registered: 2016-02-17
Posts: 3,517

Re: young optics NVM Hex cammands needed

It looks like general linux issue if it get mapped /dev/ttyUSB/ACM etc, nanodlp will works fine.
Baudrate should be same on both side, usually you should check documentation.

Offline

#18 2019-10-29 14:46:08

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

Dear shahin, finally i made it work. the problem was in the rule definitions.
now raspbian detects the light engine in /dev/ttyUSB0 , /dev/ttyUSB1 and /dev/ttyUSB2 and i don't know why there are three! i checked three nodes baudrates and all were 9600.

according to device data sheet:

Command format:
Slave device address:0x1B [0x37 (Read) / 0x36 (Write)]
1st Byte = Command
2nd Byte = Data [0]
3rd Byte = Data [1]

and for LED on/off:

LED Enable / Disable
Command : 0x52 // Write LED Enable / Disable
Data[0] = 0x02 // LED enabled
Command : 0x52 // Write LED Enable / Disable
Data[0] = 0x00 // LED disabled

so in gcode box, i inserted below commands to light on but non of them worked for USB0,1,2.
[[Projector \x1B\x36\x52\x02 Command]]
[[Projector \x1B\x36\x52\x02]]

[[Projector \x1B\x52\x02 Command]]
[[Projector \x1B\x52\x02]]

and also when i run "dmesg" the results show that: unable to read latency timer for all USB0,1,2 as follow:

[  500.841134] ftdi_sio ttyUSB0: Unable to read latency timer: -32
[  500.841375] ftdi_sio ttyUSB0: Unable to write latency timer: -32
[  500.841611] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[  500.842445] ftdi_sio 1-1.3:1.1: FTDI USB Serial Device converter detected
[  500.842601] usb 1-1.3: Detected FT2232C
[  500.842894] ftdi_sio ttyUSB1: Unable to read latency timer: -32
[  500.843133] ftdi_sio ttyUSB1: Unable to write latency timer: -32
[  500.843502] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB1
[  500.844220] ftdi_sio 1-1.3:1.2: FTDI USB Serial Device converter detected
[  500.844353] usb 1-1.3: Detected FT2232C
[  500.844636] ftdi_sio ttyUSB2: Unable to read latency timer: -32
[  500.844874] ftdi_sio ttyUSB2: Unable to write latency timer: -32
[  500.845132] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB2


and also cat /dev/ttyUSB0 ,1 ,2 hangs and show nothing. it seems that the port can not be opened successful

Last edited by F.m (2019-11-02 12:09:19)

Offline

#19 2019-11-07 08:12:08

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

any comments about the problem?

Offline

#20 2019-11-07 16:23:31

Yianni-VJ
Member
Registered: 2016-05-24
Posts: 95

Re: young optics NVM Hex cammands needed

Hi F.m

I can try to help you, reach me on FB to chat.
https://www.facebook.com/yianni.andrikopoulos

Offline

#21 2019-11-10 07:23:04

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

Thanks Yianni, sent you messages on FB.

Last edited by F.m (2019-11-10 07:23:24)

Offline

#22 2019-12-18 09:58:47

K M
Member
Registered: 2019-12-18
Posts: 4

Re: young optics NVM Hex cammands needed

Hey, F.m , I'm working with the same engine, and I would like to know the LED junction temperature using the Python code.
After a thorough search in the internet, this is the similar topic I found and didn't know where and whom to ask.

Please give me the idea of calling the command in python script.

Read LED Junction Temperature
Step 1: write command Command: 0xD6
NVM UV Engine User’s Guide – Version 2.3 Page 16 of 27
Step 2: read data Data [0] LED Junction Temperature (LSByte) Data [1] LED Junction Temperature (MSByte) LED Junction Temperature need to be calculated according to LED On/Off and current status

If LED is on: LED_Junction_Temp = (Data[1]*256 + Data[0])/10 + DW*Vol*LED_I/1000
Else
if LED is off: LED_Junction_Temp = (Data[1]*256 + Data[0])/10
Note:
- DW is the LED thermal resister is 1.6 (°C/W)
- Vol is the LED operating voltage is about 4V
- LED_I is the LED current (mA)

I am glad and thank you for your time.

Offline

#23 2019-12-18 10:50:09

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

you are welcome. this is my problem too and i sent email to young optics for this but they are not responded me yet. there is also another problem with using python scripts in nano dlp and this happens to all [[Exec ... ]]  commands in latest versions that is when memory goes above about 50 to 60%, exec doesn't work and you need to reboot the nanodlp. this problem happens to my python scripts and also sound play after job finished. i shared this to shahin but he didn't find any remedy yet. also take care about power on/off the device, as it is mentioned in datasheet.

Last edited by F.m (2019-12-18 10:51:40)

Offline

#24 2019-12-18 10:56:46

K M
Member
Registered: 2019-12-18
Posts: 4

Re: young optics NVM Hex cammands needed

I'm not using Nano DLP, I'm just trying to make the connection to my engine with HDMI and USB, and the Python script, I could be able to turn the LED on/Off but couldn't find the perfect way to find the Temperature.

Offline

#25 2019-12-18 11:51:50

F.m
Member
Registered: 2017-12-22
Posts: 147

Re: young optics NVM Hex cammands needed

if they respond me, i'll share here.

Last edited by F.m (2019-12-18 11:52:00)

Offline

Board footer

Powered by FluxBB