EB091 and sensors mother board

An area to discuss 16-bit PIC specific problems and examples

Moderator: Benj

Post Reply
Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

EB091 and sensors mother board

Post by Monie Jacobsen »

Hi
On device EB091 - dsPIC Ghost Board
Just bought eheden EB091

Can EB091 connect to Sensor Type EB090 associated with EBM002 (pot) ?
Allowed volts on anolog in (0-5 V) ?
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15149
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: EB091 and sensors mother board

Post by Benj »

Hi Monie,

Congratulations on the purchase, the EB091 is a nice bit of kit.

Yes it is compatible with the EB090 sensors board and EBM002 potentiometer.

Though please note that the EB090 and EBM Sensor module will automatically scale the ADC voltage to max of +V which for the EB091 bard is 3V3 and not 5V.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi Benj,
Very many thanks for the reply.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

EB091 connect to I2C Display

Post by Monie Jacobsen »

Hello everyone
EB091 connect to I2C Display
Can I2C device connect to EB091?
If yes, which port and pin number to be used?
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15149
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: EB091 and sensors mother board

Post by Benj »

Hi Monie,

The I2C Ports and Pins should be shown to you when using an I2C enabled component and setting the I2C channel property.

Channel 1 - SDA G3 / SCL G2
Channel 2 - SDA F4 / SCL F5
Software - User selectable
I2Cprops.jpg
I2Cprops.jpg (21.76 KiB) Viewed 11323 times

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi Benj,
Very many thanks for the reply.
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi Benj,
I have tried to test EB091 with attached code below!
ADC Voltage as String.fcfx
(9.13 KiB) Downloaded 184 times
But at 5v into An 10 is only 1.098 V Out to display
Have tried to pull down (10k) but did not help ..
Have a suggestion for attachment code?
And much like to tell me what I do wrong;-)
Best Regard
Monie

User avatar
Benj
Matrix Staff
Posts: 15149
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: EB091 and sensors mother board

Post by Benj »

Hi Monie,
at 5v into An 10 is only 1.098 V Out to display
The EB091 is a 3V3 device and should not be subjected to voltages greater than 3V3.

Some pins are 5V tolerant but even on these pins the ADC cannot read voltages greater than 3V3.

To read the 5V you would need to use a potential divider to bring the voltage to the MCU pin down to below the 3V3 threshold and then do the ADC reading.

For example a potential divider using two 10K resistors would convert 5V into 2.5V.

To correctly get 5V from the ReadAsVoltage or ReadAsString macros you would need to set the ADC property "VRef voltage" to 660 to provide the x2 effect of what is actually being read.
potdiv.jpg
potdiv.jpg (11.93 KiB) Viewed 11315 times

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi Benj,
Thank you very much.
Very well explained;-)

Have a nice day
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi Benj,
Can not find Port G2 and G3 for I2C on EB091 board!
Want to use: Channel 1 - SDA G3 / SCL G2
To be used D-type PORTE, PORTD 0-7 should be used?
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2136
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: EB091 and sensors mother board

Post by LeighM »

Channel 2 - SDA F4 / SCL F5 is available on PORTF D socket, if that helps

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi

Using LCD EB005 on PORTD works!

But I2C lcd does not work!
User Channel 2 - SDA F4 / F5 SCL is available on PORTF D

Are you able to create codes for testing I2C?
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi
Have tried with GHOST function but get the message below, what should I do to get GHOST function to work.
And not with MIAC (Arduino) Type: MI5466
See the picture below
Debugging Pack.JPG
Debugging Pack.JPG (21.48 KiB) Viewed 11243 times
What should I do?
And what is "Debugging Pack"?
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi
How can I get the GHOST feature to work?
See the above picture?
User EB091...
Best Regard
Monie

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Is anyone here explaining how to enable GHOST on Board EB091

How can display I2C device connect directly to EB091.
The device has ouput dc 5 volts
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2136
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: EB091 and sensors mother board

Post by LeighM »

This can be done with a couple of FETs, here's a typical app note...
http://www.nxp.com/documents/applicatio ... N10441.pdf

As for the Ghost, looks like you need to purchase the Flowcode 7 "Debugging Pack",
Help->View Licenses will show you what current licenses you have.

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Hi LeighM
Thanks for the answer:-)
Which should I buy to get GHOST to work
View licenses.JPG
View licenses.JPG (45.02 KiB) Viewed 11022 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 2136
Joined: Tue Jan 17, 2012 10:07 am
Contact:

Re: EB091 and sensors mother board

Post by LeighM »

Hi,
It's the Test and Debugging pack, "TestDbg"

Monie Jacobsen
Posts: 484
Joined: Mon Jul 30, 2012 3:39 pm
Contact:

Re: EB091 and sensors mother board

Post by Monie Jacobsen »

Is anyone here..
Regarding Board EB091
Uses Bi-Directional Logic Level Converter from 5V to 3V for I2C display
See web link: https://learn.sparkfun.com/tutorials/bi ... okup-guide
User Port F.4 and F, 5 lcd I2C
I2C for 4 line Display is not stable numerous drive up and down.
Uses a voltage splitter 10k bullup and 10k pulldowns on An 10
User attached test code:
ADC Voltage as String with I2C.fcfx
(9.14 KiB) Downloaded 124 times
Do you have a suggestion for stable reading of volt in to display?
Best Regard
Monie

Jacob1
Posts: 35
Joined: Wed Dec 27, 2017 4:18 pm
Contact:

Re: EB091 and sensors mother board

Post by Jacob1 »

Hello,

I am not a very experienced programmer. I have been using the potentiometer and LDC recently. I have managed to display the output as a byte variable from analogue, which I understand. However, I do not understand why for analogue to displaying the voltage between 0-5v on the LDC requires a string variable to be used? I know this is probably a stupid question but i just wondered why? as I tried it first of all with using the Get voltage macro, which was not as accurate as using the variable as a string

Thanks
Jac

User avatar
Benj
Matrix Staff
Posts: 15149
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: EB091 and sensors mother board

Post by Benj »

Hi Jac,

The GetVoltage returns a floating point value that ideally should be stored into a float type variable, if your assigning the value to a byte or integer type variable then this will remove the "real" decimal point part of the number.

The LCD PrintNumber functions also only works with integer values so if you pass in a float variable then you will just see the integer portion of the number on the display.

Returning the value as a string allows the LCD to easily display the value with the least number of steps.

Another way would be to use the ReadVoltage and then use the calculation icon to convert the float value into an ASCII string value. This is basically what the GetString function does for you.

The ReadVoltage function is generally only useful when you need to do something with the floating point variable for example comparing it against a threshold e.g. a temperature controlled thermostat. Another reason for converting to a string your self would be if you wanted to control the number of decimal points in the string e.g. "13.6" instead of "13.600000".

Post Reply