Shop OBEX P1 Docs P2 Docs Learn Events
Really like the IDE schematic drawing; please criticize my work — Parallax Forums

Really like the IDE schematic drawing; please criticize my work

Ken GraceyKen Gracey Posts: 7,392
edited 2013-01-30 21:52 in Propeller 1
Hey there,

Still making my way around the Propeller IDE and learning something new every day. Today I spent an hour drawing the schematic of my top-level program in an autonomous robot that I've put together for a presentation in Netherlands next week at the Elektor Live event (with Coley and Baggers, two guys who have a real surprise for our visitors!). The purpose of the demo is to show a simple framework for simultaneous processing, simple enough that even I would understand it. You guys on this forum do some impressive stuff and it's really humbling for me to see it all around me. Anyway, this particular demo does speech synthesis (thanks, Phil + Chip), RF send/receive to base station, H-bridge control, and Ping control all at once. The top program ties the processes together in a few short objects. COGs manage the various processes.

But what I'm seeking is feedback on the schematic, and the quality of the drawing I've made. Not looking for any rosy compliments, but real criticism so I can make it better. Being proud of myself usually gets me in trouble. I have pasted a screen capture with select on (hence the blue background) and the actual text in case improvements can be shown. I'm interested in making the best use of the schematic drawing tool for a clean and complete presentation. Does the mix of Vss and symbols bother anybody? Or, the chip-centric view? Should it really be a whole-system schematic that shows the Propeller too?

I'm not done, I know, but your comments will help me get there more quickly.

Since the copy/paste into the Code formatter didn't work I'm attaching part of the file.

Sincerely,

Ken Gracey

P.S. Went to Andy yesterday to ask "what are you using to draw schematics these days? He replied with a myriad of choices: Corel, Eagle, Word. etc. depending on the application. He was saving his best option for last: "use the Prop IDE like you are supposed to!" It's much faster and the limited amount of flexibility helps me get to the final product much quicker.

attachment.php?attachmentid=65041

{

                    Wireless Interface                           Speech Synthesis

         XBee-24 RF Module         XBee-24 RF Module             LM386N-1 Op-Amp                                   
             Receiver                 Transmitter                     10 uF                                        
           ┌────┬┬────┐              ┌────┬┬────┐             ┌─────────┤├────────┐                                
 3.3V ───1│VDD       │   +3.3V ───1│VDD       │             │  ┌──────┬┬─────┐  │  Set for 200 Gain              
           │          │              │          │             └1│gain     gain│8┘                                
   P25───2│RX        │      NC ───2│RX        │                │             │        100 uF                     
           │          │              │          │     VSS ─────2│-input bypass│7───────┤├─────┐                   
    NC───3│TX        │     P29 ───3│TX        │     P15───┐    │       ▶     │                                  
           │          │              │          │      10kΩ ──3│+input     Vs│6── 3.3V                          
   VSS──10│GND       │     VSS ──10│GND       │               │             │        250 uF                     
           └──────────┘              └──────────┘     VSS ─────4│GND      Vout│5───┳───┤├────┐                  
                                                                 └─────────────┘      0.05 uF └/─┐8Ω          
                                                                                     │            │spkr         
                                                                                     10 ohm   ┌\─┘            
                              Ultrasonic Distance Detection Sensors                                          
                             
     Ping #1          Ping #2         Ping #3         Ping #4          Ping #5          Ping #6         
  ┌───────────┐    ┌───────────┐   ┌───────────┐   ┌───────────┐    ┌───────────┐    ┌───────────┐      
  │  •     •  │    │  •     •  │   │  •     •  │   │  •     •  │    │  •     •  │    │  •     •  │      
  │GND +5V I/O│    │GND +5V I/O│   │GND +5V I/O│   │GND +5V I/O│    │GND +5V I/O│    │GND +5V I/O│      
  └─┬───┬───┬─┘    └─┬───┬───┬─┘   └─┬───┬───┬─┘   └─┬───┬───┬─┘    └─┬───┬───┬─┘    └─┬───┬───┬─┘      
    │  │    1kΩ    │  │    1kΩ   │  │    1kΩ   │  │    1kΩ    │  │    1kΩ    │  │    1kΩ    
      └┘   └ P0      └┘   └ P1     └┘   └ P3     └┘   └ P4      └┘   └ P5      └┘   └ P6    
    back right       back center     back left       front left       front center     front right      
                                                
    
                                    Motor Control Circuitry       
                                                                                       
                          HB-25 Motor                       HB-25 Motor                                       
                         Controller #1                     Controller #2                                      
                    1kΩ  ┌────┬┬────┐                      ┌────┬┬────┐                                     
                P7 ── │I/O    VDD│ ──+5V   HB-25 #1 ─ │I/O    VDD│ ──+5V                            
                         │  ┌────┐  │                      │  ┌────┐  │                                 
               +12V ─── │  │ ◀▶ │M1│ ──┐       +12V ─── │  │ ◀▶ │M1│ ──┐                    
                         │  └────┘  │ leftMotor            │  └────┘  │rightMotor                             
                GND ───4│GND     M2│ ──┘        GND ───4│GND     M2│ ──┘                                  
                         └──────────┘                      └──────────┘                                       
                          jumper in                         jumper out                                                                                        
                                                                                          
}

