OpenMarine

Full Version: Motor controller
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8
Hi,

@djdsails:
Wich device do you use for running tinypilot?
A raspberry Zero W?

Put your sd card with the latest tinypilot-image into the pi, powerd it up and look for the on-board-led of the pi. It must flicker. If it stays dark, or blinking (in a code) or flashs, stops and start flashing again and again then (mostly) something is wrong with your sd card and image.
When the pi boots up after a short time you find a wifi called "pypilot" connect with it (no password needed) and then enter the address 192.168.14.1 into the browsers address row. Then you should get connection to the pypilot via the web gui.

When this works you can be shure your pypilot-service is running and then you can start to get a connection to your motor controler.

Without beeing shure that your pypilot is running it´s not clear why you didn´t get a connection to your motor controler.

Best regards

Andreas
(2021-02-04, 06:42 AM)ironman Wrote: [ -> ]I don't see the attachment ;-). While you are at it, can you also provide some details of the electronics you put in between pi and arduino. A diagram or a photo will both be clarifying and help people here assessing where the problem may be.

let me try again whoops...
see attached photos first then i will post again for the text document [attachment=1300][attachment=1296][attachment=1297][attachment=1298][attachment=1299]

[attachment=1301][attachment=1301]txt document
Hi,

try the following:
disconnect the arduino from the leveler. Disconnect the motor controller from the arduino.
Connect the pi TX with the arduino rx and the ground connection and feed the arduino and the pi with the same +5V (you can feed the pi with +5V at the GPIOs 2and4, but really and only +5V).

What´s then about the rx-led from the arduino?

Regards

Andreas
Hi Andreas,

thank you for the suggestion, just tied it... the pi booted, the nokia screen said no motor controller, the nano rx-led did not flash
I hope you have a voltmeter. If you do this (see below), you can programmatically set the tx pin (pin 8) of the pi to '1' (3V3) or '0' (0V). 

If you don't measure these voltages, it might be your pizero has a broken output - this might happen when you tie them the wrong way with the arduino. Fingers crossed. 

Code:
pi@openplotter:~ $ ssh tc@10.10.10.3

  ( '>')
 /) TC (\   Core is distributed with ABSOLUTELY NO WARRANTY.
(/-_--_-\)           www.tinycorelinux.net

tc@box:~$ sudo sv stop pypilot
ok: down: pypilot: 86313s
tc@box:~$ sudo gpio -g mode 14 output
tc@box:~$ sudo gpio -g write 14 1
tc@box:~$ sudo gpio -g write 14 0

If you do measure the voltages, give us the readings on all 6 pins of the leveler.

In the schematic I can see the common ground between the pi (6) and the arduino, but I cannot see it in the picture. You sure it is in place?
so i could not log into 10.10.10.3 via puTTy so i used 192.168.14.1 like last night
logged in
typed stop pypilot
got an ok
14 output line i typed in and measured got on low side 3.28v and high side 5.03v
write 14 1 and measured got the same voltages
write 14 0 and measured and got the same voltages
Hi,

try the suggestion from ironman with the pi and nothing connected to the pi just the naked pi please.
No leveler, no arduino nothing. Just the pi, connected to a power source (USB).
Then try it again.
Measure between the GPIO and a ground GPIO.

What measurements get you then?

@ironman: Are you shure that wiring pi is installed? The code works only with wiring pi I think?

If not, there´s a possibility to switch a GPIO via the shell with some "echo"-commands. For a "normal" pi:
(sudo) echo "8" > /sys/class/gpio/export
(sudo) echo "out" > /sys/class/gpio/gpio8/direction
(sudo) echo "1" > /sys/class/gpio/gpio8/value
(sudo) echo "0" > /sys/class/gpio/gpio8/value


Regards

Andreas
mode 14 output
3.19 for tx to ground
3.03 for rx to ground
write 14 1
3.19 for tx to ground
3.06 for rx to ground
write 14 0
3.19 for tx to ground
3.06 for rx to ground
(2021-02-04, 07:00 PM)djdsails Wrote: [ -> ]mode 14 output
3.19 for tx to ground
3.03 for rx to ground
write 14 1
3.19 for tx to ground
3.06 for rx to ground
write 14 0
3.19 for tx to ground
3.06 for rx to ground

Hi,

edited my last post. Sorry. Try it with the echos commands. But I didn´t test it on a tinycore raspian.

Regards

Andreas
pretty sure - the -g switch toggles the bcm numbers, and the Tx is GPIO14. I tested it with another GPIO I have attached to an led; to test it with GPIO14 I'd need to open up my machine - which I am about to do.

Because the sad news would be, that if the pin cannot be pulled down to 0V, the output seems to be shot.

I ran this and it made the rx led on the arduino blink:

Code:
sudo sv stop pypilot
sudo gpio -g mode 14 output
while [ 1 == 1 ]; do sudo gpio -g write 14 1; sleep 2; sudo gpio -g write 14 0; sleep 2; done

So if you run this and you don't measure alternating voltages on you GPIO14 / pin 8, I'm afraid your nano is bad. Hate to be the messenger of sad news, hope it's not true.
Pages: 1 2 3 4 5 6 7 8