Carbon Project - The Hardware

Posted by on in Carbon Project
  • Font size: Larger Smaller
  • Hits: 88801
  • 98 Comments
  • Subscribe to this entry
  • Print

Introduction

Well guys there's a lot of people excited to build this project and I'm very pleased with it. The first information that I can give you is the price, it's around US$50 (a little bit more or less). I will publish the bill of material later in this post. Let's start!

The carbon is an intrusive project, I mean you should solder a lot of wires on controller board (This may cause controller's destruction, so don't blame me if that happen). Let's start with eletrical schematic that can be seen in picture 1.

b2ap3_thumbnail_schematics.png

As heart of this project I'm using a STM32F407 microcontroller featuring 32-bit ARM Cortex-M4F core, 1 MB Flash, 192 KB RAM. The board used has a lot of components that won't be used in this project. But this is an cheap board so i think that is ok. This microcontroller family has an important feature that it has two USBs.

The input of the circuit is done by usb connector, that is used to plug a full speed USB HUB. The keyboard and mouse will be connected into this HUB. The microcontroller will process these inputs and select the appropriate behaviour in the output pins. The UART connector is optional and used to see the log output.

All these pins with BTN_ prefix will be soldered in some point in controllers PCB (showed later) , the resistor in serie is just for limitation of current and for circuit isolation. 

The two DAC's(Digital to Analog Convertion) is for the sticks. These components are responsable for translate values in a range of 0 to 4096 (12 bits resolution) to tension from 0 to DAC_VREF. So when the stick is in the rest position the value will be approximately 2048 and in output of the DAC will be about 1.65 Volts.

The DFU (Device Firmware Upgrade) button and the circuitry around it is for firmware and profiles update. This will be done through the second USB that will be configured as device. This port is the way that PC will write the profiles built using the configuration software.

 

Construction

If you are interested to see the Dualshock4 teardown, follow this link: http://imgur.com/a/ytRW5/embed.

In picture 2 the top of board is showed. There are three buttons that should be soldered here(BTN_OPT,BTN_SHARE, BTN_TOUCH). The two red rectangles shows the vias that should be scratched on other side in order to solder other buttons.(showed later). And the green rectangle with two *, is the easy solder method but using it the buttons of controller will not work anymore(if DS4 is cheap in your country, this is a good choice for soldering).

 

b2ap3_thumbnail_top1.png

 

In the next picture we have the board bottom in a closeup showing the points where the other buttons should be soldered. This part is the worst because the vias are too close each other, so take care with this part. This is the why of use top side of board is more easy. 

 

b2ap3_thumbnail_closeup1.png

In the next picture we have the board bottom again, but this time showing the points where the sticks and last buttons should be soldered. In red rectangle you can see where should scratched to solder the wires for buttons showed in previous picture. 

 

b2ap3_thumbnail_bottom1.png

In the next picture we have the USB board that can be found on bottom of the controller. So in this point we will provide the 5 Volts to feed the internal battery of controller. Notice that you cannot feed the project using the internal battery of controller.

 

b2ap3_thumbnail_usb1.png

 

In next picture you can see the wires on board:

 

b2ap3_thumbnail_wires123.png

 

b2ap3_thumbnail_open.png

 

b2ap3_thumbnail_picture3.jpg

 

b2ap3_thumbnail_picture6.jpg

 

The last picture is jut to you remember that all wires from controller should be soldered in to MODU connector. There's an exact position for each wire, this position can be found in schematics, for example: A21 means pin 1 of connector A2, A210 means pin 10 of connector A2 and so on. If you make a mistake wiring that you probably will have a big headache, so be carefull.

 

b2ap3_thumbnail_closed1.png

 

Bill of Material

This information is just for reference the description and product's URL are in portuguese, so if you're in another country, please use the Manufacturer reference number. The components are THT(Through-hole technology) to be easy to solder. This list doesn't includes the universal board.

PLEASE DON'T TRUST IN THE LIST BELOW - USE THE "BOM" THAT CAN BE FOUND IN DOWNLOADS AREA.

Distribuidores e Alojamento de Fios 2X20P DUAL ROW

http://br.mouser.com/ProductDetail/TE-Connectivity-AMP/2-826925-0/?qs=sGAEpiMZZMuSK2mCDyT9cjkFZbMNVh68

Mouser ref: 571-2-826925-0

Manufacturer ref: 2-826925-0

price: $2.02

 

Distribuidores e Alojamento de Fios REC 2X20P VRT T/H

http://br.mouser.com/ProductDetail/TE-Connectivity-AMP/7-534998-0/?qs=sGAEpiMZZMs%252bGHln7q6pm0wZ0LWRnA5CZcN8JKHq6GI%3d

