shaise / DiSE

A DIY speed editor to use with video editing sw such as Davinci Resolve and others
GNU Lesser General Public License v2.1
41 stars 3 forks source link

Help and progress discussion to replicate the project #2

Open CJGuirao opened 2 years ago

CJGuirao commented 2 years ago

Hello, I found this project and I would really like to replicate it.

Could you help me out answering some questions?

It ended up working with davinci? Is there a recommended BOM? Wich encoder did you use? It is the most important part for usability.

Did you DIY yourself the keycaps? do you reccommend where to get them?

I'd like to replicate the project, and once it is working modify the software so it could be used aswell with other software like OBS Studio. to provide more flexibility.

Thank you very much in advance.

shaise commented 2 years ago

Hi Carlos!

Sorry, Sorry, for not adding all the docs and instructions as I planned to. I have a lot of video footage to edit and publish but did not find time to do it. Anyway, I have added all the missing info for you in the main Readme.MD section. Also added a release version with PCB manufacture files, compiled firmware, and PC configuration SW.

To your questions:

  1. Yes, it works with DaVinci, but I did not implement all possible functions.
  2. Bom is now in the readme + links where to buy.
  3. The encoder also have a link in the readme. When you get it you should make a small modification: Open the cap, and lossen the spring that make the encoder click when rotating. This will give you much smoother operation.
  4. Yes I made the key caps myself. I ordered blank caps (again, links in the readme), then uses Toner powder + laser engraver to write the text. See this video: https://www.youtube.com/watch?v=JR1BwcFyexQ
  5. No need to modify the software! the PC App (in the release files) lets you connect to the keyboard and customize it to any software you want to use it for.

Feel free to contact me with any questions.

CJGuirao commented 2 years ago

Thank you very much for all the information. I've already ordered a few PCBs and I'm looking forward to try to asemble it.

I'll keep you posted :) Let's see how it goes

CJGuirao commented 2 years ago

Update: PCBs arrived, waiting for the rest of the components.

Just found out that the product in wich this project was inspired uses a magnetic encoder using a variation of the well known as5600 that outputs A and B (quadrature output) the same way that this board needs. (take a look of as5601). Pretty difficult to get at a reasonable price. But I might explore that option if I can get one.

Again, thank you very much for your work, and for making this publicly avaliable.

shaise commented 2 years ago

I saw the as5601, nice thing. I wonder why is it so much more expensive then the as5600. The funny thing is that on digikey its less expensive then aliexpress, only $3.6. Anyway, the encoder I chose, once you remove or loosen the "clicker", it is very nice and smooth with a sturdy feeling.

CJGuirao commented 2 years ago

I received the encoders, chose this seller (cheaper) https://es.aliexpress.com/item/1005004437852504.html?spm=a2g0o.order_list.0.0.7760194djKUSGo&gatewayAdapt=glo2esp it is optical aswell, can be modified to remove the detent, and is metallic.

I'm gonna assemble one unit and check how good this encoder feels.

shaise commented 2 years ago

this is exactly the one I used. good.

CJGuirao commented 2 years ago

