Author Topic: Create Arbitrary waveform-values with spreadsheet.....  (Read 539 times)

0 Members and 1 Guest are viewing this topic.

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: de
    • Virtual feature script
Create Arbitrary waveform-values with spreadsheet.....
« on: October 05, 2024, 11:31:48 am »
I would like to create a up/down frequency sweep of a 50% PWM signal via spreadsheet for my utg2025A. I already have a python script that converts from csv to bsv. But i cant think of how to acomplish creating these values with a spreadsheet.

Is there a spreadsheet expert here?
« Last Edit: October 06, 2024, 06:45:33 am by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6973
  • Country: de
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #1 on: October 05, 2024, 12:07:17 pm »
I am not sure I understand what you need. A spreadsheet with a sequence of ascending, then descending numbers, one number per line?
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 15331
  • Country: fr
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #2 on: October 05, 2024, 09:09:47 pm »
One thing I don't get is that if the OP uses Python already, why not generate the waveforms directly in Python instead of doing that in a spreadsheet and converting that with a Python script. A bit boggled.
 
The following users thanked this post: Someone, ebastler

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: de
    • Virtual feature script
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #3 on: October 05, 2024, 10:09:21 pm »
One thing I don't get is that if the OP uses Python already, why not generate the waveforms directly in Python instead of doing that in a spreadsheet and converting that with a Python script. A bit boggled.
If you dont get it, ask him, why he wants to use spreadsheets. You could also suggest using Python to him.
« Last Edit: October 05, 2024, 10:12:17 pm by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4961
  • Country: au
    • send complaints here
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #4 on: October 05, 2024, 10:20:58 pm »
I would like to create a up/down sweep (pwm) via spreadsheet for my utg2025A. I already have a python script that converts from csv to bsv. But i cant think of how to acomplish creating these values with a spreadsheet.

Is there a spreadsheet expert here?
One thing I don't get is that if the OP uses Python already, why not generate the waveforms directly in Python instead of doing that in a spreadsheet and converting that with a Python script. A bit boggled.
If you dont get it, ask him, why he wants to use spreadsheets. You could also suggest using Python to him.
So given the opportunity to answer the question, you ask them to ask the question again?
 

Offline RoGeorge

  • Super Contributor
  • ***
  • Posts: 6726
  • Country: ro
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #5 on: October 06, 2024, 03:12:25 am »
Hey, eTobey, you seem friends with the OP.  I'm curious, too, please ask him why TF it has to be a spreadsheet?  :)

But here's how I would do it:
- First, you have to have the waveform sampled at the frequency of your PWM.
- Then paste (or import) the digitized samples in a spreadsheet column, let's say column A.
- Find the minimum and the maximum values of the column A, then in another cell, find the maximum between the abs(max) and abs(min).  That would be the scaling factor for 100%
- Then prepare a formula in a second column, say column B, with the scaled value + waveform offset (if there is any), such that the resulting number in the column B is the PWM duty factor.

The duty factor column would be the one to export to CSV then convert to the format desired by the signal generator.  It's a problem of scaling + applying a bias to the ADC samples.

Don't know how good are your spreadsheet skills.  Does these steps make any sense?  Is this what you want?

Another thing, the request is unusual.  My generator imports waveform samples, not PWM duty factor samples.  Is your generator different, or is the PWM request for some other unusual usecase?
 
The following users thanked this post: Someone

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: de
    • Virtual feature script
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #6 on: October 06, 2024, 06:43:13 am »
So given the opportunity to answer the question, you ask them to ask the question again?
What question? Apart from the question of ebastler (which i kindly would like to ignore, as it seems he hasnt done much with arb waveforms), i see only mine. I dont bother about the question that one could read between the lines of SiliconWizard's post. The way he wrote, appears a bit disrespectful to me. Like talking behind someones back.  :--

Another thing, the request is unusual.  My generator imports waveform samples, not PWM duty factor samples.  Is your generator different, or is the PWM request for some other unusual usecase?
I feel bad for you having taken the time to create an anwser, invane, because my informations were lacking some details: It should be a frequency sweep of a 50% duty PWM signal. My generator only goes oneway.

Why i like the spreadsheet:
- You can easily add values
- You can easly see you changes

BTW: I now have implemented such feature in my microcontroller which drives the other one. Problem is, it doesnt have a constant PWM signal.
« Last Edit: October 06, 2024, 07:05:46 am by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: de
    • Virtual feature script
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #7 on: October 06, 2024, 07:10:12 am »
I have now tried chatGPT. And i must say i am quite a bit impressed.  :-+
I does however dont work all the way.
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6973
  • Country: de
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #8 on: October 06, 2024, 07:23:16 am »
I have now tried chatGPT. And i must say i am quite a bit impressed.  :-+

Also, unlike the humans who are answering to your threads, you will not piss off ChatGPT quite as easily. Win-win!
 
The following users thanked this post: Sensorcat

Offline eTobeyTopic starter

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: de
    • Virtual feature script
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #9 on: October 06, 2024, 08:06:58 am »
Also, unlike the humans who are answering to your threads, you will not piss off ChatGPT quite as easily. Win-win!
Indeed! Humans (in general) are way too often easily pissed off. And patience they dont have either. Cant stay focused on topic, do miss/forget important details... the list goes on.
« Last Edit: October 06, 2024, 08:19:59 am by eTobey »
"Sometimes, after talking with a person, you want to pet a dog, wave at a monkey, and take off your hat to an elephant." (Maxim Gorki)
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27946
  • Country: nl
    • NCT Developments
Re: Create Arbitrary waveform-values with spreadsheet.....
« Reply #10 on: October 06, 2024, 06:32:19 pm »
I would like to create a up/down frequency sweep of a 50% PWM signal via spreadsheet for my utg2025A. I already have a python script that converts from csv to bsv. But i cant think of how to acomplish creating these values with a spreadsheet.

Is there a spreadsheet expert here?
Most spreadsheets allow creating sequences of numbers. Start with 3 numbers, select them and expand (drag) the column downwards. Still, this could be quite a bit of work if you need long sequences. Another option is to prepare a CSV file through scripting, import it to make edits and export as CSV again.
« Last Edit: October 06, 2024, 06:35:15 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf