EB091 and sensors mother board

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

Moderator: Benj

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

EB091 and sensors mother board

Postby Monie Jacobsen » Mon Apr 10, 2017 11:33 am

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: 13948
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4224 times
Been thanked: 3980 times
Contact:

Re: EB091 and sensors mother board

Postby Benj » Mon Apr 10, 2017 1:24 pm

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: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Mon Apr 10, 2017 2:45 pm

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

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

EB091 connect to I2C Display

Postby Monie Jacobsen » Wed Apr 12, 2017 10:25 am

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: 13948
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4224 times
Been thanked: 3980 times
Contact:

Re: EB091 and sensors mother board

Postby Benj » Wed Apr 12, 2017 11:57 am

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 7225 times

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Wed Apr 12, 2017 12:12 pm

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

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Wed Apr 12, 2017 12:51 pm

Hi Benj,
I have tried to test EB091 with attached code below!
ADC Voltage as String.fcfx
(9.13 KiB) Downloaded 99 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: 13948
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4224 times
Been thanked: 3980 times
Contact:

Re: EB091 and sensors mother board

Postby Benj » Wed Apr 12, 2017 1:06 pm

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 7217 times

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Wed Apr 12, 2017 2:03 pm

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

Have a nice day
Best Regard
Monie

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Wed Apr 12, 2017 3:16 pm

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: 1749
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 414 times
Been thanked: 578 times
Contact:

Re: EB091 and sensors mother board

Postby LeighM » Wed Apr 12, 2017 3:48 pm

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

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Wed Apr 12, 2017 5:05 pm

[b]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: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Tue Apr 18, 2017 11:33 am

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 7145 times

What should I do?
And what is "Debugging Pack"?
Best Regard
Monie

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Fri Apr 21, 2017 9:35 am

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

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Mon Apr 24, 2017 6:44 am

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: 1749
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 414 times
Been thanked: 578 times
Contact:

Re: EB091 and sensors mother board

Postby LeighM » Mon Apr 24, 2017 8:38 am

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: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Mon Apr 24, 2017 8:48 am

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 6924 times
Best Regard
Monie

User avatar
LeighM
Matrix Staff
Posts: 1749
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 414 times
Been thanked: 578 times
Contact:

Re: EB091 and sensors mother board

Postby LeighM » Mon Apr 24, 2017 9:24 am

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

Monie Jacobsen
Posts: 415
Joined: Mon Jul 30, 2012 3:39 pm
Has thanked: 9 times
Been thanked: 42 times
Contact:

Re: EB091 and sensors mother board

Postby Monie Jacobsen » Thu Apr 27, 2017 8:47 am

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 76 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
Has thanked: 7 times
Been thanked: 6 times
Contact:

Re: EB091 and sensors mother board

Postby Jacob1 » Wed Jan 17, 2018 3:46 pm

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: 13948
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4224 times
Been thanked: 3980 times
Contact:

Re: EB091 and sensors mother board

Postby Benj » Thu Jan 18, 2018 6:36 pm

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".