1 (edited by AlxBilt 11-01-2024 01:20:40)

Topic: PWM OUTPUT Testing

Recently purchased Canny 7.2 Duo controller. I am new to PCB world. Trying to get my head wrapped around the workings of Canny 7.2 diagrams and functions.

Test #1 - PWM output mode

Today I tried to implement a digital pulse generator on CH8 of the controller for testing purposes.
I have uploaded the the diagram from the link above.
When the controller is connected to a laptop via USB,  the green led is illuminated solid. When I select connect on CannyLab2.15 the green LED on controller starts to blink green.

I then connect a handheld oscilloscope to channel 8 of the controller. No wave signal is viewable. I verify the oscilloscope function correctly by inputting a confirmed digital pulse wave.

I disconnect the controller from the unit to use only 12v battery for controller's power source. The controller did not turn on with direct 12v and ground. The battery is confirmed charged.
I confirm the controller is receiving 12v at pin 4 - X1 terminal.

Reconnect the controller to laptop and select connect. The green LED begin to blink again.

Will PWM output work with only USB power?
What am I doing wrong that is preventing me from seeing the controller's generated pulse?
What am I doing wrong that when 12v and ground is connected, the controller does not activate?

Post's attachments

Attachment icon 1_10_2024 Digital Pulse output testing.cfd 515 b, 65 downloads since 2024-01-10 

2 (edited by AlxBilt 11-01-2024 01:23:05)

Re: PWM OUTPUT Testing

Test #2 - Determining pulse width (duration)

I successfully  loaded the USB UART mode with pulse counter diagram. It maybe incorrect because I am not sure how this PLC is suppose to work. After I constructed the diagram manually,  I later realize that Figure # in Doc also have a sample diagram ready for download.

I am using a pulse generator as my bench tester to understand how the unit(Canny 7.2) works before I try it on a live vehicle.

What console do you recommend to view the pulse using UART Driver? 

To view pulse using UART Driver--both diagrams  (pulse counter and UART Driver) are saved in the same file? I have saved both diagrams in one file.

How to configure the pulse counter diagram for ADC sine wave after I test digital wave reading?
What is simulator suppose to do? I click the red beetle then start but nothing happens except for the clock starts to run.

Post's attachments

Attachment icon 1_10_2024 USB VCP MODE with Input Pulse Counter Ch8.cfd 3.72 kb, 65 downloads since 2024-01-11 

3

Re: PWM OUTPUT Testing

Test #1
Will PWM output work with only USB power?
What am I doing wrong that is preventing me from seeing the controller's generated pulse?
What am I doing wrong that when 12v and ground is connected, the controller does not activate?

Transition to the full functional running mode happens automatically when the controller is connected to an external power supply and not connected via USB.  Please see: https://cannylogic.com/docs/c72duo/#sec … tion_modes

The good idea is to add some sort of heartbeat to you diagram. To make the controller LED flash in some special way when the controller is executing a circuit. Like on attached picture.

Test #2
What console do you recommend to view the pulse using UART Driver?

You can try this one: https://www.der-hammer.info/pages/terminal.html

To view pulse using UART Driver--both diagrams  (pulse counter and UART Driver) are saved in the same file? I have saved both diagrams in one file.

You can implement several algorithms on one diagram if they do not conflict due to resources.

How to configure the pulse counter diagram for ADC sine wave after I test digital wave reading?

The controller, acting like comparator, can count pulses as the input signal level transitions through ~3.5VDC. Make sure the input signal parameters meet this requirement.

What is simulator suppose to do? I click the red beetle then start but nothing happens except for the clock starts to run.

The current CannyLab simulator version doesn’t support emulation of controller hardware resources, so the results of reads/writes from/to controller memory in the simulator may differ from the results obtained when the diagram is executed by a real controller.
Please see: https://cannylogic.com/docs/cannylab/si … escription

Post's attachments

hb.png, 5.57 kb, 364 x 114
hb.png 5.57 kb, 67 downloads since 2024-01-11 

4 (edited by AlxBilt 12-01-2024 21:08:12)

Re: PWM OUTPUT Testing

Test #1

Completed satisfactorily. 

I added the PWM Generator for heartbeat in-sync with the output pulse for Red LED.
The issue was I did not have Power on Detect (maybe it did not matter since the Red LED became primary) and I had a misconfiguration of the channel.

What is interesting about the output pulse I can see on my oscilloscope is that the pulse wave appear to be Sine. I did not expect to see a Sine wave. 

This is really a good little PCB. I look forward to implement into my automotive project after I understand how it works.

Test #2

A vehicle speed sensor pulse frequency will always change depending on speed correct?

Why did you recommend - Test #2 Determining pulse width (duration)?

Post's attachments

Attachment icon 1_11_2024 Digital Pulse output testing.cfd 1.21 kb, 65 downloads since 2024-01-11 

5

Re: PWM OUTPUT Testing

Test #2
A vehicle speed sensor pulse frequency will always change depending on speed correct?

I believe this is true.

Why did you recommend - Test #2 Determining pulse width (duration)?

If I understood the question correctly, then I recommended this because the pulse width / period can be measured with high accuracy by the controller and converted to frequency using simple math. Please see T2 here: https://cannylogic.com/docs/c72duo/io/# … ulse_width

6

Re: PWM OUTPUT Testing

What is interesting about the output pulse I can see on my oscilloscope is that the pulse wave appear to be Sine. I did not expect to see a Sine wave.

This looks like a measurement error. The no-load channel's PWM waveform should be close to a square wave.