Fully dissasembled to check quality od the encoder part itself. image Where the detent pin is located to be removed (place it behind the spring so you don't loseit in case you may want to have it back in its place in the future). image Feel free to use the images if you want to explain it in the readme for the future hackers

shaise commented 2 years ago

Thanks!

(place it behind the spring so you don't loseit in case you may want to have it back in its place in the future)

Hehe this is exactly what i did...

CJGuirao commented 1 year ago

Progress update and some help needed: We managed to solder everything but the LEDs. I'd be nice for future people using this project to add polarity of the diodes, and LEDs in the silkscreen. And a table of Resistor values) I'll try to add it myself once everything is working and commit a pull request

We got it on video if anyone is interested. (Spanish audio tho) https://www.twitch.tv/videos/1722772854 (Soldering job of the usbc connector and some resistors) https://www.twitch.tv/videos/1723070128 (Soldering everything but the LED )

We didnt solder the leds because we tried and failed to load the program to the bue pill (our intention was to test the progress so far, and be able to check empirically our assumption of LED polarity instead of soldering all 44 LEDs )

But we are having problems. because the bluepill doesn't identify itself as a device in windows. We assumed the programming steps to be download the st-link utility and burn the bin in the 0x08000000 address We tried burning it with boot0 in 0 and in 1 position.

No success so far. It's my first time using this dev board, so any help to get it working would be appreciated. Whats correct the procedure to program the board? Whats the correct configuration of boot0 and boot1 while programming the board? Whats the configuration of the two jumpers to boot as the device that the board is emulating?

As a side note it seems that bluepill is getting everywhere with fake stm32 chips and we may have one of those. So we are asking for this instructions and details to differenciate between our own ineptitude or a maybe non working stm32 chinese clone.

CJGuirao commented 1 year ago

IMG_20230131_233938 IMG_20230131_234038

CJGuirao commented 1 year ago

Nevermind

Got it working by modifying the source code. In it it was assumed that most of the stm32 have 128k of memory instead of the advertised 64k. It turns out that my probably counterfeit stm32 chinese clone board has 64k Now its recognized so tomorrow we'll continue the assembly DavinciKbd4StupidChineseClones.zip

image
CJGuirao commented 1 year ago

image ´

shaise commented 1 year ago

Nice work!! Yes, counterfeit stm32 are a big issue, since stm32 IDE usually detect them and will not let you program/debug the chip. If you work with arduino interface, it will not be an issue. also, you can compile with the ide then program with the ST-Link utility which works on the Chinese ones as well. But then of course, no debugging is possible. I see also that you found a USB-C version of the BluePill. thats nice. My original board did not have the extra connector at the top, and I didn't like the usb-micro connector originally came with the blue-pill.

CJGuirao commented 1 year ago

When you know what's the actual issue that is preventing it to work gets easier to solve. As it always happens.

For those how are reading this with cheapo blue pills .

Use my .bin or:

Download stm32idecube and edit the project commenting out the line that sets the 128k memory size in the main file.

So now it will be suited for 64k boards

Then edit the build configuration to tell the ide to create the .bin file that you will use to upload the program. Hit build and the needed file should be under releases folder

Then upload it to the blue pill using the old st-link utility

Or if your board has a ch32 chip you can set the boot0 to 1 and then program the thing using the bottom USBC port and the wch utility programmer. The return the jumper to position 0 and your devices auld work on the top usbc and the break out USBC port at the top of the DISE board. No need to use a st-link programmer in this case. Everything is done using the provided USBC ports.

shaise commented 1 year ago

Or if your board has a ch32 chip you can set the boot0 to 1 and then program the thing using the bottom USBC port and the wch utility programmer.

Interesting! I did not know that.

CJGuirao commented 1 year ago

Or if your board has a ch32 chip you can set the boot0 to 1 and then program the thing using the bottom USBC port and the wch utility programmer.

Interesting! I did not know that.

When boot0 is set to 1 the bottom USBC is recognized as a USB module that communicates with the wch programmer. It seems that they preprogrammed a bootloader there to be able to burn the chip without a dedicated dongle.

CJGuirao commented 1 year ago

Today's progress and new weird problems.

We are done soldering all the LEDs and ready to test.

The device works as expected on every key except for the 21 key That key doesn't work and in the DISE programmer does not light up when pressed.

Does not function as an ESC key and when reprogrammed to be a character A does not write it.

Every other key is recognized and works.

Even the keys on the same column and the same row.

Switch is not faulty. It was tested and even replaced. The socket is soldered in place nicely. I've tried shorting the same points on the underside using the pads of the adjacent keys for that row and column and it does not register the key.

Checked continuity on the entire row, column and checked and even replaced the 48 resistor without success.

I cannot debug online with this clone. I didn't figured how to bypass the gdb error to debug it. So I'm kind of blind on this one. I proceded to modify the program to toggle each LED when it is doing the keys scan on the double for loop to check that all the LEDs are soldered with the right polarity and to check if the programs was somewhat skipping that key

All the LEDs can be seen flickering as expected. Even that led under the 21 key.

So at this point I'm pretty sure that the soldering and wiring to the blue pill from that row and column is working. But something somewhere is wrong and the key is not detected.

I'll get some sleep and think about my options to solve this new unexpected issue tomorrow

.

shaise commented 1 year ago

strage, I just found out my 21 does not work either. also 23. Checking...

shaise commented 1 year ago

OK, fixed. the button code should be 22, not 21 Please update the windows app

CJGuirao commented 1 year ago

Today's progress and new weird problems.

We are done soldering all the LEDs and ready to test.

The device works as expected on every key except for the 21 key That key doesn't work and in the DISE programmer does not light up when pressed.

Does not function as an ESC key and when reprogrammed to be a character A does not write it.

Every other key is recognized and works.

Even the keys on the same column and the same row.

Switch is not faulty. It was tested and even replaced. The socket is soldered in place nicely. I've tried shorting the same points on the underside using the pads of the adjacent keys for that row and column and it does not register the key.

Checked continuity on the entire row, column and checked and even replaced the 48 resistor without success.

I cannot debug online with this clone. I didn't figured how to bypass the gdb error to debug it. So I'm kind of blind on this one. I proceded to modify the program to toggle all the LEDs when it is doing the keys can to check that all the LEDs are soldered with the right polarity and to check if the programs was somewhat skipping that key

All the LEDs can be seen flickering as expected. Even that led under the 21 key.

So at this point I'm pretty sure that the soldering and wiring to the blue pill from that row and column is working. But something somewhere is wrong and the key is not detected.

I'll get some sleep and think about my options to solve this new unexpected issue tomorrow

. Everything works now!

You saved me hours of headache haha

Thank you very much

CJGuirao commented 1 year ago

Progress:

Hardware side: Everything keyboard side seems to work. Still don't have the means to print a case. We are going to probably have the case machined out of wood. At least the outer parts. That's going to take a redesign so the can be routed on a cnc machine.
Not sure about the encoder. It may end as it is.

Without the enclosure it seems that the design may benefit from a cherry mx satellite stabiizer (2u size) on the 2.75u switch. There is even space to do it. So I've ordered a set to see if it is a possibility and maybe if it works add to the PCB layout the 4 extra drill holes that it needs. I may have to reroute a trace or two around it, nothing mayor though.

Schems: I've characterized the resistors, and diode in the schema. Also written in the silkscreen a little table of the components And diode polarity as requested by YT @canaltornillo I'll commit a pull request soon.

I don't know if in kicad there is an option to add a number of components that are not paced in the pcb so they will be listed in the BOM. Right now BOM generation exports everything with their values except for the 44 LEDs (the LEDs are integrated in the footprint of the cherry mx so the are not listed as such separately)

Software side: I'm getting familiar with the code, Because i'd like to expand the capabilities, and internationalize the program.

There is a strange bug that drove me crazy, and in this process, I'll try to fix. If you insert the keyboard on different USB ports, windows remembers all of them so there is "multiple keyboards but just one connected and active" SpeedEditorProg detects the keyboard (shows green icon) but don't show any hints of any keypress , you cannot program, read from or write to the keyboard. A workaround is to remove all hidden disconnected devices from windows device manager. The application may be trying to communicate to the keyboard using the wrong unconnected device? As soon as I removed all the instances of detected DISEs everything came back to normal.

The example configuration provided with the software seems to be unreadable by the program. Upon inspection it seems to be a "c style export" of the default config. Instead of a normal export that you can load and reprogram.

Extra functionality not documented and hidden: There is a way to restore the keyboard defaults by pressing ctrl and the program button. I noticed it on the firmware before, and its a hidden functionality that works. This should be more visible, It is good having that.

As commented above you can export the current keyboard configuration as a "C style config file" by holding ctrl when clicking the save button. Probably written to speed up the process of developing the firmware.

As always, thanks for the amazing work you did creating this

shaise commented 1 year ago

Schems: I've characterized the resistors, and diode in the schema. Also written in the silkscreen a little table of the components And diode polarity as requested by YT @canaltornillo I'll commit a pull request soon.

Thanks! good idea!

There is a strange bug that drove me crazy, and in this process, I'll try to fix. If you insert the keyboard on different USB ports, windows remembers all of them so there is "multiple keyboards but just one connected and active"

As far as I remember this should have been handled, but I will take another look.

CJGuirao commented 1 year ago

There is a strange bug that drove me crazy, and in this process, I'll try to fix. If you insert the keyboard on different USB ports, windows remembers all of them so there is "multiple keyboards but just one connected and active"

As far as I remember this should have been handled, but I will take another look.

I've opened a different thread to discuss about the problem and already found a temporary fix https://github.com/shaise/DiSE/issues/4

CJGuirao commented 1 year ago

Progress After having redrawn the case and a Visit to Youtube Channel @CanalTornillo I came back home with a new case made out of wood. image

shaise commented 1 year ago

Wow! Amazing. Is it hand made or CNC made?

CJGuirao commented 1 year ago

Tolerances of that thing are not possible to hand make.

There are 44 keys that should be done between .1 to .2 mm to be able to properly hold the keys.

It is CNCed thanks to the awesome help of @canaltornillo

I redesigned the case based on your current 3d printable work and taking all the measurements from the kicad project.

There is footage of it. That I'll expect soon to be released.

Maybe tomorrow I'll be available to try the final assembly and test it.

If this design works, Should anyone want to have one of those instead of printing their own I could relay their messages to canaltornillo. So they reach an agreement to produce one or more.

The hardest part. Creating the routes is already done. So making more it's easier now.

Doing it in wood may be a bit overkill... But I wanted to have something that feels special to me.

It took me about 3 days to design the case. With no previous experience in fusion 360. Awesome program btw. New images and documentation for assembly soon... And it took us 1 day to create the actual tool paths in gcode and cut the wood.

This first prototype is not perfect. Next ones for himself and three other friends are going to be spotless.

shaise commented 1 year ago

As a CNC user I'm totally impressed! This is one heck of a complicated toolpath... (I'm tempted to use yours to make one myself...)

Next ones for himself and three other friends are going to be spotless.

Yes! Spread the word! I have lots of video footage with the making processes. I was a bit lazy to edit it, perhaps it a good time to do it.

CJGuirao commented 1 year ago

(I'm tempted to use yours to make one myself...)

I'll commit the 2d dxf drawing to the mechanics folder once assembled and final.

We are 5 friends and I sourced the components to build five.

Pine wood is somewhat soft and weak. Something more dimensionanble stable would be great.

Pine was chosen just because of the pricing of nowadays wood planks

shaise commented 1 year ago

Pine is indeed weak. I have some mahogany wood chunks just waiting for a nice project. With some shiny clear coating it should look great...

CJGuirao commented 1 year ago

image

CJGuirao commented 1 year ago

image

shaise commented 1 year ago

Very nice indeed!