This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Motor controller
#21
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
Reply
#22
(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                     


.txt   pypilot run txt #1.txt (Size: 5.12 KB / Downloads: 14)
.txt   pypilot run txt #1.txt (Size: 5.12 KB / Downloads: 14) txt document
Reply
#23
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
Reply
#24
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
Reply
#25
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?
Reply
#26
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
Reply
#27
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
Reply
#28
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
Reply
#29
(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
Reply
#30
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)