Page 16 of 23
Re: PIC18F25K22 UART ERROR
Posted: Sat Sep 30, 2023 1:34 pm
by chipfryer27
Hi
I'd be interested to hear how far you can communicate with a pair of 8266's. They are so cheap to add to a PIC (or whatever) to provide comms.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 01, 2023 1:26 pm
by SILVESTROS
Hi,
with careful placement of ESP-8266 on pcb, and full RF Power, the range was 45m for two pairs, in open air.
sufficient for the specific application..not enough for larger area (over 60m in one dimension) .
For range beyond 50m , a new design will be needed with a module with more RF power , maybe ESP32.
I'll see that later.
For now I'll take a look in another project , to find if it is possible to connect an HD micro camera with an interface to a PIC , and store video to a SD disk.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 01, 2023 2:16 pm
by chipfryer27
Hi
I didn't expect you would get 45m, that's good going especially if only using the PCB antenna. Quite impressed with that.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 08, 2023 5:23 pm
by SILVESTROS
Hi,
It was easy to have a range of 45m ...With careful design of transmitter PCB , 50m range it's possible with PCB antenna .
Now , I've made some tests with another accelerometer sensor a module with MPU6050 , but I have no data ...Is something wrong at the code for that module?...connections are correct , AD0 is connected to GND with 4.7K resistor...
MPU6050 Initialise is set at Main, instead of MMA8452.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 08, 2023 6:01 pm
by chipfryer27
Hi
I think 50m is outstanding for such a modest little module and you have done well to achieve. It's given me some further ideas for a project.
Most likely there is some issue with the 6050 code. Do you have a link to the module you are using? I might have one somewhere so will try and have a look.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 08, 2023 9:56 pm
by SILVESTROS
Re: PIC18F25K22 UART ERROR
Posted: Sun Oct 08, 2023 10:08 pm
by chipfryer27
Hi
I've just looked at your pictures above of your chart and it looks like you have forgotten to sample the sensor before you read values.
If you include the component macro SampleDevice before you use the "GetAccelReadingReal"" macro's you should get returns.

- Sample.JPG (12.25 KiB) Viewed 11485 times
Regards
Re: PIC18F25K22 UART ERROR
Posted: Mon Oct 09, 2023 8:30 pm
by SILVESTROS
Hi,
I was added MPU-6050 SampleDevice , but I have no data. In simulation , preset values of X,Y,Z reset to 0 in Debug Run.
Is there something wrong with MPU-6050 component or with device address ? In Properties I set AddressBit to 0.
Regards
Re: PIC18F25K22 UART ERROR
Posted: Tue Oct 10, 2023 12:16 am
by chipfryer27
Hi
With AD0 connected to Ground the module should then be set for address 0x68 (or if connected to +v 0x69).
I've just tried simulating an example file I downloaded a while back (possibly when using v8) and it didn't simulate. I then created a new chart in v10 with just the component reading Gyro, Accel XYZ and temperature and it appears there is an issue or two when simulating.
Irrespective of what the temperature is set at, it always returns 36.
The GetAccelReadingReal doesn't appear to work at all, and whilst the GetAccelReading does provide a return it is nothing like the scale values.
If I get a chance I'll try in hardware too, but at present it looks like a component issue (well at least if simulating).
Regards
Re: PIC18F25K22 UART ERROR
Posted: Tue Oct 10, 2023 11:32 pm
by chipfryer27
Hi
I do have a MPU6050. Don't think I'll get a chance to play until later in the week though.
I'll check again simulation and if still an issue I'll document in the "bugs" section.
Regards