-
Git Repo
02/04/2015 at 19:57 • 3 commentsGit repo is now up on - https://github.com/eyadid/uplift-wifi
-
Schematics + Web Interface
02/04/2015 at 19:41 • 0 commentsIv'e created 3 REST endpoints for the desk and uploaded them to the ESP :
http://[DESK IP]/up - increase height - will signal the UP button for 200ms (click simulation)
http://[DESK IP]/dn - decrease height - will signal the DOWN button for 200ms (click simulation)
http://[DESK IP]/st - state read - will read the serial input from the relay unit and display the results
To save space and ease development, iv'e decided to host the web interface on S3 and call the API by embedding a <script> tag on the page. The script will call the ESP which in turn returns a JS command - "results(key,val);".
An example of the interface is up here :
http://deskcontrol.s3.amazonaws.com/index.html#[IP OF DESK]
Currently working on setting up a git repo for this project. will update as soon as it`s up
as for the schematics - the components I needed were : 3.3v regulator, 5v to 3.3v level shifter, the ESP and a TTL header (for programming / updates)
I finished drawing the initial design and looks like it`s working. (attached)
next step - PCB fab + 3D print enclosure and we're good to go
-
Data analysis
02/03/2015 at 02:30 • 0 commentsLooks like the relay unit sets the brown wire (#2) to high for ~20ms then send a reset sequence and the height value in inches
0 1 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 [BITS FOR HEIGHT]
Each bit is ~100us long (9,600 bps? My "logic analyzer" is a nice debug toy but can't get accurate readings out of it)
EDIT : ** Just confirmed that the relay unit is sending 16bit integers over 9600bps.
the format is [257][HEIGHT][257][HEIGHT]....
here are some samples -
32.9 = 1 0 1 0 0 1 0 0 1 0 (329 = 01 0100 1001)
32.8 = 1 0 0 0 0 1 0 0 1 0 (328 = 01 0100 1000)
32.5 = 1 0 0 1 1 0 0 0 1 0 (326 = 01 0100 0110)
32.4 = 1 0 0 0 1 0 0 0 1 0 (324 = 01 0100 0100)
32.1 = 1 0 1 0 0 0 0 0 1 0 (321 = 01 0100 0001)
31.8 = 1 0 0 1 1 1 1 1 0 0 (318 = 01 0011 1110)
29.8 = 1 0 0 1 0 1 0 1 0 0 (298 = 01 0010 1010)
-
Remote Connector
02/02/2015 at 20:38 • 0 commentsFound some background info about the controller and relay box. they are both off-the-shelf components manufactured by JIECAN
Controller spec - http://www.jiecang.com/upload/file/enPDF/JCHT35K.pdf
and Relay spec - http://www.jiecang.com/upload/file/enPDF/JCB35N.pdf
I couldn't resist opening the remote. This is what i know about the pinout -
- Transparent - "M" button (when set to LOW)
- Brown - Digital - guessing it`s for data display (5v TTL)
- Black - GND
- White - ?
- Red - +5v
- Purple - ?
- Green - UP button (when set to LOW)
- Yellow - DOWN button (when set to LOW)
Next, doing some bit sniffing for the display.
-
First examination
02/01/2015 at 00:14 • 0 commentsThe desk have 2 main electronic components - a relay box that controls the motors and a small wired remote that controls the relays and display current setting.
The remote have 7 buttons - UP, DOWN, 4 programmable heights and 1 button to program the 4 stored heights. the remote also have a small 3x7-segment/LED display that shows current height.
There is a standard RJ-45 connection between the remote and the relay box
There is an additional socket right next to the RJ45 connector that's just a little bit bigger than a standard phone jack (connector is currently not in use)
More about the desks - http://www.upliftdesk.com/