New project - MSFS C++ USB interface


+ Reply to Thread
Results 1 to 40 of 170

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    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

  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

    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

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


    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

  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

    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).


  5. #5
    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?

  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

    This is what you get when you ask for specs from a company on the other side of the world.



  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

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

    I have used the assembly twice.

    First time was on a small PCB with 5 or 6 components for 5 pieces. The PCB had a through hole connector that seemed hand soldered. Anyway it was OK all of them and worked fine.

    The second attempt was more complicated PCB with a square PIC and more components (SMD and Through hole). I did a mistake on the selection of LED's. I chose the ones that light from the side and their engineers spotted the mistake, sent me email to explain the problem and the solution, and after I accepted it, I received the 20 pcs that were almost all working fine. One had a cold solder and was easy to fix.

    Right now I am preparing my third order and I see that prices of PIC dropped enough, comparing 5-6 months ago.

    My problem is that they have tons of passive components to choose from many (unknown) suppliers!

    I had similar replies as you Robert about specs or other questions... Yes, communication might be difficult at times. Or most of the times!

    About holes, no. I did not had to count them. There seems no limit or charge on this.

    Ioannis

  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,172


    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
    I noticed that also. ...

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

    Ioannis

    Good, I was hoping I wasn't seeing things the other night.

    Yeah, that liquid solder paste and an air gun is changing the game. It's a lot less complicated for shaky hands like me to solder tiny MCU legs.
    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
    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

    You really have to go through the entire estimate process to get the actual shipping fee, as well as customs and taxes. In the sample I tried, it went from $0.15 each to $0.30ish each.

    I'm using clean ($2.10) and de-panel ($4.19) as well, that way boards should be relatively ready to use when they arrive. These fees were the same whether I did 3x3 or 10x10 panels (I didn't change the quantity, these were for 5 panels, I assume it'll increase for more panels).

    It's kinda cool how they maintain an update of the entire production process. I made a small order of 5 units of single boards, just to learn how things work from A to Z. My real order will most likely be for 5 of 10x10.

    Name:  JLCPCB fabrication progress.png
Views: 9577
Size:  30.8 KB
    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!

  12. #12
    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: 9313
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!

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


    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

  14. #14
    Join Date
    Aug 2011
    Posts
    460


    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.

  15. #15
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    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

  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 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: 8430
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!

  17. #17
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,172


    Did you find this post helpful? Yes | No

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

    It will work if you included the RC network also. But NOT as in your post #69, where switch go directly to the HC14 input.

    Ioannis

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


    Did you find this post helpful? Yes | No

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

    I really shouldn't work until the wee hours in the morning. That rotary switch circuit was totally not finished.

    I've updated my pushbutton circuit.

    Name:  Circuit B3F-4055 w 74HC14.png
Views: 9175
Size:  52.2 KB


    And my rotary switch circuit. (CORRECTED VERSION IN NEXT POST)

    Name:  Circuit SR25 SP4T w 74HC14.png
Views: 9189
Size:  97.5 KB


    1. Do you see any other mistakes?

    2. Do I still need a cap at the MCU pin when it's a signal from a 74HC14?



    EDIT: Hmmm, just noticed my pull-ups on the rotary switch are between the 10K and 74HC14. Gonna go change that.

    Thanks!
    Last edited by Demon; - 14th January 2024 at 00:19.
    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!

  19. #19
    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!

  20. #20
    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 : 7

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