element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
STEM Projects
  • Learn
  • Learning Center
  • STEM Academy
  • STEM Projects
  • More
  • Cancel
STEM Projects
Forum Creating square wave generators before buying a function generation/counter
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join STEM Projects to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 10 replies
  • Subscribers 23 subscribers
  • Views 2340 views
  • Users 0 members are here
  • raspberry pi educators design challenge
Related

Creating square wave generators before buying a function generation/counter

scsiraidguru
scsiraidguru over 3 years ago

I have been watching Karen's videos and find them interesting.   

My Siglent SDS1104X-E 100 Mhz 4 channel Oscilloscope came.  

1.) Using the built-in square wave to calibrate the 4 probes

This took a few days to get the probes as accurate as possible.   It took about 30-45 minutes per probe.


2.) Configuring a simple 1kHz square wave PWM with my Arduino

I connected up probe 1 of the scope to the output of the Arduino PWM pin to see how accurate the device was in a square wave PWM of 0, 64, 128, 192 and 255.   I wanted to see how much noise was on the Arduino using the 9V 1A power supply.   I need to dig in deeper to get the settings to get a PWM closer to 1kHz. 

https://mc.scsiraidguru.com/?page_id=2338
I posted the readouts here.   Frequency was 975 Hz.   I will recreate the test and add the measurements from the scope.

3.) Configuring a simple 1kHz square wave PWM with my Raspberry Pi 4B

The Pi 4B set to

mc.scsiraidguru.com/

pwm = GPIO.PWM(ledPin, 1000) # Set Frequency to 1 KHz    This was 886-888 Hz
pwm = GPIO.PWM(ledPin, 1149) # Set Frequency to 1 KHz    This was 997 Hz to 1.003 KHz.

4.) Purchase a 3 channel bench power supply

The next item I am looking at is the Siglent SPD3303X-E 3 channel power supply.  The frequency generator will have to wait.   I The test videos I saw on this power supply was very clean. 

5.)  Build square wave generators that are more accurate

I have been watching Karen's videos on 555 Timer and creating a 1 kHz, 10kHz, and 100 kHz square wave generator from scratch.   I have a nice selection of resistors, capacitors, and components to build with.    I thought this would be a great project to teach STEM with.    Any suggestions on getting a more accurate setup? 

5.) Create a triangle wave generator



  • Sign in to reply
  • Cancel

Top Replies

  • scsiraidguru
    scsiraidguru over 3 years ago in reply to shabaz +1
    I upgraded the scope firmware and also found the LED lights in the basement were throwing off noise that was causing the probe calibration to jump. I put the scope into alternative mode so the end was…
  • dougw
    dougw over 3 years ago in reply to scsiraidguru +1
    You can lookup several ways to make a 555 circuit that will get very close to 50% duty cycle. One simple way is to use a CMOS 555 and connect the output to the timing cap with a resistor.
  • scsiraidguru
    scsiraidguru over 3 years ago in reply to dougw +1
    The kit I bought has NE555 chips to start out with. TLC555CPWR from Digikey are $0.95. Maybe I will get some next time.
Parents
  • scsiraidguru
    scsiraidguru over 3 years ago

    A side project is getting LT Spice to simulate the 555 timer and my circuit accurately.   During my B.EE, we put the circuit on page.  Solved it with math.   Then, we put it into Spice and compared the results.   Last thing was acutally build it measing each component with a multimeter and recalculating everything with real values.   How can I get LT Spice to better simulate a NE555?  

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • scsiraidguru
    scsiraidguru over 3 years ago in reply to scsiraidguru

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • scsiraidguru
    scsiraidguru over 3 years ago in reply to scsiraidguru

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
  • scsiraidguru
    scsiraidguru over 3 years ago in reply to scsiraidguru

    #include <Wire.h>
    
    void setup() {
      Serial.begin(9600);
      Wire.begin(0x4);                // join i2c bus with address #4
        pinMode(6, OUTPUT);
    }
    
    void loop() {
      analogWrite(6, 128);
     
    }


    set timer 0 divisor to    64 for PWM frequency of   976.56 Hz (The DEFAULT)

    The measurements of the scope matches. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube