New project - MSFS C++ USB interface


+ Reply to Thread
Results 1 to 40 of 170

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    Nice PCB, though it needs sanding as you noted.
    ...
    Do you know what is the smallest part you can do with your CNC?

    Ioannis
    Thanks.

    Well, I know this can handle SOIC easily. I'm sure this could handle SSOP. The only limitation is me; my hands shake a bit now. I got some of that low-melt solder and a new hot-air gun to test some SSOP.

    Last weekend I found out that QCAD doesn't have any means of milling slots; so that meant finding another PCB design software. After 30 minutes of research, I had already decided KiCAD was the one to try first. Reviews on the web gave it very high marks, and deservedly so. Took me only 2 days to get "comfy" with it; I love it, very powerful. I had to redo that circuit above from scratch; which was a good learning experience. It gave me a chance to put the 2 screws in a diagonal arrangement, with 2 headers in the opposite corners for stability.

    I uploaded my new design to JLCPCB for the fun of it; just to get an idea on the upcoming costs. 26mm x 18.5mm, panelized 10 rows x 10 columns (even 100 per sheet), 5 sheets. Check this out, $22 excluding shipping. I'm not even gonna bother shopping elsewhere.


    (updated with the silkscreen, paste and mask files for both sides; turns out that's all included in the price)

    I have 6 of these "switch/pot/encoder adapter circuits", 4 secondary boards (maybe 4" x 6"), and one USB master (that won't be very big). It looks possible to keep that under or close to $10 with JLCPCB.

    Robert
    Last edited by Demon; - 25th October 2023 at 06:22.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    3D PCB viewer included in KiCAD.



    Wow! :O

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Wow from me too!

    You got all that in a few days? Well, KiCAD will be my next try on PCB software then!

    I use JLCPCB for a long time now and while other competitors may have better quality sometimes, I stick to them because they have DDP option to send in my country. That means I do not have to worry about import taxes and proceedures for this. Love it.

    Ioannis

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I just noticed JLCPCB only goes down to 0.4mm pin spacing for economic PCBA, and down to 0.35 for standard. PIC 18F25K50 SSOP has 0.2mm between pads, so I guess that means down to SOIC for me.

    Robert

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I think you are OK since the min pad to pad is 0.127mm and the PIC selected is 0.2mm

    See here: https://jlcpcb.com/capabilities/pcb-capabilities

    Ioannis

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    I think you are OK since the min pad to pad is 0.127mm and the PIC selected is 0.2mm

    Ioannis
    Except I have to be able to solder the prototypes.

    I edited the BOM an PKP files as they instruct to get a better cost estimate for 5 10x10 panels. Over 50% is shipping.

    Have you used their assembly service? I don't see any billing for the actual parts being assembled (Components is blank).

    I have 2 capacitors, 2 resistors, in 1206 SMD format. I didn't see any way of telling them the specs of the components except for the value (my caps are ceramic, resistors are thick film - no mention of voltage, watts, tolerance, etc).


  7. #7
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Ioannis (or anyone else who knows),

    Have you noticed if they care how many holes are in a PCB?

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    I think you are OK since the min pad to pad is 0.127mm and the PIC selected is 0.2mm

    See here: https://jlcpcb.com/capabilities/pcb-capabilities

    Ioannis

    I've been playing with their online quote, and I noticed some irregularities when you get a quote on way, then backtrack and do it another (like with and without assembly, or when you change from single boards to panels). It seemed as though they forget to reset some variable and I got different prices.

    So I got in the habit of always starting from step 1, and submitting the starting ZIP file. That way I had more predictable results.

    Overall though, it is EXTREMELY economical to print with them. My small board costs me $100 CAD for 500 with shipping including assembly of 2 SMD resistors and 1 SMD capacitors. That's $0.20 each; making my own PCB boards is not even close to worth it.

    I'm going to solder the switches/buttons/rotary switches/rotary encoders as well as the JST XH connectors to start. I'll see about the PIC MCUs main board later; gotta start somewhere.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    I noticed that also. Some settings are revert to default so, yeah. Prices are not same.

    Regarding assembly, for passivess like resistors and capacitors, you have so many to choose and the possibility to select one that is out of stock is too high! Also most of the brands are unknown to me with so many parameters to check. But the prices are in either case low.

    On the other hand for MCUs, things are not so nice about prices or stock.

    For 10 or 20pcs I did not bother and paid the extra money to have a PIC16F assembled.

    Ioannis

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    Wow from me too!

    You got all that in a few days? Well, KiCAD will be my next try on PCB software then!...

    Ioannis

    I can't say enough good about KiCad. It even has SPICE, but I never got to learning exactly how to use that.

    I can generate all the files for a new circuit within a few hours. I can't imagine not working with it now. I love the Electrical Rules Checker; that saves a ton of time, money and effort.

    It takes a while to get used to some of its way of doing things. There's a LOT of information on the web for any error I encountered; like having to add a PWR_FLAG to VDD and GND lines, and how symbols can be divided into units).

    Units are essentially individual layers for components with multiple functions, like a 74HC14 chip with 6 circuits and the power circuit. In this example, I use only 4 of the 6 circuits. I'm putting the decoupling caps near the pin on the MCU (it's a separate circuit).

    Name:  KiCAD units.png
Views: 7129
Size:  141.2 KB

    And best of all, it's free.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  11. #11
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Why is the PWR_FLAG necessary to be added? Isn't +5V enough?

    Ioannis

  12. #12
    Join Date
    Aug 2011
    Posts
    457


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    You shouldn't leave the inputs of the HC14 floating... the outputs will be unknown.

    Also, an ST gate really won't debounce anything if that's what you're trying to do.

  13. #13
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Yes, inputs should not be in the air.

    Also despite being ST inputs, the resistor and a cap should still be added. Tubleweed is very right about that.

    Ioannis

  14. #14
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by tumbleweed View Post
    You shouldn't leave the inputs of the HC14 floating... the outputs will be unknown.
    ....
    I wish I had seen that before sending that order to JLCPCB. I'm gonna have a resistor jumper on my brand spanking new circuit (only printed 5 to test).

    Name:  74HC14 input.png
Views: 6552
Size:  686.1 KB


    Quote Originally Posted by tumbleweed View Post
    ...
    Also, an ST gate really won't debounce anything if that's what you're trying to do.
    I'm trying to get a cleaner signal like he explains here at "Hysteresis: The Full Fix".

    Are you saying this doesn't work as he explained?

    https://hackaday.com/2015/12/09/embe...uttons-part-i/
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  15. #15
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by tumbleweed View Post
    You shouldn't leave the inputs of the HC14 floating... the outputs will be unknown.

    ...

    Oooops. I've since added a pull-down for the input I was using.


    I'm seeing several comments on google about connecting the unused pins to ground. If I'm not using their output, can a floating input disturb the other circuits?


    EDIT: I've googled some more and found this explanation:

    "...random charges accumulating there can/will cause unpredictable internal behavior in the chip, including oscillation and high power dissipation."

    https://electronics.stackexchange.co...-inputs-outpus
    Last edited by Demon; - 15th January 2024 at 05:26.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  16. #16
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: New project - MSFS C++ USB interface

    Quote Originally Posted by Ioannis View Post
    Why is the PWR_FLAG necessary to be added? Isn't +5V enough?

    Ioannis

    In order for KiCad to be able to test the circuit, it has to know where the current is coming from. I just noticed how one dude uses a tiny legend to connect the flag with VDD and GND. You only need to connect the flag on each once.

    https://forum.kicad.info/t/erc-error...nd-gnd/39364/5
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. USB interface
    By Frozen001 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 28th December 2011, 20:37
  2. Host for USB interface?
    By Carrasco in forum Off Topic
    Replies: 4
    Last Post: - 4th August 2007, 00:59
  3. USB Interface using PIC
    By Tissy in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd May 2006, 17:04
  4. USB interface from PIC16F877 to PC
    By headshouter in forum USB
    Replies: 0
    Last Post: - 26th February 2006, 05:58
  5. USB project
    By NL2TTL in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 18th January 2005, 22:59

Members who have read this thread : 10

You do not have permission to view the list of names.

Posting Permissions

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