Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post

    Arrow [Hardware + Software][C++ or C#] USB Fan

    Hey All,

    I am a newbie C#, VB and PHP programmer and I know also some stuff in C++.

    I started to play around with hardware last week when i had to fix some stuff in my mouse and i kinda liked it so:

    I picked a old usb mouse cable and a old motherboard fan, then i stripped the usb cable, conected usb white wire to fan red wire and usb blue wire to black wire and fan is now working (i think the usb has only 5 volts because its a 12volts fan so its working at half of the speed).

    There are two wires left, orange and green, i presume they are the wires that used to send data from mouse to the computer, here is a pic of the little stuff i made:



    I want to do a software that first detects if it plugged in (is it possible to send a number through the orange or green wire then it reads it? if its the correct number it means the fan is plugged in), then it will increase or decrease the voltage of the blue or white wires! (It can be C# or C++)

    Thanks In Advance,
    Best Regards,
    Mywk
    Last edited by Mywk; 06-14-2009 at 08:00 PM.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    That is a cool thing to try. USB does run on 5 volts, not 12 as you were thinking. To know a little bit more how USB sends its data, you might want to read up on differential signaling. That is why it has two data wires. You can use a chip to convert the signal back to one data line.

    Sadly it won't be quite as easy as you think to do what you want. Getting the data lines merged back together isn't that hard per-se. However the way the computer knows how to route data is that there is a protocol that the bus uses so different devices can identify themselves and the data gets routed correctly. Which means without a controller chip, your fan can't identify itself properly.

    If you are interested in controlling your fan with software, I'd suggest you try an easier interface. A serial port or a parallel port is so much easier to work with from a software perspective and a hardware perspective.
    OracleGuy

  • #3
    New to the CF scene
    Join Date
    Sep 2008
    Posts
    3
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by oracleguy View Post
    That is a cool thing to try. USB does run on 5 volts, not 12 as you were thinking. To know a little bit more how USB sends its data, you might want to read up on differential signaling. That is why it has two data wires. You can use a chip to convert the signal back to one data line.

    Sadly it won't be quite as easy as you think to do what you want. Getting the data lines merged back together isn't that hard per-se. However the way the computer knows how to route data is that there is a protocol that the bus uses so different devices can identify themselves and the data gets routed correctly. Which means without a controller chip, your fan can't identify itself properly.

    If you are interested in controlling your fan with software, I'd suggest you try an easier interface. A serial port or a parallel port is so much easier to work with from a software perspective and a hardware perspective.
    I'm actually getting a lot of support here: [Hardware + Software][C++ or C#] USB Fan

    "I did some more research and you are actually right, i can't regulate the voltage of the USB port, however i can power the fan using external 12v power adapter then regulate the amount of volts the fan will receive with my device."

    I'm really interested in to use USB and not serial or parallel ports.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •