Camera_Gimbal

89 views
Skip to first unread message

Hans van Veldhuizen

unread,
Nov 2, 2023, 8:09:38 AM11/2/23
to jallib
Hello all,
My question again. I'm trying to make a two-way camera Gimbal. I have modified working programs. The transmitter now has two ADC inputs and the receiver must control two servos. The signals arrive correctly at the receiver in fits and starts. I can't get the servos to work. Attached are the two files.
Please respond again,
regards
Hans
16F15325_ GIMBAL_ontvanger.jal
16F15325_ gimbal_zender.jal

Hans van Veldhuizen

unread,
Nov 2, 2023, 4:54:29 PM11/2/23
to jallib
Sorry,Ā I used a wrong expression, Gimbal is something different. I just want to pan and tilt a camera wirelessly

Op donderdag 2 november 2023 om 13:09:38 UTC+1 schreef Hans van Veldhuizen:

Rob CJ

unread,
Nov 3, 2023, 2:11:13 PM11/3/23
to jallib
Hi Hans,

I cannot see any errors. So the data is received correctly but the servo's do not work?

Have you tried to get the servo's working without the receive routines? So just hard-code some values to see if the servo's are working?

Kind regards,

Rob




Van: jal...@googlegroups.com <jal...@googlegroups.com> namens Hans van Veldhuizen <hanz...@zeelandnet.nl>
Verzonden: donderdag 2 november 2023 13:09
Aan: jallib <jal...@googlegroups.com>
Onderwerp: [jallib] Camera_Gimbal
Ā 
--
You received this message because you are subscribed to the Google Groups "jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallib+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/ff970ccd-ffb8-473f-991f-1441f768da3cn%40googlegroups.com.

Hans van Veldhuizen

unread,
Nov 3, 2023, 4:27:23 PM11/3/23
to jallib
Hi Rob,
If I add this before the original forever loop then just servo 2 moves. Changed servo's same result
forever loop

servo_move(60,1)
servo_move(60,2)
delay_1S(2)

servo_move(150,1)
servo_move(150,2)
delay_1S(2)

Ā end loop

Op vrijdag 3 november 2023 om 19:11:13 UTC+1 schreef Rob CJ:

Hans van Veldhuizen

unread,
Nov 3, 2023, 5:13:22 PM11/3/23
to jallib
Have changed with attached basic. Same result. Changed 325 for 324 same result

Op vrijdag 3 november 2023 om 21:27:23 UTC+1 schreef Hans van Veldhuizen:
16F15325_ GIMBAL_ontvanger+_yy.jal

Rob CJ

unread,
Nov 4, 2023, 2:56:20 AM11/4/23
to jal...@googlegroups.com
Hi Hans,

The only difference that I see is the looptime.

Ā Instead of 1 second it is 1 ms but it depends on how fast the data is received. If that is too fast will that disturb the servo movement?

Kind regards,

Rob




Verzonden: vrijdag 3 november 2023 22:13
Aan: jallib <jal...@googlegroups.com>
Onderwerp: Re: [jallib] Camera_Gimbal
Ā 

Hans van Veldhuizen

unread,
Nov 4, 2023, 5:50:22 AM11/4/23
to jallib
Hi Rob,
It has to do with the pin A2. If i change it to C2 the both are working

Op zaterdag 4 november 2023 om 07:56:20 UTC+1 schreef Rob CJ:
16F15325_ GIMBAL_ontvanger+_yy.jal
Message has been deleted

Hans van Veldhuizen

unread,
Nov 8, 2023, 7:12:07 AM11/8/23
to jallib
I have now adapted both circuits for WiFi. (So the transmitter has a WiFi master and the receiver a slave)
Ā  The data received is identical to the transmitter
. However, the servos only move half a turn. Apparently the Servo-lib can't handle the pic. Or I have to set something else. The programs are attached again.

Op zaterdag 4 november 2023 om 10:50:22 UTC+1 schreef Hans van Veldhuizen:
16F15325_ WIFI_ontvanger.jal
16F15325_ WIFIl_zender.jal

Matthew Schinkel

unread,
Nov 9, 2023, 9:12:13 AM11/9/23
to jallib
Hi Hans,

Servo's move depending on the PWM signal sent to them. It is possible your servo's are expecting a different signal depending on the manufacturer. Do you have other servo's to test?

Do your servo's work correctly an un-modified Jallib sample?

Do you have an oscilloscope you can test the signal with? The PWM signal should be between 0.5ms and 2.5ms.

Thanks,
Matt.

Hans van Veldhuizen

unread,
Nov 9, 2023, 11:15:43 AM11/9/23
to jallib
Hi Mathew,
I've used your lib dozens of times on all kinds of servos and they always worked perfectly!!!! These servos also work on the special tester that also works on your lib. I'm pretty sure there is a conflict with the PIC here. If I now go from 0 to max with the potentiometer, the servo only moves half a turn. I just don't know what part of the frequency range they get.
In any case, very nice that you responded.
regards
Hans

Op donderdag 9 november 2023 om 15:12:13 UTC+1 schreef Matthew Schinkel:

Matthew Schinkel

unread,
Nov 9, 2023, 6:27:13 PM11/9/23
to jallib
Check your clock frequency. If it is half what it is supposed to be your servo's would only get half pulses and half movement.

Not sure if it helps here but I suggest you try the slip library sometime for sending data packets. See samplesĀ 18f4620_slip_isr.jal orĀ 18f4620_slip_poll.jal.

Matt.

Hans van Veldhuizen

unread,
Nov 10, 2023, 2:17:30 AM11/10/23
to jallib
Hello Matthew,
More than 10 years ago I made Marieke with your lib, 8 servos and a very expensive wireless command set
. (see https://youtu.be/U3uuH1cK8Dk)
Ā  Ā I used a 16F1827 as transmitter and a 16F648a as receiver. I am now trying to use this old set for this, but as always my old programs no longer work in the changed JAL world. Time and again I experience that a sample only works in that sample environment and as soon as I want to use another PIC I have to complain to you. For me, electronics is still a tool to achieve something and not a goal in itself.
I'll see what I can do with your advice,
Thank you
Hans

Op vrijdag 10 november 2023 om 00:27:13 UTC+1 schreef Matthew Schinkel:

Hans van Veldhuizen

unread,
Nov 11, 2023, 9:49:24 AM11/11/23
to jallib
Hello Rob,
I have killed one of my 16F15325, is it possible to use the16F1455 for thisĀ  nrf24101 project? I have two of them.
Hans

Op vrijdag 10 november 2023 om 08:17:30 UTC+1 schreef Hans van Veldhuizen:

Rob CJ

unread,
Nov 11, 2023, 11:02:34 AM11/11/23
to jal...@googlegroups.com
Hi Hans,

I think you can. Is has sufficient ROM and RAM and a SPI interface.

Kind regards,

Rob


Verzonden: zaterdag 11 november 2023 15:49

Hans van Veldhuizen

unread,
Nov 12, 2023, 5:14:30 AM11/12/23
to jallib
Hello Rob,
I don't think it will work. I need two ad inputs and pin_A2 is Vusb. I also don't understand why the programming pins are C0 and C1 instead of A0 and A1.
regards
hans

Op zaterdag 11 november 2023 om 17:02:34 UTC+1 schreef Rob CJ:

Rob CJ

unread,
Nov 12, 2023, 7:01:01 AM11/12/23
to jallib
Hi Hans,

The reason that they re-assigned the programming pins - I think - is because the 'original' programming pins are also the USB pins. For debugging it is much more convenient that you can both use the programmer and the USB port at the same time.

For example if you use an 18f14k50 you are constantly disconnecting the USB port when programming the device. Very unhandy.

You asked if it worked for an NRF24L01 and that it the case šŸ™‚.

It will work with any other PIC as long it has sufficient ROM and RAM.

Kind regards,

Rob


Verzonden: zondag 12 november 2023 11:14

Hans van Veldhuizen

unread,
Nov 12, 2023, 1:41:13 PM11/12/23
to jallib
Hello Rob,
For data transmission your lib works fine. I was not able to solve the collaboration with the servo lib.
I borrowed a pic from my wind meter that also works fine with this. I now control the camera servos with an extra PIC. This headache file can now be closed.
regards
Hans

Op zondag 12 november 2023 om 13:01:01 UTC+1 schreef Rob CJ:
Reply all
Reply to author
Forward
0 new messages