Post Edited (Ken Gracey (Parallax)) : 11/10/2009 11:31:56 PM GMT
«1

Comments

  • TinkersALotTinkersALot Posts: 535
    edited 2009-11-10 23:41
    Nice work. Better than what I've been able to achieve yet in the propeller tool. Now if only an auto-router could be made to read spin schematics. Now, THAT would be something. harharhar
  • velociostrichvelociostrich Posts: 40
    edited 2009-11-10 23:46
    Personally, I think it's best to use an actual EDA package for that kind of work, mainly because it looks nicer (as you have greater control) and I like keeping schematics separate from my code. Plus, you can't make PCB layouts from text -- unless, of course, if someone is willing to write a conversion program.

    Truthfully, I haven't been able to get the Propeller IDE to talk to my SchmartBoard under Wine, but that's mainly because I haven't really tried and probably more because I fried my SchmartBoard somehow.

    At any rate, I've been using gschem, a free and open-source program that's part of the gEDA package, to do all of my schematic layout work, though I'm not sure if it's available for Windows.
  • David BDavid B Posts: 592
    edited 2009-11-10 23:47
    They're very clear and readeable! Nice job.

    But instead of the ambiguous terms VCC, VSS, VDD, VEE, I'd suggest using the plain old expressions +5, +3.3, GND.

    To a user of parts, it's much more important to know what voltage to connect or what pin to ground instead of what kind of technology is used internally, such as drain, source, collector, emitter, as those expressions were originally meant to express.

    Using an ambiguous expression like those Vxx terms is just setting up an accident waiting to happen by not being as clear as possible for how to connect a part.
  • Bob AndersonBob Anderson Posts: 122
    edited 2009-11-10 23:49
    Ken:

    That is excellent motivation for me to do the same thing.· Its such nice builtin documentation for the myriad of small (meaning not a lot of interconnections) projects that I do with the Prop chip.

    It'll be particularly useful when returning to an old project months or years later !
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-11-10 23:53
    Nice work Ken.

    What you have drawn is really more like a block diagram. It is easier to understand than a true schematic.

    Suggestions.
    You have mixed Vss and GND signals and the ground symbol - you should be consistent.
    ExpressSCH allows the use of the power and ground symbols, and you can create 12V, 5V, 3V3 power symbols so that you maintain consistency between your blocks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Links to other interesting threads:

    · Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
    · Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
    · Prop Tools under Development or Completed (Index)
    · Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
    · Search the Propeller forums·(uses advanced Google search)
    My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-11 00:28
    The special characters are great for including small schematics in an object to augment the documentation. But it's a pretty awkward way to produce larger ones. That's a really nice looking schematic, Ken, but dang, man! what a lot of work! I would advocate getting a schematic CAD program if you plan to do it often. For $39.95 it's hard to beat DesignWorks Lite for ease of use, a short learning curve, and overall productivity. It's the one I use, in lieu of the fancy one included with my $900 PCB CAD program.

    I agree with the other posters that you should not mix Vss, GND, and the ground symbol if they mean the same thing. By doing so, someone may assume that they're different grounds, e.g. a digital ground, an isolated digital ground, and a separate analog ground. It's okay, though to mix these when labeling the pins interior to the package outlines, since different manufacturers label their pins differently. But outside the package, in the schematic itself, you need to be consistent.

    -Phil
  • WBA ConsultingWBA Consulting Posts: 2,934
    edited 2009-11-11 00:43
    Looks good, but as somewhat already stated, not as a schematic, but as a pinout diagram. For helping people see how the program is connected while looking at the program, it's excellent. I use the symbols occasionally so I remember how to connect things later on down the road. Also, as a schematic, you should probably add the propeller chip, power circuit, etc.

    Here's a speaker I created for a project a while back

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andrew Williams
    WBA Consulting
    WBA-TH1M Sensirion SHT11 Module
    Special Olympics Polar Bear Plunge, Mar 20, 2010
    218 x 107 - 7K
  • WhitWhit Posts: 4,191
    edited 2009-11-11 02:02
    @ Ken,
    Looks great. Thanks for posting this! It inspires me to give it a try. I've played with it just a little, but don't really have the hang of how to use it yet.

    @Andrew,
    I like the speaker symbol you made too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Whit+


    "We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney

    Post Edited (Whit) : 11/11/2009 2:15:17 AM GMT
  • SRLMSRLM Posts: 5,045
    edited 2009-11-11 06:20
    For the HB-25s I think you should indicate which way the motor is hooked up, unless your code can determine that automatically.

    For the pings, I don't think you need to reproduce it 6 times. Just indicate that p is [noparse][[/noparse]0:5] for pings [noparse][[/noparse]1:6], or something similar. I think A table would be more reliable to somebody reproducing the circuit.

    On the first row of chips, put a space between the C type character and the number for easier reading.

    On the speech synthesis chip, it isn't clear if the resistor on p15 is a pot, a resistor between p and the chip/ground, between the chip and p/ground, or between ground and p/chip.
  • Bob AndersonBob Anderson Posts: 122
    edited 2009-11-11 07:04
    One small caution: I added a block diagram to a sensor test program that I was working on and debugging with ViewPort.· I found that some of the special symbols are not reproduced correctly in the ViewPort display.· The bigger problem is that those symbols somehow misalign·subsequent statements with respect to their line numbers.· It becomes hard to set breakpoints.· The cure was trivial though -- I put the diagram at the end of the program smilewinkgrin.gif .
  • Ken GraceyKen Gracey Posts: 7,392
    edited 2009-11-11 08:18
    Okay, thanks so far for the input. I'm at Chip's house tonight with Chris getting some Prop programming tips, but when I return home I'll revise the schematic with your helpful input.

    But what's really most important to all of you is that we leave this place early in the morning so the master can get back to Prop 2 design.

    Ken Gracey
    Parallax Inc.
  • DroneDrone Posts: 433
    edited 2009-11-11 14:00
    Hi Ken,

    Echoing others, I suggest you invest time in a true EDA suite. I use KiCad for larger projects. KiCad's schematic capture can make really good looking schematics for publication, but it takes work few are willing to spend (and rightfully so for small projects). Plus KiCad has 3D board visualization with the Wings3D add-in. KiCad is cross-platform open-source under GPL. For smaller projects you can use a simple dimensional drawing application. It is a sad fact but true that for production documentation professional EDA users almost always port or re-do the schematic capture in a drawing optimized application. An old version of Visio will make nice schematics (yes I know, ugh... but I've got a lot of custom libraries). You can even make nice small board layouts for toner-transfer prototyping in Visio by saving the output in the likes of .jpg format and mirror the output in high resolution then re-importing the saved images in panelized format in Viso for printing. This mirrors text. My old version of Visio has no native mirrored text capability, but I'm pretty sure I can find a mirrored-text TTF out there somewhere; haven't looked yet. There are plenty of alternatives. Go to www.osalt.com and find open-source alternatives to the likes of Visio.

    Remember when you make diagrams in the Propeller Tool, the file is no longer strict ASCII compatible (someone clarify the changes here perhaps). This makes distribution a bit difficult in my experience on some machines. An ASCII schematic capture (only) tool is available here free www.tech-chat.de/aacircuit.html. Some love it, some hate it. I'm in the middle; love it sometimes.

    Regards, DR
  • JavalinJavalin Posts: 892
    edited 2009-11-11 15:26
    or for free - use ExpressPCB's schematic software.....

    James
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-11-11 15:37
    Ken Gracey (Parallax) said...
    Okay, thanks so far for the input. I'm at Chip's house tonight with Chris getting
    some Prop programming tips, but when I return home I'll revise the schematic with your helpful input.

    Ken Gracey
    Parallax Inc.

    I'm a little envious that you have the master to ask questions. [noparse]:)[/noparse]
    The only problem I would have is I would have to keep asking him to translate his answers. [noparse]:)[/noparse]

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • VIRANDVIRAND Posts: 656
    edited 2009-11-12 13:16
    Ideas and thoughts:
    The LM386... I'm not really sure it is a true op-amp, and audio power amps often also use the op-amp-like pins and
    symbols. With that being said, I've noticed that although LM386 usually is shown with the "inverting input" grounded,
    it seems to work just as well and be easier to route boards if you ground the non-inverting input which is right next
    to ground anyway. Notice also that LM386 uses a capacitor (and sometimes a resistor) on it's "gain" pins, while op
    amps are usually gain set by feedback on the inverting input. I compare that to a bias resistor between C and B on
    a transistor which is a similar feedback. BTW I wonder how the inputs can be grounded without creating a class B
    (half wave) amplifier, like an op amp probably would do. Signal ground is usually midpoint between power rails
    in an op amp.

    On the OP topic, schematics, when I first got a Propeller, a friend of mine had a very ambitious cybernetic project
    idea involving a vehicle, and we imagined a self-diagnostic mode like on Star Trek NG where it would show logic pulses
    and circuits and flashing red tiles where faults might be. Was just a daydream though.
  • MacGeek117MacGeek117 Posts: 747
    edited 2009-11-12 17:13
    @velociostrich: What platform does gschem run on?
    RoboGeek

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    BS2: $49


    SX48 Protoboard: $10

    Propeller Protoboard: Priceless

    www.apple.com

    www.parallax.com

    www.goldmine-elec.com

    www.expresspcb.com

    www.jameco.com
  • velociostrichvelociostrich Posts: 40
    edited 2009-11-13 23:10
    RoboGeek said...
    @velociostrich: What platform does gschem run on?
    RoboGeek

    I know it runs under Linux -- I installed it on Ubuntu 9.04/9.10 straight from the repository.

    The official website is here: www.gpleda.org/index.html

    A quick check to Wikipedia tells me that it's for "Unix-like" operating systems only.

    EDIT: Apparently some of the software in the gEDA suite *can* run under Windows: en.wikipedia.org/wiki/GEDA#Microsoft_Windows
  • $WMc%$WMc% Posts: 1,884
    edited 2009-11-14 01:49
    Ken G.

    While Your block diagram looks nice, It lacks the schematic. Add the Propeller and the power supply pins, and then point to pin connections.
    You already have nice software for the schematic layout, So why use something else? I also think it would be more impressive if the parallax software did all of the schematics
    on a marketing point!

    Please remember us old school basic programmers when developing the propeller2 !!!!!!!!!!!!!!!!!!

    ________$WMc%______________

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············___$WMc%___···························· BoogerWoods, FL. USA
  • HarleyHarley Posts: 997
    edited 2009-11-16 02:07
    PhiPi said...
    The special characters are great for including small schematics in an object to augment the documentation. But it's a pretty awkward way to produce larger ones. That's a really nice looking schematic, Ken, but dang, man! what a lot of work! I would advocate getting a schematic CAD program if you plan to do it often. For $39.95 it's hard to beat DesignWorks Lite for ease of use, a short learning curve, and overall productivity. It's the one I use, in lieu of the fancy one included with my $900 PCB CAD program.

    I agree with the other posters that you should not mix Vss, GND, and the ground symbol if they mean the same thing. By doing so, someone may assume that they're different grounds, e.g. a digital ground, an isolated digital ground, and a separate analog ground. It's okay, though to mix these when labeling the pins interior to the package outlines, since different manufacturers label their pins differently. But outside the package, in the schematic itself, you need to be consistent.

    -Phil

    @PhiPi ... Thanks for the mention of DesignWorks Lite. I'd used the full version of it on a non-Intel Mac/iMac for over two decades.

    At Wescon in 1984 there was a booth demo-ing a pcb layout package by Douglas Electronics on a 9" b/w Macintosh. They were selling it for $12 on a 3-1/2" diskette. I didn't even have a computer yet; but soon bought a Mac and began working with it. This was pcb layout only, no schematic capture, Gerber generator or any other application. Soon I was aware the Douglas had a full pcb CAD (around $3600). That worked well to create near 100 boards, including revisions. Later I was aware they had it for Windows also.

    Now I have an Intel iMac, so cannot run that old CAD. And my non-Intel iMac G5 has lost the power supply/analog board again -- and I've yet to find anyone to repair it. Obsolescence!

    I've downloaded DesignWorks Lite; sure looks like the old DW. Now to search for another pcb layout package to run on the newer iMac.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • rymanryman Posts: 12
    edited 2013-01-28 19:34
    Are there any keyboard commands to creating the in spin schematics? I tried using the ATL-0xxx but that does not seem to work.
  • Heater.Heater. Posts: 21,230
    edited 2013-01-28 20:02
    Never, ever, put weird diagrams in weird fonts in your source code.

    For example, opening the spin file in the opening post in WordPad just shows gibberish.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-01-28 20:35
    heater wrote:
    Never, ever, put weird diagrams in weird font's in your source code. For example, opening the spin file in the opening post in WordPad just shows gibberish.
    Sorry, man, but that's just bad advice. First of all, why would anyone ever want to open a Spin file in WordPad? Secondly, and most importantly, the special characters in Spin are designed to make it easy to document the hardware part of the system within the source code. It works and works quite effectively.

    ryman,

    To enter the special characters, click Help/View character chart... From there you can click on the special characters in the chart to enter them in your code.

    -Phil
  • Heater.Heater. Posts: 21,230
    edited 2013-01-28 21:01
    Ray,

    Is it?
    First of all, why would anyone ever want to open a Spin file in WordPad

    WordPad is not the point, it's only an example. But anyway why not? It's just as good an editor as the Prop Tool.
    Just now I am on Windows and I want a quick look at that file. Click, boom, gibberish.

    Go and look at the code box in the opening post. It's gibberish.

    Now go and open the link to the Spin Example Schematic.spin‎ in the opening post in a browser window. It's gibberish.

    Now try opening that spin file in a dozen other editors on Windows, or Mac, or Linux. It's gibberish.

    Basically using text and a funky font to draw diagrams with is a horrible non-standard, non-portable hack.

    It was kind of OK in the days when one would use 8 bit ASCII chars and mono-spaced fonts in CP/M or DOS but really it's junk.

    If you really want diagrams in your source how about putting SVG in the comments and using a proper tool to draw and render them?

    Now, if we move on to useful software tools like source code repositories and diff and patch etc that diagrammatic gibberish is just noise to deal with.
  • jmgjmg Posts: 15,173
    edited 2013-01-28 21:10
    Heater. wrote: »
    Ray,

    Is it?



    WordPad is not the point, it's only an example. But anyway why not? It's just as good an editor as the Prop Tool.
    Just now I am on Windows and I want a quick look at that file. Click, boom, gibberish.

    Go and look at the code box in the opening post. It's gibberish.

    Now go and open the link to the Spin Example Schematic.spin‎ in the opening post in a browser window. It's gibberish.

    Now try opening that spin file in a dozen other editors on Windows, or Mac, or Linux. It's gibberish.

    Basically using text and a funky font to draw diagrams with is a horrible non-standard, non-portable hack.

    It was kind of OK in the days when one would use 8 bit ASCII chars and mono-spaced fonts in CP/M or DOS but really it's junk.

    If you really want diagrams in your source how about putting SVG in the comments and using a proper tool to draw and render them?

    I tend to agree about avoiding custom fonts, but there is a way to include this level of Schematic drawing into Source code, without needing special fonts.

    Take a look at
    http://www.tech-chat.de/download.html

    AAcircuit works rather like a SCH editor with symbols, but they render in a std font and certainly well enough to do block diagram connections,
    and simple circuit outlines.
  • SRLMSRLM Posts: 5,045
    edited 2013-01-28 21:11
    Sorry, man, but that's just bad advice. First of all, why would anyone ever want to open a Spin file in WordPad? Secondly, and most importantly, the special characters in Spin are designed to make it easy to document the hardware part of the system within the source code. It works and works quite effectively.

    I run into this problem quite frequently since I edit on Linux. Any time that somebody used special characters to make a diagram it is useless for me, and unreadable.

    I feel that it is better to document the circuit with a natural language description, rather than character schematics. If the circuit is too complex, then a referenced image file or pdf would be good.
  • Heater.Heater. Posts: 21,230
    edited 2013-01-29 01:34
    Must also be a nightmare for those using screen readers.
  • RaymanRayman Posts: 14,665
    edited 2013-01-29 02:48
    I kinda like seeing the circuits in the Prop Tool...

    I think you could include them in a Word file just fine if you embedded the font with it:
    http://www.howtogeek.com/106681/how-to-embed-fonts-in-a-microsoft-word-document/
  • Heater.Heater. Posts: 21,230
    edited 2013-01-29 05:33
    Ray,

    I take it you mean an Open Document Format file :)

    I just feel that source code files should be for source code and schematics should be in some common exchangeable schematics format that is useful by itself and be easily edited. We have free tools to do that now a days. No reason we can't have them all bundled up in a Spin project. Which of course you are maintaining a version control system like git, on github say, so there is no issue with the circuit and the code getting out of synch.
  • RaymanRayman Posts: 14,665
    edited 2013-01-29 05:43
    I guess it's really a question of style. I don't put circuits in my code usually, but I actually appreciate it sometimes seeing the circuits in the object of other people, especially from OBEX. It's nice sometimes to have all the information in one file.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-01-29 09:16
    heater wrote:
    Go and look at the code box in the opening post. It's gibberish.
    'Looks fine in my browser (Firefox on Linux).

    Anyway, there's nothing "funny" or "special" about the schematic characters. They're part of Unicode, along with Cyrillic and Mandarin. (Would you tell a billion Chinese perople to use Wordpad or that their writing looks like "gibberish?") The world has gotten a lot bigger since 7-bit ASCII. All the city folks are using Unicode these days. Give it a try. You, too, might like it!

    -Phil
Sign In or Register to comment.