PWM driving 4017ic chip

BobTPH

Joined Jun 5, 2013
8,813
Okay, you have one learning. The next one is to learn what PWM means. I suspect you are misusing that term as well.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
The usual reason is lack of attention to detail and trying to run a marathon before learning to crawl and walk.
Okay, you have one learning. The next one is to learn what PWM means. I suspect you are misusing that term as well.
Thank you!
The ZK-pp2k is described as a PWM.
I assume......yep I did.

Getting a DC square wave is what the ZK-pp2K is good at. very easy to adjust the "signal" from 0 hz to a lot in 1hz interval.
I am trying to refine the signal to be able to make it 0.1hz interval.
I was hopimng to do this with the 4017ic chip. but if ther eis a better way... I am open

the max signal I will be using should be 1khz

tx
 

Beau Schwabe

Joined Nov 7, 2019
155
I think you are still very confused with the terms involving PWM

You will likely find the same answers with your Upwork link ... https://www.upwork.com/jobs/~0174f9ce6108465e56


Let me see if I can explain.

With general PWM you have a Period which is a fixed interval. (There are more complex algorithms that use a variable interval but for this example lets leave that parameter fixed)

The Duty cycle that ranges from 0% to 100% is the ratio of ON time to OFF time within that Period.

Say for example if I were to flip ON a light switch on an interval of every minute. Suppose that after the light is ON, I flip it off after 20 seconds. The Period would be 1 minute, while the duty cycle would be 33% (20 seconds / 60 seconds = 33%). Now suppose that after the light is ON, I flip it off after 24 seconds. The Period would still be 1 minute, but the duty cycle would be at 40% (24 seconds / 60 seconds = 40%)

In the above scenario a 4017 would ONLY be able to capture the Period and NOT the duty cycle.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
I think you are still very confused with the terms involving PWM

You will likely find the same answers with your Upwork link ... https://www.upwork.com/jobs/~0174f9ce6108465e56


Let me see if I can explain.

With general PWM you have a Period which is a fixed interval. (There are more complex algorithms that use a variable interval but for this example lets leave that parameter fixed)

The Duty cycle that ranges from 0% to 100% is the ratio of ON time to OFF time within that Period.

Say for example if I were to flip ON a light switch on an interval of every minute. Suppose that after the light is ON, I flip it off after 20 seconds. The Period would be 1 minute, while the duty cycle would be 33% (20 seconds / 60 seconds = 33%). Now suppose that after the light is ON, I flip it off after 24 seconds. The Period would still be 1 minute, but the duty cycle would be at 40% (24 seconds / 60 seconds = 40%)

In the above scenario a 4017 would ONLY be able to capture the Period and NOT the duty cycle.
Thank you. Your explaination cleared up a few things for.me.
I noticed that when I used the oscilioscope. The duty cycle was 50% no matter what I put on the zk-pp2k.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
I finally looked up the device you are using.
ZK-PP2K

Why are you using a motor controller as signal generator?
High amps, requires no other devices, (makes it simple) adjustable frequency, (signal?) easy to mount and friedly to adjust, oh and it comes with a diode to protect from fly back voltage.
 

Papabravo

Joined Feb 24, 2006
21,159
High amps, requires no other devices, (makes it simple) adjustable frequency, (signal?) easy to mount and friedly to adjust, oh and it comes with a diode to protect from fly back voltage.
Why do you need "high amps" if you are driving a CD4000 series CMOS chip? Those CMOS outputs can barely light a standard efficiency LED.
 

BobTPH

Joined Jun 5, 2013
8,813
It’s time to tell us what you are trying to do. Then perhaps we could give you a solution that is evading you.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
We keep circling back to this fundamental precept. I wonder why.
I did explaied it, I am building a EMF pulse with a frequency to attak brain tumor mainly, I have succefully design it with a square bi polar dc wave using the an h-bridge and the zk-pp2k. Those frequency are easy to deal with as they are relatively high for the brain (300hz) then for the cool down period, as such high hz tend to make it hard to sleep, we need to match calmer brain wave during cooldown period, 0.5-2 hz. There is also the remouval of the plaque in the brain using 30 to 50 hz to "potentially" revese the early onset of alzheimer.

There is also more stuff, like dealing with depression, bipolar, PTSD, insomnia. They are all very closely related and share a common source.

the accuracy of the signal needs to be to 0.1hz has people have been found to be all a little different to what they feel comfortable to relax after treatement (at lower frequency)

I am sorry I keep using frequency, when we talk about the brain wave we use the word "frequency" mesured in hz.


The end game is to replace the only machine on the market able to to this [cost well over $23k per month.] and make it available to everybody.
I have (witht help) design a 12 layer 1/2" square PCB coils that will be used as the emf coil. I do have 25 of these coils and they are awesome, making a ton of gauss! :) pretty proud of them.

So in recap. I need to create a DC square wave that can be ajusted to the first decial point with a good level of accuracy so I can generate an EMF through my little 12layers pcb coils.

