fixing a mess i made, probably...
- tommylight
- Topic Author
- Away
- Moderator
Less
More
- Posts: 19219
- Thank you received: 6440
17 May 2024 16:50 #300846
by tommylight
fixing a mess i made, probably... was created by tommylight
A few days back i posted a reply regarding analog and PWM where i think i stated that alanog outputs can be set to output +5V only, that is corrct, but then i went on to state that it will work for PWM inputs <this is not correct, so i need to fix this if i can find the topic, so if anyone bumps into it, please let me knwo so i can fix it and delete this topic.
Thank you.
From PWM to analog 5V is easy to do, just in case anyone ever needs it, not the other way around.
Thank you.
From PWM to analog 5V is easy to do, just in case anyone ever needs it, not the other way around.
Please Log in or Create an account to join the conversation.
18 May 2024 20:37 #300936
by andypugh
Replied by andypugh on topic fixing a mess i made, probably...
The only candidate seems to be forum.linuxcnc.org/49-basic-configuratio...i25-7i76-7i74#300725
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Topic Author
- Away
- Moderator
Less
More
- Posts: 19219
- Thank you received: 6440
18 May 2024 23:55 #300944
by tommylight
Replied by tommylight on topic fixing a mess i made, probably...
YES!
Twice i searched for it, and then every day trying to figure out where it might be after the two tries failed!
Thank you, edited and notified.
Leaving this till you get to read it, then deleting.
Again, thank you, i can sleep better now.
Twice i searched for it, and then every day trying to figure out where it might be after the two tries failed!
Thank you, edited and notified.
Leaving this till you get to read it, then deleting.
Again, thank you, i can sleep better now.
The following user(s) said Thank You: pmchetan
Please Log in or Create an account to join the conversation.
22 May 2024 15:56 #301154
by pmchetan
Replied by pmchetan on topic fixing a mess i made, probably...
How can I get a varying analog voltage from 5v pwm? I see a lot of RC low pass filter as digital to analog converter online. I have a drive which takes analog PWM input to control the speed of a bldc motor. Help me out with either a link to build a robust DAC for the purpose or readily available solution to buy would be good too.A few days back i posted a reply regarding analog and PWM where i think i stated that alanog outputs can be set to output +5V only, that is corrct, but then i went on to state that it will work for PWM inputs <this is not correct, so i need to fix this if i can find the topic, so if anyone bumps into it, please let me knwo so i can fix it and delete this topic.
Thank you.
From PWM to analog 5V is easy to do, just in case anyone ever needs it, not the other way around.
Please Log in or Create an account to join the conversation.
- besriworld
- Offline
- Elite Member
Less
More
- Posts: 250
- Thank you received: 70
22 May 2024 17:33 #301156
by besriworld
Replied by besriworld on topic fixing a mess i made, probably...
forum.linuxcnc.org/24-hal-components/329...i76e?start=40#295082
You can look here. My psb also works but requires 5v source without ripples.
You can look here. My psb also works but requires 5v source without ripples.
Please Log in or Create an account to join the conversation.
- tommylight
- Topic Author
- Away
- Moderator
Less
More
- Posts: 19219
- Thank you received: 6440
22 May 2024 19:51 #301162
by tommylight
Replied by tommylight on topic fixing a mess i made, probably...
Analog and PWM are not the same thing, so your drive has either one or the other.
PWM to analog works with just a resistor and capacitor, wont be the best but it works.
A 100 Ohm reistor in series from PWM out to analog in, and a 0.1 to 1 microFarad capacitor parallel with analog input should be a nice starting point, bigger capacity = slower raise/fall time, and vice-versa.
PWM to analog works with just a resistor and capacitor, wont be the best but it works.
A 100 Ohm reistor in series from PWM out to analog in, and a 0.1 to 1 microFarad capacitor parallel with analog input should be a nice starting point, bigger capacity = slower raise/fall time, and vice-versa.
Please Log in or Create an account to join the conversation.
23 May 2024 07:34 - 23 May 2024 07:35 #301186
by pmchetan
Replied by pmchetan on topic fixing a mess i made, probably...
Ok, the drive has PWM input mode. The seller has sent me a arduino code asking me to make the following circuit and says it can control the motor speed and direction with PWM signals (0-5V square wave)
(In the arduino code, I saw analog write function used to write to the pin and got confused with the whole analog pwm thing)
I don't have arduino, I will get it in a couple of days but I have 7i76 setup and it is sending 60hz to 1khz pwm signals as I change the velocity during test/tune axis in PNCconf. The voltage is 4.74V but the output from the transistor is about 0.3V which I think is comming from the drive power supply (turning the power to drive off leaves it at 0V.
If someone understands this circuit do explain what is the transistor even doing? Because if I'm understanding it, the PWM from 7i76 to base of the transistor shorts the collector (drive ground) to drive SV which should do nothing right?
(In the arduino code, I saw analog write function used to write to the pin and got confused with the whole analog pwm thing)
I don't have arduino, I will get it in a couple of days but I have 7i76 setup and it is sending 60hz to 1khz pwm signals as I change the velocity during test/tune axis in PNCconf. The voltage is 4.74V but the output from the transistor is about 0.3V which I think is comming from the drive power supply (turning the power to drive off leaves it at 0V.
If someone understands this circuit do explain what is the transistor even doing? Because if I'm understanding it, the PWM from 7i76 to base of the transistor shorts the collector (drive ground) to drive SV which should do nothing right?
Last edit: 23 May 2024 07:35 by pmchetan.
Please Log in or Create an account to join the conversation.
23 May 2024 13:02 #301200
by Aciera
Replied by Aciera on topic fixing a mess i made, probably...
I'd say what you need is a lowpass filter.
Maybe this helps:
www.allaboutcircuits.com/technical-artic...o-an-analog-voltage/
Maybe this helps:
www.allaboutcircuits.com/technical-artic...o-an-analog-voltage/
Please Log in or Create an account to join the conversation.
- tommylight
- Topic Author
- Away
- Moderator
Less
More
- Posts: 19219
- Thank you received: 6440
23 May 2024 15:25 #301215
by tommylight
Replied by tommylight on topic fixing a mess i made, probably...
PWM, the transistor is there to just invert the signal from active high to active low.
If that info is correct, you can controll it using parallel port as it can easily do PWM.
BTW, PWM does not chage frequency, just the pulse width/duration.
The frequency can be set once and it does not change.
Any idea what that frequency should be?
Not very important as most will work with quite a wide range of frequencies, so you can easily test.
And i am pretty sure there is no need for filters for this.
If that info is correct, you can controll it using parallel port as it can easily do PWM.
BTW, PWM does not chage frequency, just the pulse width/duration.
The frequency can be set once and it does not change.
Any idea what that frequency should be?
Not very important as most will work with quite a wide range of frequencies, so you can easily test.
And i am pretty sure there is no need for filters for this.
Please Log in or Create an account to join the conversation.
24 May 2024 07:05 #301290
by pmchetan
Replied by pmchetan on topic fixing a mess i made, probably...
I thought the transistor is there for switching which connects the collector and emitter at the pwm frequency at the base of the transistor. But I think I'm wrong because with PWM mode selected on the drive, it should drive the motor if I supply 5v volts to sv pin (its the same as 100% duty cycle) but it doesn't.
How is the transistor inverting the signal from active high to active low in this circuit?
How is the transistor inverting the signal from active high to active low in this circuit?
Please Log in or Create an account to join the conversation.
Time to create page: 0.090 seconds