Mouser ref571-7-534998-0

Manufacturer ref: 7-534998-0

price: $5.97 (I guess that is possible to find something more cheap)

 

Fio de conexão 30AWG KYNAR INSUL 100' SPOOL WHITE

http://br.mouser.com/ProductDetail/OK-Industries/R30W-0100/?qs=%2fha2pyFaduh6nRrgCMMSbevNpYPJ%2fvSu%2fytpxqq%252bpO4%3d

Mouser ref801-R30W

Manufacturer ref: R30W-0100

price: $12.35

 

Placas e kits de desenvolvimento - ARM STM32F407 HIGH PERF DISCOVERY BOARD

http://br.mouser.com/ProductDetail/STMicroelectronics/STM32F4DISCOVERY/?qs=sGAEpiMZZMutVogd4PRSvEN8XDBeCtgD

Mouser ref511-STM32F4DISCOVERY

Manufacturer ref: STM32F4DISCOVERY

price: $14.88

 

Conversores analógico-digital - ADC Dual 12-bit SPI int

http://br.mouser.com/ProductDetail/Microchip-Technology/MCP4922-E-P/?qs=sGAEpiMZZMsUzhEcHltCub8Lp%2fVLNqOx

Mouser ref579-MCP4922-E/P

Manufacturer ref: MCP4922-E/P 

price: $2.76 each

 

Conectores USB 4P 'A' RECEPTACLE

http://br.mouser.com/ProductDetail/TE-Connectivity-AMP/292303-1/?qs=sGAEpiMZZMvJkDqKJH80dKVjG4iv2QgW

Mouser ref571-292303-1

Manufacturer ref: 292303-1 

$1.09

 

20 resistor 220R

2 resistor 10K

2 resistor 22R

1 capacitor 1uF

2 capacitors 100nF

 

If you think I forgot or wrote something wrong, fell free to correct me.  

 

Links:

STM32F4DISCOVERY board

Eagle file of schematics (Download this file from Downloads area)

MCP4922

 

Final considerations

I beg you to share your concerns and issues with other users, so if you think in make a board for this project, try to ask to others if they are interested and make a number for all. So please share knowledge.

Soon I will reactivate the forum (I'm using the easydiscuss from stackideas, but months ago a guy got register a bunch of users, so I disabled this functionality).

The firmware and PC software will take a longer. for those people that have urgency but have a G13  can provide the firmware with no profiles configuration yet. these guys will have to play with my profile.  

Enjoy and happy build! 

 

Trackback URL for this blog entry.

Comments

  • Mark Rossi
    Mark Rossi Tuesday, 10 December 2013

    Nice post. There will be a lot of people who do not have the skils to do this. Wondering if you would consider selling a working product. Even if you use Kickstart to get the funding.

  • OPLV
    OPLV Tuesday, 10 December 2013

    Thank you! I am interested in your project. I order the STM32F4DISCOVERY I prepare components and I wait. Regarding the software, I have the G13, how to write the program ?

    Thank you for job !! Good luck ! :)

  • Mori
    Mori Tuesday, 10 December 2013

    Very soon I will provide a link to download the firmware, and of course some explanations.

  • OPLV
    OPLV Tuesday, 10 December 2013

    Great ! I begin the hardware.

    Thank you !

  • OPLV
    OPLV Tuesday, 10 December 2013

    A question, with the first solution the green rectangle ** The touchpad does it work? And the 3.5mm jack?
    Thank you !!

  • Mori
    Mori Tuesday, 10 December 2013

    Yes, touchpad and sound jack still working. Just buttons in the flexible board(I can't think in a better words to describe that) doesn't work, like Left, Right, Up, Down, Cross, Triangle and etc.

  • OPLV
    OPLV Tuesday, 10 December 2013

    Thank you for the reply ! I understood :)

  • giuseppe
    giuseppe Tuesday, 10 December 2013

    Mark rossi is right, it isn't easy for people without knowledge... i think that this tutorial isn't enough, we need more detailed infos and pictures about the steps in particular on how to solder all the wires... but maybe you should consider to sell a working product even with the costs of Dualshock 4.... nice job man your idea is great but hard to make for ppl like me.

  • Mori
    Mori Tuesday, 10 December 2013

    Mark, the big problem with this solution(build and sell) is that will be very expensive ( I PS4 here in Brazil costs US$2000,00). So maybe I do a video trying to explain better, I really don't know...

  • Guillermo Landos
    Guillermo Landos Wednesday, 11 December 2013

    Thanks for the tutorial!
    Metal film resistor like such?
    http://www.mouser.com/ProductDetail/Xicon/271-220-RC/?qs=sGAEpiMZZMtlubZbdhIBIA99wOnPoN1eTKvuhUQZXl4%3d

    Also can u provide a link to the capacitors please?

  • Mori
    Mori Wednesday, 11 December 2013

    Yes, it sounds good. About capacitors:
    100nF(C1,C2) could be:
    Mouser ref: 810-FK18X7R1E104K
    Manufacturer ref: FK18X7R1E104K

    1uF(C3 - value not displayed)
    Mouser ref: 539-SN010M025ST
    Manufacturer ref: SN010M025ST

    if you look closely the 3rd picture from bottom to top, you can see that I use all resistor and caspacitors in smd format.

  • Guillermo Landos
    Guillermo Landos Wednesday, 11 December 2013

    Thanks for all your help Mori! I would like to bother you one more time. I want to make sure I get everything right with the same components you have used. Would you be able to share the shopping cart with all the items needed from mouser? that way we can just copy and paste the link on our browser and just buy everything needed(modu connectors too).
    Or
    Can you sell me the board with everything assembled I can buy the Dualshock 4 here and solder the rest here myself. Just name the price and I will pay it.

  • Mori
    Mori Wednesday, 11 December 2013

    Guillermo, I loved your idea I'll do that. I will make it for you!

  • Guillermo Landos
    Guillermo Landos Sunday, 15 December 2013

    Great how can I communicate with you!

  • Guillermo Landos
    Guillermo Landos Wednesday, 11 December 2013

    Great! Let me know how much you want and I'll make it happen.

  • Darrell
    Darrell Saturday, 14 December 2013

    let me know the price as well to get one assembled

  • Bryant Warren
    Bryant Warren Thursday, 12 December 2013

    a video tutorial would be nice along with the written details. thank you for sharing this :D

  • Daniel
    Daniel Friday, 13 December 2013

    Hi guys,

    I've order the components.. i already bought the discovery board.

    I would also wanted a full tutorial.. but if right now you dont have the time to do it, at least i would like you to show by video like the connections go from here to there, and the resistors are here and the connections on the ADC Dual 12-bit SPI int is made like this ( this one is the one i have more doubts hehehehe).. etc

    Then we could pause the video to take some closer look... Please Mori can you do it?

    And for all the members we could all record this steps on our video like tutorial .. so we can also upload it to help someone else.. and maybe we can also help Mori..

    Cheers to all!!

    Abraço aqui de Portugal Mori ;)

  • Mori
    Mori Tuesday, 17 December 2013

    Olá, um grande abraço a todos os portugueses também!

    It's a good idea, I need time to make this video or something like that. Anyway, let's see what happens.

  • OPLV
    OPLV Sunday, 15 December 2013

    I just opened the DS4. I think use top side of board is more easy. Question? I solder the buttons on the green rectangle or red rectangle? I do not know ..
    Thank you !!

  • OPLV
    OPLV Sunday, 15 December 2013

    Because there is a flex circuit on the green rectangle.
    http://imgur.com/a/ytRW5/embed#94

  • Mori
    Mori Monday, 16 December 2013

    You choose. If you want to use an easy way to solder the wires, use the green one, otherwise use the red one. If you use the the connections in the green rectangle, you need to scratch the contacts and you cannot use the controller buttons anymore.

  • Daniel
    Daniel Tuesday, 17 December 2013

    Hi Mori,

    Tomorrow will start the project... Just arrived the parts :) !!!

    I dont have a g13, but instead i have a Razer nostromo will the software work?

    Can i play this way, or i have to wait for you to free the software to be able to play with nostromo?

    Or can i do anything to the firmware to be able to play with nostromo or normal keyboard?

    Cheers!

  • Mori
    Mori Tuesday, 17 December 2013

    Yeah! Razer nostromo is supported too!

  • OPLV
    OPLV Tuesday, 17 December 2013

    I started the project :) I wait the STM32. After I need help to upgrade the firmware.
    Thank you very much ! :)

    http://image.noelshack.com/fichiers/2013/51/1387318979-img-2196.jpg

  • Mori
    Mori Tuesday, 17 December 2013

    Very nice ! I'm working in a post about software update and it will be posted until the end of this week.

  • OPLV
    OPLV Wednesday, 18 December 2013

    That's Great !
    I don't understand the DFU. Can I solder a switch ?
    Thank you !

  • Daniel
    Daniel Wednesday, 18 December 2013

    Hi Mori,

    IT ARRIVED :) !!!!!

    Tomorrow ill start digging into this project!!!!!!!!!!!!!!!!!!

    Just need to retrieve my nostromo from the store, and in portuguese " o chupa soldas" from a friend and im set.

    Will you release also the software to do configs like the one you have for PS3?

    Cheers, abraço!!

  • Mori
    Mori Friday, 20 December 2013

    Hey, Good news so :D, and yes, I will provide a software for device configuration. I just need more time to do it. I Liked of term 'Chupa soldas' ;)

  • Gonzalo Arrojo
    Gonzalo Arrojo Wednesday, 18 December 2013

    this is awsome!!!!!

    you should sell your own versions!!! I will probably buy it from you if I fail doing it :D

  • rey
    rey Wednesday, 18 December 2013

    Uhm..I have no idea with all the specs and ingredients. .do you think you can sell me the built set up so I can just plug my ps4 controler?

  • rey
    rey Wednesday, 18 December 2013

    Or does anyone selling this with a ps4 controler already? Willing to pay if the prie is right

  • Alex P
    Alex P Thursday, 19 December 2013

    Hey!

    First of all, that is some fantastic work! Thank you so much for the well detailed tutorial as well~!


    I just have one quick question;
    Do you think this will work with my keyboard? I have a 2013 razor expert (mechanical keyboard)
    http://www.razerzone.com/gaming-keyboards-keypads/razer-blackwidow/

    Thank you again! :)

  • Mori
    Mori Friday, 20 December 2013

    I believe that this keyboard will work because it's like a gamer keyboard. generic keyboards, I mean Low speed usb keyboards don't work.

  • Alex P
    Alex P Friday, 20 December 2013

    Okay, Thanks! :)

  • John Bakator
    John Bakator Friday, 20 December 2013

    Hey, sorry if I sound like a newb, but could you tell me what "VSS", "VDD" and "DFU" mean?
    And what is that optional "UART"?

    lol, no rush, if you get a moment, It would be MUCH appreciated. Thanks in advance.

  • Mori
    Mori Friday, 20 December 2013

    No worries. DFU means 'Device Firmware Update' in this case we will update the firmware using DFU USB. Vss is grounfd or 0V and Vdd is the positive supply. UART is just a serial communication, int his case I'm using it to debug.

  • John Bakator
    John Bakator Saturday, 21 December 2013

    Thank you kind sir!

  • OPLV
    OPLV Friday, 20 December 2013

    I must solder a switch to DFU ? Or used one of the STM32?

    Thanks Mori !

  • Mori
    Mori Friday, 20 December 2013

    No, the DFU key must be other than STM32 keys, because the connection are done in different place. This key must be pressed with reset in order to put the STM32 in DFU mode.

  • OPLV
    OPLV Friday, 20 December 2013
  • Mori
    Mori Wednesday, 29 January 2014

    Really cool !!!! ;)

  • Daniel
    Daniel Friday, 20 December 2013

    Hi Guys!

    Oplv can you post one more pick without the stm32 plugged in? or did you soldered it?

    Asking just to see better the resistors and some connections.

    And you guys scratched the ds4 pcb with what sand paper? i mean .. i'm kinda afraid to over do it with a srewdriver or so..

    Thanks!

  • OPLV
    OPLV Friday, 20 December 2013

    Hey Daniel !
    Sorry, I soldered the STM32F4. I put resistors below the map. The other way is to use SMD. I use a spike or screwdriver (small). I'm afraid to use paper.. But I use the first solution of the green rectangle. I was afraid the controller's destruction

    Sorry for my English, I'm French :)
    a spike or screwdriver : http://image.noelshack.com/fichiers/2013/51/1387568998-img-2226.jpg

  • John Bakator
    John Bakator Saturday, 21 December 2013

    Ya, I would love to see that to plz :)

    Ca cerrai tres genti de votre par, dsl pour mon francais, je suis anglophone lol. :p

  • Daniel
    Daniel Friday, 20 December 2013

    Would you be nice enought to show me the connections of the adc dual 12bit and that little connection in the schematic that is near the analogs stick.

    The bottons is no problem but im a unease with the other ones .

    Pls mate help a friend out :)!

  • OPLV
    OPLV Saturday, 21 December 2013
  • Mori
    Mori Saturday, 21 December 2013
  • OPLV
    OPLV Saturday, 21 December 2013

    Thank you very much:)! I make the modifications

  • Matthew Lees
    Matthew Lees Saturday, 21 December 2013

    I must say this has amazed me but I'm no expert and failed twice. I got my controller all rigged but the board is what gets me. And it definitely was harder than it looked. If i could just get you to build one for me id pay you for the materials and work.

  • Please login first in order for you to submit comments

Additional information