Mal funcionamiento del sensor DS18B20 y display de 7 segmentos

Use this section to discuss your embedded Flowcode projects.
Carmelo
Posts: 123
http://meble-kuchenne.info.pl
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Mal funcionamiento del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

I have the attached file to display the temperature value of a DS18B20 on 7-segment displays.
In simulation it can be seen that the reading works but in physical form nothing is seen on the display.
The multiplexing routine is working well in other projects I have, but I don't know why it doesn't work here.
What I observe is that the control lines of the displays B3, 4 and 5 remain at high impedance (not connected to anything) and the same thing happens with the lines of the segments of the displays that are connected to C0 to C6

what could be happening?

C.
Attachments
Test.fcfx
(81.31 KiB) Downloaded 31 times
Last edited by Carmelo on Wed Apr 09, 2025 10:43 pm, edited 2 times in total.

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

If I disable all the blocks of the DS18B20 temperature sensor and set a fixed temperature, the multiplexing and value display section works perfectly.
But when I enable the sensor blocks the display stops working.
The effect can be seen in the attached file


C
Attachments
Test.fcfx
(81.78 KiB) Downloaded 28 times

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

Trying to limit the error, I have been activating the sensor blocks one by one and I observed that the problem occurs when the following blocks are enabled:
SampleAdressedDevice
and
GetTemperature

It can be seen in the attached file
Attachments
Test.fcfx
(81.75 KiB) Downloaded 29 times

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

Limiting the error further, I have changed the block:
SampleDirectedDevice
by
SampleAllDevice

And the display shows the fixed temperature.

But when the GetTemperature block is enabled, the displays stop working and all the pins that control them and those of the segments remain open or high impedance.

C.

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Flowcode v10 Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

I attach 2 screenshots where you can see, in addition to how the pic and display connections are, in one of them, the error when enabling the "GetTemperature" block of the sensor.

As can be seen, the displays remain off and the lines that control the displays and segments are seen without any reference voltage.

In the other screenshot, with the block disabled, the displays continuously show the temperature value that I have fixed to test.

I have also tested that if more blocks such as decision or calculation are added, the effect becomes more visible since in addition to having to disable the "Gettemperature" block, other sensor configuration blocks must be disabled. The more blocks you add, the more blocks you have to disable.

Maybe it could be a question of timing within the sensor blocks?

C.
Attachments
Capture with error.png
Capture with error.png (47.58 KiB) Viewed 3200 times
Capture without error.png
Capture without error.png (48.17 KiB) Viewed 3200 times

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

Ya consegui que se activasen las lineas de los segmentos y el control de los displays.
Pero ahora en los display siempre aparece la indicacion 999 de forma intermitente y aunque cambie la temperatura el valor simepre es el mismo.
Adjunto como quedo el FC

¿Me pueden indicar cual es el error?

Gracias de antemano
Attachments
Test.fcfx
(78.92 KiB) Downloaded 30 times

chipfryer27
Valued Contributor
Posts: 1616
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 358 times
Been thanked: 565 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by chipfryer27 »

Hi

Is this a problem in hardware or in your simulation program? If in your simulation program have you eliminated that as the issue?

Regards

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

El problema se está dando en los dos lugares: en el simulador y en el hardware de forma física también.

C.

chipfryer27
Valued Contributor
Posts: 1616
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 358 times
Been thanked: 565 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by chipfryer27 »

Hi

Later in the week I may get a chance to try and replicate in hardware, as I should have a few 7-segment displays somewhere. No promises though.

Regards

Carmelo
Posts: 123
Joined: Thu Oct 14, 2021 10:04 am
Has thanked: 50 times
Been thanked: 4 times

Re: Mal ffuncionamineto del sensor DS18B20 y display de 7 segmentos

Post by Carmelo »

chipfryer27 wrote:
Wed Apr 09, 2025 7:08 pm
Hi

Later in the week I may get a chance to try and replicate in hardware, as I should have a few 7-segment displays somewhere. No promises though.

Regards
Muchas gracias por la respuesta y por su tiempo.

La verdad es que casi he copiado el ejemplo de la wiki y el resultado es el mismo: el parpadeo del valor 999.

C

Post Reply