EBM015 Magnetometer

A forum where Flowcode v7 user created components can be shared, discussed and reviewed.

Moderator: Benj

Post Reply
MartinSpeed
Posts: 28
Joined: Tue Nov 09, 2021 11:53 am
Been thanked: 1 time
Contact:

EBM015 Magnetometer

Post by MartinSpeed »

Hi,

I am using FlowCode 7 (have a college license for FlowCode 9 but reluctant to swap as we have an exam in January) and the content of the exam requires to use an EBM015 Magnetometer to detect a magnetic field, unfortunately Matrix have no stock and I was wondering if someone can acquire me one please. We use EBlocks (first edition, and again too late to upgrade) I have been informed that this can be done using a Hall component and wondered also if a tutorial was available for both, using an Uno R3 board and FlowCode 7.

Thanks in advance.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 618
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: EBM015 Magnetometer

Post by chipfryer27 »

Hi

I don't have an EBM015, if I did I'd send it to you as the key component is no longer manufactured and I don't think there is an E-Block alternative (but I could be wrong).

You may struggle to find a LSM303... or whatever, so perhaps look for an alternative. If you just need to detect the presence of a magnetic field rather than measure strength, you could perhaps use one of the many modules available in the usual marketplaces such as the KY-003. This particular module is self contained in that you only need +ve / -ve / output, and is student price friendly <s>

The power is self explanatory and the output changes state in the presence / absence of a magnetic field. Plenty of Arduino code in forums but why waste your time when Flowcode makes it easier? Just create an Interrupt On Change / Poll pin and do whatever. So very, very much easier <s>

Hope this is of help.

Regards

medelec35
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: EBM015 Magnetometer

Post by medelec35 »

What about this breakout board for the LSM303D?
It is showing as in stock and it's supported by Flowcode.
You will need to read the datasheet and make sure it does what's required.
Martin

MartinSpeed
Posts: 28
Joined: Tue Nov 09, 2021 11:53 am
Been thanked: 1 time
Contact:

Re: EBM015 Magnetometer

Post by MartinSpeed »

Many thanks for your reply. I am a newbe at this and the datasheet is not within my forte. I can follow worked examples and learn from them.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 618
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: EBM015 Magnetometer

Post by chipfryer27 »

Hi

In the attached I've made an extremely basic chart with comments.

In it I used an E-Block Hall Effect sensor. Hall Effect components basically change state in the presence of a magnetic field. Yes / No so to speak. Won't measure strength of field, just if a threshold is crossed to toggle On / Off. You could use any sensor to detect whatever including a simple On/Off switch.

The chart only loops around itself checking the status of the sensor. Depending on status it either illuminates an LED or switches it off.

In the simulation, to activate the sensor just "mouse click" over the sensor.

Although I used a PIC 16F877A you could use any MCU, it is that simple.

Hope this helps.

Regards
Attachments
Simple Detection.fcfx
(9.69 KiB) Downloaded 131 times

MartinSpeed
Posts: 28
Joined: Tue Nov 09, 2021 11:53 am
Been thanked: 1 time
Contact:

Re: EBM015 Magnetometer

Post by MartinSpeed »

I purchased some Halls sensors and then used the Arduino software to create a program then mimicked this in flowcode.

I thank all people that have helped me on here which has encouraged me to further research.

MartinSpeed
Posts: 28
Joined: Tue Nov 09, 2021 11:53 am
Been thanked: 1 time
Contact:

Re: EBM015 Magnetometer

Post by MartinSpeed »

Hi,

I am using eblocks and I wish to use the Halls sensors I purchased on the Uno R3 and Combo set up. I can get the sensor to work just on the R3 on its own but not when the R3 is connected with the training Combo.

medelec35
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: EBM015 Magnetometer

Post by medelec35 »

Hi.
Can you post your flowchart and give us more details of the issue, please?
E.g not compiling, display staying on 0 etc.
Martin

chipfryer27
Valued Contributor
Valued Contributor
Posts: 618
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: EBM015 Magnetometer

Post by chipfryer27 »

Hi

How is your hardware set up? Which ports connect to the Combo board and what port(s) for your Hall effects? Is your code the same for when the Combo is or isn't connected?

As Martin suggested, a copy of your flowchart would be very helpful.

Regards

Post Reply