UM3750 Emulation

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

UM3750 Emulation

Post by ianjoh »

Hi
Has anyone have experience of emulating the UM3750 encoder/decoder, I am more interested in encoding as I want to transmit into an existing scantronic receiver. A google search shows an Arduino sketch so it has been done but I have no idea about interpreting it! I have controlled a UM3750 directly from a pic but it takes up 12 ports and it would be great to use just one for the data stream.
The timing looks simple enough, I am just not sure on how to structure it. Attached is a screen grab of an existing transmitter with bits 2 & 8 on.
thanks
Ian
Attachments
um3750.jpg
um3750.jpg (80.55 KiB) Viewed 6216 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: UM3750 Emulation

Post by Benj »

Hello,

Here's a very much simplified version to transmit a UM3750 signal using Flowcode v8.
UM3750_Transmit.fcfx
(12.2 KiB) Downloaded 165 times
The output pin and delay period are set via properties.

Let us know how you get on.

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: UM3750 Emulation

Post by ianjoh »

Wow! Thank you Ben, that will make a fab starting point. My aim is to make the low byte an address and the remaining 4 bits will be for control, ie on/off.
kind regards
Ian

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: UM3750 Emulation

Post by ianjoh »

Struggling with this as I cannot see where in the properties to set the output pin to C1 and a delay of 700uS as just not seeing the option.
Using a variable to set the output code is as far as I have got, any pointers would be great help, thanks
Ian
Attachments
UM3750_Transmit2.fcfx
(12.85 KiB) Downloaded 150 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: UM3750 Emulation

Post by Benj »

Hello,

I think you're after the properties window with Panel selected at the top.
Props.jpg
Props.jpg (15.24 KiB) Viewed 6147 times

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: UM3750 Emulation

Post by ianjoh »

Thanks Ben, nowt like missing the obvious :oops:

I have been having a good play and can transmit a 2 channel receiver but have no control over individual channels. Turns out it is only sending the last 8 data bits anything before that gets sent as a 0. Also seems to be sending in reverse order as normally the 2 LSB would control the channels on a 2 channel receiver.


Learned loads about shifting and masking tho and when time permits I will have a crack at creating a flowcode from scratch based on this macro.
thanks
Ian
Attachments
UM3750_Transmit2.fcfx
(14.62 KiB) Downloaded 160 times
0b111111100001.pdf
(521.85 KiB) Downloaded 136 times

mnf
Valued Contributor
Valued Contributor
Posts: 1188
Joined: Wed May 31, 2017 11:57 am
Has thanked: 70 times
Been thanked: 439 times
Contact:

Re: UM3750 Emulation

Post by mnf »

Just peeking - and I wonder if there should be an OutputPin = 0 in the 'Test Data Bit' - No branch?

Looking at the ESP32 library - each bit seems to be made of 3 transitions - where here a 1 bit is made up of 3, but 0 bit only 2.

Also 'repeats' does not much for not very long?



Martin

ianjoh
Posts: 41
Joined: Tue Nov 13, 2018 11:53 am
Has thanked: 2 times
Contact:

Re: UM3750 Emulation

Post by ianjoh »

hi all
I had at go at bastardising the component macro to learn about it and build my version just a macro call and it is remarkably similar! I can now understand how it outputs the data in reverse order to what I want, so I reversed the data before sending it. It works although I have not fully tested the range of code numbers. As set up it just triggers the 2 relays on a scantronic receiver alternately for testing. I would be interested to hear if there are any other, more simple ways of doing it!
@Martin
Bit 0 is just a sync Bit.
The repeats have a wide range, I have found the minimum to be about 7 up to about 85 before a transmitter "low battery" alarm is triggered.
Thanks
Ian
Attachments
ScantronicTx.fcfx
(31.38 KiB) Downloaded 155 times

Post Reply