LEM LTSR 15-NP and more
Moderator: Benj
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Nps.
Component is finished, but I just need to get the key, so it can be added to a component pack..
Might not be until Tuesday, as its bank holiday Monday in the UK.
Component is finished, but I just need to get the key, so it can be added to a component pack..
Might not be until Tuesday, as its bank holiday Monday in the UK.
Martin
-
- Posts: 1333
- Joined: Tue Oct 06, 2009 9:39 am
- Has thanked: 1135 times
- Been thanked: 299 times
- Contact:
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi viktor_au and Martin,
I will test the file from Viktor tomorrow Dutch time. @Martin, wow nice work, let me know when it is ready for V.8
Frank
I will test the file from Viktor tomorrow Dutch time. @Martin, wow nice work, let me know when it is ready for V.8
Frank
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi viktor_au,
I have tested your file Test_An0.fcfx.
When I power the board the LED on C4 goes immediately on. I have not connected the LAB Power supply to An0. (RA0)
The power on the chip is 5.01V.
Even when I connect the LAB Power supply to An0 and play with the voltage from 3.0 to 5.1V the LED stays on.
The LED blink test file is still working. The resistor to the GND pin of the LED is 3.3K.
Frank
I have tested your file Test_An0.fcfx.
When I power the board the LED on C4 goes immediately on. I have not connected the LAB Power supply to An0. (RA0)
The power on the chip is 5.01V.
Even when I connect the LAB Power supply to An0 and play with the voltage from 3.0 to 5.1V the LED stays on.
The LED blink test file is still working. The resistor to the GND pin of the LED is 3.3K.
Frank
-
- Posts: 342
- Joined: Fri Jan 26, 2018 12:30 pm
- Location: South Australia
- Has thanked: 44 times
- Been thanked: 60 times
- Contact:
Re: LEM LTSR 15-NP and more
I am not sure Frank.
I would check the ground connection between your power supply and the board with pic.
I would check PIC MC analog input settings. Is it input by default? Is it not?
Check this post:
ADC ground ref setting -> viewtopic.php?t=22383
----------
I have changed the input from an0 to an2.
Test it with the attached file.
------------
Use potentiometer instead of power supply.
---------
I cannot help you more as I don't use PIC.
Please check your MC settings. Read datasheet. Check in FC8: Build->Project options->Configure.
-------------
All the best.
I would check the ground connection between your power supply and the board with pic.
I would check PIC MC analog input settings. Is it input by default? Is it not?
Check this post:
ADC ground ref setting -> viewtopic.php?t=22383
----------
I have changed the input from an0 to an2.
Test it with the attached file.
------------
Use potentiometer instead of power supply.
---------
I cannot help you more as I don't use PIC.
Please check your MC settings. Read datasheet. Check in FC8: Build->Project options->Configure.
-------------
All the best.
Last edited by viktor_au on Thu Sep 02, 2021 10:38 pm, edited 1 time in total.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
That depends on the current you want the LED to stay on at.
3V = 12A though the LTS/LTSR 15
2.8V = 7.5A
Martin
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Frank,
I have attached a component for you to try.
One way of adding the component is:
1. Create a new folder for component files.
2. Place the component in the new component folder.
3. Open Flowcode & select View Global Options.
4. Select Locations and the ... icon in the Look for components in.
5. Browse to the new components folder and choose the .fcpx file.
6. Close and reopen Flowcode (or use the reload option) & the new component should be present.
You can use the search option to find the component.
The component relies on the supply voltage to the microcontroller being as near to 5.00V as possible.
You must always set the VDD within the component properties to voltage going to the VDD of the microcontroller.
If the voltage set within properties is out, then the current reading will be out.
This is because the LTSR generates a precision voltage, e.g 2.50 when there is no current flowing.
If VDD to the microcontroller is 4.87V then the ADC will read 2.567V
Therefore instead of no current flowing, the current reading will be 1.44amps.
The voltage you need to enter for VDD will correct this.
Note: I have kept the component free, so you don't need to have purchased any component packs to be able to use it.
Edit:
I have removed the component as it is now on the update system.
I have attached a component for you to try.
One way of adding the component is:
1. Create a new folder for component files.
2. Place the component in the new component folder.
3. Open Flowcode & select View Global Options.
4. Select Locations and the ... icon in the Look for components in.
5. Browse to the new components folder and choose the .fcpx file.
6. Close and reopen Flowcode (or use the reload option) & the new component should be present.
You can use the search option to find the component.
The component relies on the supply voltage to the microcontroller being as near to 5.00V as possible.
You must always set the VDD within the component properties to voltage going to the VDD of the microcontroller.
If the voltage set within properties is out, then the current reading will be out.
This is because the LTSR generates a precision voltage, e.g 2.50 when there is no current flowing.
If VDD to the microcontroller is 4.87V then the ADC will read 2.567V
Therefore instead of no current flowing, the current reading will be 1.44amps.
The voltage you need to enter for VDD will correct this.
Note: I have kept the component free, so you don't need to have purchased any component packs to be able to use it.
Edit:
I have removed the component as it is now on the update system.
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi viktor_au,
Thanks for your latest file but I have the same result. The LED goes immediately on when I power the PIC16F1788. I really don’t know why.
I have read the topic link in your latest post but this is going too far for me.
(Anecdote)
In my earlier years I was a Novell specialist. I had all Novell certifications of Novell Netware with NDS, ZenWorks, IDM and Groupwise. I was working on a high school but even companies and municipalities where calling me if I could help them with a Novell problem. I dive in every problem but also a few times I needed the help of Novell Support in Ireland. Now in these days Microsoft is the networking system what almost all people use.
I hope that you understand that (I was thinking) that this LTSR issue was easy to program.
I really appreciate your input on this LTSR issue. Thanks again.
Frank
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
Wow, nice work . I have tried to make a flowchart according to your screen picture what you have posted earlier. But It does not work.
Can you post an .fcfx file to show how this component works in a flowchart including a LED ?
Btw, I have the Sensors pack but it nice to see that you could this component for free for other FlowCode users.
Frank
Wow, nice work . I have tried to make a flowchart according to your screen picture what you have posted earlier. But It does not work.
Can you post an .fcfx file to show how this component works in a flowchart including a LED ?
Btw, I have the Sensors pack but it nice to see that you could this component for free for other FlowCode users.
Frank
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi, Frank.
Thanks.
If you post the flowchart you tried with then I will check it over for you.
If you inject a DC signal just remember that the sensitivity of the lts/ltsr 15np is 41.6mV/A
So you will either need a PSU with a course + fine adjustment or a 10 turn pot.
The voltage injected to the ADC for 0 to 7.5A = 2.50V to 2.81V so the full voltage range for 0 to 7.5A is only 312mV.
What is the precise voltage across your microcontroller supply pins?
Thanks.
If you post the flowchart you tried with then I will check it over for you.
If you inject a DC signal just remember that the sensitivity of the lts/ltsr 15np is 41.6mV/A
So you will either need a PSU with a course + fine adjustment or a 10 turn pot.
The voltage injected to the ADC for 0 to 7.5A = 2.50V to 2.81V so the full voltage range for 0 to 7.5A is only 312mV.
What is the precise voltage across your microcontroller supply pins?
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
Attached you will find the .fcfx file.
I can’t find under the LCD16x2 the “PrintFloat” function. Do I have to create this ?
PrintFloat(ResultFloat,2)
Attached you will find the .fcfx file.
I can’t find under the LCD16x2 the “PrintFloat” function. Do I have to create this ?
PrintFloat(ResultFloat,2)
- Attachments
-
- LTSR-15_Test-01.fcfx
- (10.23 KiB) Downloaded 106 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Frank, try the attached flowchart.
It enables you to directly display float values on LCD's without the need of adding and converting to string.
No, that is what I created for V9 LCD's
It enables you to directly display float values on LCD's without the need of adding and converting to string.
- Attachments
-
- LTSR-15_Test-02.fcfx
- (11.68 KiB) Downloaded 99 times
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
Thanks. I have tested your .fcfx file. It looks good in hardware! The LED goes randomly on at a voltage between 3.5 and 5.1V.
But I see that my old LAB Power Supply is given some suddenly voltage “spikes” I have connect a SDM3055 Digital Multimeter to the An0 wire.
When I turn the voltage up I see some suddenly fast spikes of voltage. Not visible on the LAB Power supply.
So this LAB Power Supply is broken. I have ordered a new one and it will arrive tomorrow.
Frank
Thanks. I have tested your .fcfx file. It looks good in hardware! The LED goes randomly on at a voltage between 3.5 and 5.1V.
But I see that my old LAB Power Supply is given some suddenly voltage “spikes” I have connect a SDM3055 Digital Multimeter to the An0 wire.
When I turn the voltage up I see some suddenly fast spikes of voltage. Not visible on the LAB Power supply.
So this LAB Power Supply is broken. I have ordered a new one and it will arrive tomorrow.
Frank
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
I have received my new LAB Power Supply with two channels and I have tried your fcfx file.
The MCU voltage is 5.01V in this test.
Every test I have done after I toggle the power on the MCU. So a clean start.
It seems to me that something is very slow.
I have received my new LAB Power Supply with two channels and I have tried your fcfx file.
The MCU voltage is 5.01V in this test.
- If I play with the voltage on An0 from 2.5V to 5.1V nothing happens with the LED.
- If I set the voltage from 3.5V to 4.9V and wait, the LED goes On after 34 seconds.
- If I set the voltage from 3.5V to 5.1V the LED goes On after 15 seconds.
- If I set the voltage from 3.5V to 4.5V the LED goes On after some 2 minutes.
Every test I have done after I toggle the power on the MCU. So a clean start.
It seems to me that something is very slow.
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Frank,
Sounds like you need to check the configuration settings match your hardware?
Have you tried the one second flash test?
Sounds like you need to check the configuration settings match your hardware?
Have you tried the one second flash test?
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
You are right, I have not done this in this chip on the breadboard. I will do that tomorrow.
You are right, I have not done this in this chip on the breadboard. I will do that tomorrow.
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
I have set the correct OSCCON value to run at 16MHz. I have tested this with a scoop and the LED flashes every second.
Then I have tested your file with the correct OSCCON values. It reacts now much faster but it is unstable.
The LED goes randomly on between a voltage from 3.2 to 5.0V. And sometimes the LED is even not going on. I have also changed to An1 to see if this makes a different.
Maybe it has something to do with the properties of the LTSR component, but that I don’t know.
I have set the correct OSCCON value to run at 16MHz. I have tested this with a scoop and the LED flashes every second.
Then I have tested your file with the correct OSCCON values. It reacts now much faster but it is unstable.
The LED goes randomly on between a voltage from 3.2 to 5.0V. And sometimes the LED is even not going on. I have also changed to An1 to see if this makes a different.
Maybe it has something to do with the properties of the LTSR component, but that I don’t know.
- Attachments
-
- LTSR-15_Test-03.fcfx
- (11.83 KiB) Downloaded 79 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi, Frank.
The component is only as good as the ADC.
Try adding an ADC ReadAsVoltage component and send the value to line one 1 of the LCD.
There could be an issue with ADC or the source you are measuring.
The LTSR has also been tested by V9 forum member.
Results are here.
The component is only as good as the ADC.
Try adding an ADC ReadAsVoltage component and send the value to line one 1 of the LCD.
There could be an issue with ADC or the source you are measuring.
The LTSR has also been tested by V9 forum member.
Results are here.
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Attached there is a video where you can see how this LTSR-15_Test-03.fcfx works in my hardware.
The LED is in the very upper right corner of this video.
https://youtu.be/qJzmZnVjQ-8
If I get this to work then there is a another problem. The original PCB is from 2005 ? and there is a TL082CP between the output from the LTSR-15 and the PIC. Original there was a PIC16F876A ?? on board. The text on this PIC is almost gone
I have redrawn this damaged PCB as it was. So, also with all the components. It works great but the last thing is the LTSR-15 for safe use.
Attached there is a part of the schematic as it is. MC_TL082 is a connection to the PIC.
The LED is in the very upper right corner of this video.
https://youtu.be/qJzmZnVjQ-8
If I get this to work then there is a another problem. The original PCB is from 2005 ? and there is a TL082CP between the output from the LTSR-15 and the PIC. Original there was a PIC16F876A ?? on board. The text on this PIC is almost gone
I have redrawn this damaged PCB as it was. So, also with all the components. It works great but the last thing is the LTSR-15 for safe use.
Attached there is a part of the schematic as it is. MC_TL082 is a connection to the PIC.
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
I have taken your code from the LTRS 15 into my code. Now the total code is running very slow on hardware. I have disabled the decision “ResultFloat > 7.49” and it makes no difference.
So, the slow running comes from the Component Macro “ResultFloat… “ and the Calculation icon “CurrentString…”
Is there something I can chance to let it run is faster ?
Btw, I have removed the TL082CP and put there a solder wire between the two pins.
Frank
I have taken your code from the LTRS 15 into my code. Now the total code is running very slow on hardware. I have disabled the decision “ResultFloat > 7.49” and it makes no difference.
So, the slow running comes from the Component Macro “ResultFloat… “ and the Calculation icon “CurrentString…”
Is there something I can chance to let it run is faster ?
Btw, I have removed the TL082CP and put there a solder wire between the two pins.
Frank
- Attachments
-
- RE-0190 V1.0 - 05 - Limit Switches - LTSR15.fcfx
- (43.03 KiB) Downloaded 75 times
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Frank, there was a mismatch between clock settings and OSCCON value.
What about trying at 32MHz?
You might be best doing a flash test first as if clock speed is set to 32MHz, but hardware is running much slower, then it hardware will be unbearably slow.
What about trying at 32MHz?
You might be best doing a flash test first as if clock speed is set to 32MHz, but hardware is running much slower, then it hardware will be unbearably slow.
- Attachments
-
- RE-0190 V1.0 - 06 - Limit Switches - LTSR15.fcfx
- (43.78 KiB) Downloaded 81 times
Martin
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
Hi Martin,
Many thanks for this 32MHz and 4x PLL idea. Indeed the buttons are reacting much more faster.
There is only one last problem what I have in this code. That is about the manual switch.
The Manual Operation Switch must be a Manual Operation Switch. This switch is a momentary toggle switch with three positions. It goes automatic to the middle position when you not touch it.
1 Left (Down)
2 Middle (Nothing - GND)
3 Right (Up)
I have played in the section for this switches (Decision icon – If Manual_Operation_ …) I see why this is not working , because of what is above this decision icon. But I don’t know how to change this to let it to work as it should be.
I have now disabled this Decision Icon in this 07 version.
Frank
Many thanks for this 32MHz and 4x PLL idea. Indeed the buttons are reacting much more faster.
There is only one last problem what I have in this code. That is about the manual switch.
The Manual Operation Switch must be a Manual Operation Switch. This switch is a momentary toggle switch with three positions. It goes automatic to the middle position when you not touch it.
1 Left (Down)
2 Middle (Nothing - GND)
3 Right (Up)
I have played in the section for this switches (Decision icon – If Manual_Operation_ …) I see why this is not working , because of what is above this decision icon. But I don’t know how to change this to let it to work as it should be.
I have now disabled this Decision Icon in this 07 version.
Frank
- Attachments
-
- RE-0190 V1.0 - 07 - Limit Switches - LTSR15.fcfx
- (44.45 KiB) Downloaded 65 times
-
- Posts: 192
- Joined: Mon Mar 04, 2013 8:07 pm
- Has thanked: 29 times
- Been thanked: 15 times
- Contact:
Re: LEM LTSR 15-NP and more
I have tried to add two toggle switches (standard one in FlowCode) but this also didn’t work for me. Is it possible that the FlowCode team can make a momentary toggle switch component as this:
SPDT (On)-Off-(On)
https://nl.farnell.com/2128040
SPDT (On)-Off-(On)
https://nl.farnell.com/2128040