:)
 

Papabravo

Joined Feb 24, 2006
21,159
I did explaied it, I am building a EMF pulse with a frequency to attak brain tumor mainly, I have succefully design it with a square bi polar dc wave using the an h-bridge and the zk-pp2k. Those frequency are easy to deal with as they are relatively high for the brain (300hz) then for the cool down period, as such high hz tend to make it hard to sleep, we need to match calmer brain wave during cooldown period, 0.5-2 hz. There is also the remouval of the plaque in the brain using 30 to 50 hz to "potentially" revese the early onset of alzheimer.

There is also more stuff, like dealing with depression, bipolar, PTSD, insomnia. They are all very closely related and share a common source.

the accuracy of the signal needs to be to 0.1hz has people have been found to be all a little different to what they feel comfortable to relax after treatement (at lower frequency)

I am sorry I keep using frequency, when we talk about the brain wave we use the word "frequency" mesured in hz.


The end game is to replace the only machine on the market able to to this [cost well over $23k per month.] and make it available to everybody.
I have (witht help) design a 12 layer 1/2" square PCB coils that will be used as the emf coil. I do have 25 of these coils and they are awesome, making a ton of gauss! :) pretty proud of them.

So in recap. I need to create a DC square wave that can be ajusted to the first decial point with a good level of accuracy so I can generate an EMF through my little 12layers pcb coils.

:)
Frequency is always measured in Hertz, at least since 1960, when it replaced cps (cycles per second), regardless of the magnitude of the frequency or the application.

It would appear that what you are asking for is not a PWM (Pulse Width Modulation) device, but a VCO (Voltage Controlled Oscillator) followed by a divider chain to take a relatively "high" frequency reference signal like 300 Hz., and produce a lower frequency output with greater resolution. This circuit has another name, and it is a PLL (Phase Locked Loop). There are at least two ways to controls such a device:
  1. You can vary the 300Hz reference frequency and use a fixed divider ratio.
  2. You can fix the reference frequency and change the divider ratio
They are both challenging design problems and may or may not be easily achievable. Are you familiar with using an FPGA (Field Programmable Gate Arry) and a hardware description language like Verilog or VHDL?

I would ask you to do some reading and research to see if this concept can fit within your overall goals.

One more thing. Are you aware that square waves have a rich harmonic content and if this treatment is frequency sensitive those harmonics may need to be taken into account. It is possible to output sinewaves with the above approach but that involve another layer of complication of what looks like a huge undertaking.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
Frequency is always measured in Hertz, at least since 1960, when it replaced cps (cycles per second), regardless of the magnitude of the frequency or the application.

It would appear that what you are asking for is not a PWM (Pulse Width Modulation) device, but a VCO (Voltage Controlled Oscillator) followed by a divider chain to take a relatively "high" frequency reference signal like 300 Hz., and produce a lower frequency output with greater resolution. This circuit has another name, and it is a PLL (Phase Locked Loop). There are at least two ways to controls such a device:
  1. You can vary the 300Hz reference frequency and use a fixed divider ratio.
  2. You can fix the reference frequency and change the divider ratio
They are both challenging design problems and may or may not be easily achievable. Are you familiar with using an FPGA (Field Programmable Gate Arry) and a hardware description language like Verilog or VHDL?

I would ask you to do some reading and research to see if this concept can fit within your overall goals.

One more thing. Are you aware that square waves have a rich harmonic content and if this treatment is frequency sensitive those harmonics may need to be taken into account. It is possible to output sinewaves with the above approach but that involve another layer of complication of what looks like a huge undertaking.
Thank you very much!

We curently have a arduino uno program that has the potential to give a resolution of 0.1hz. Would that be similar to VCO?

One of the main issue with the UNO is the added complexity. Dealing with uploading the program, the wirering of the unit and how FRAGILE the system can be. The zk-pp2k proved to be bomb proof and very simple to wire. (cheap also)
Was not aware of the harmonic issue with the square wave, unfortunatly from a medical perspective we need the square wave to get the results, if it was a race, the other wave form where not even close. (we believe it has something to do with replicating the small current the bones generate when walking/running,) Quite facinating.
 

Thread Starter

Steevefrench

Joined Sep 7, 2020
15
Up date,

I was able to use the 4017ic in conjunction with the PWM. I was able to use two (2) in series cascading them and as such taking a signal of 100 hz down to 1hz.
I also use the final signal of the 4017ic to transform the uni-polar dc square wave to a bipolar one. (learn about mosfet driver in the process and Hbridge)

Final results,
It is now possible to to have a signal of for example 40.8hz (Gamma wave) in a bipolar dc square wave for very good accuracy apply to the specific portion of the brain using PCB coils.

If you are interested to know more read rTMS and dementia or rTMS and cognitive functions.

I am moving on to my next project,
Variable frequency pulse train generator....


I did not get the help I came here for in this forum, but I did get a great deal of learning!

For that I thank you.

Steeve
 
Top