Main Site Documentation

RE: LoadCape and Trying/Seth


#21

If you leave the leads disconnected and only toggle the GPIO pins, do the LED’s turn on for each output you want to use?

They will operate without the VIN and GND connection. They are powered from the GPIO outputs.

Try this next, without the motors being connected. Connect VIN to BATT+ and GND to BATT-

With the GPIO output off (low), measure with a multimeter on output 1 and it should be close to the battery voltage (less the diode drop)

Now switch the GPIO for output 1 to on (high) and the output 1 should now be close to zero volts. If this works, your outputs are switching.


#22

@Dave_McLaughlin,

Sir…thank you for your reply. I will look into this test soon. I will return service once I complete this idea.

Seth

P.S. I used the libgpiod utility at https://github.com/brgl/libgpiod to set up LED usage and GPIO low/high on P9.42. I can now set up off vs. on w/ the BBB and LoadCape. Be right back w/ more answers.


#23

Hello Sir,

Just an update. Sorry for the late reply. The LEDs turn on and off. This is done already. I used a Python library to make my GPIO-LEDs work. I just tested it again. The volts go from high to low very quickly. I can catch it w/ the human eye but it is rapid. Then, it just rests on low voltage.

Seth

P.S. Oh and Sink1 is in an amount of “chaos” when I apply the multimeter to it. The amount of Volts jumps high and low uncontrollably for now. I have my GPIO on 0-off-low.


#24

OK. The speed that it switches from HIGH to LOW is not important. You’d need a scope to measure this but as I said, not important. What is important is that the transistor is working so there is no reason your motors should not be working if you connect them to the board.

Are they still not working? Can we see the board and motor all connected up?


#25

like last time, make your code turn the thing on, waits 30 seconds, then turns it off. Then waits 30 seconds, then repeats. It’s a simple thing that should be very clear to the human eye and even a multimeter.


#26

Hello Sir,

Sure, I will post a photo and some connections to and from the motors. Please give me a week or two. I may get to it easier in time. I am just posting to let people know I am not giving up.

Seth

P.S. Thank you for your reply. I have not been able to get the motors up and running yet. I have a couple of ideas on software, which have worked elsewhere, that I can produce w/ ease. I will update everyone w/ software and photos of connections soon


#27

Hello Sir,

Okay. I will do just that. I will give it 30 secs. and then off for 30 secs.

Seth

P.S. Please wait for a reply. I will get back to it in time. Sorry for this update and elongated bunch of replies.


#28

hi Seth

Please stop calling me sir - I’ll think there’s a police officer sitting behind me !

Take your time - we will see there’s a new post from you whenever you get to us. We are not waiting for your call :slight_smile:

You are trying to test this out to see what works and what doesn’t - I’m trying to help you to understand the test behaviours that you should try to embrace so you can start to nut these things out on your own. The behaviour I want you to see here is an endless loop, of a simple task - on then off - in a repeatable way, that you should be able to see visually and measure electrically with a multimeter. Then, you’ll want to play with the durations - for example, change to 20 seconds on time, 10 off. The important thing is to get your code in a state that you should be able to “see” the results and have that match your expectations, so if it goes on and off only every minute not every 30 seconds, that’s not explained from code so you need to dig in to that problem… Hope that’s helpful - think through these things and explore, in ways you can see that your code change had the desired effect


#29

Hello,

Okay…I will get to it when I can. Thank you for replying.

Seth

P.S. I will get the software up and running and then reply after the fact.


#30

Hello,

Here is the software to use. I used it and I can see my GPIO-LED light up for an amount of time and then turn off for another amount of time.

import Adafruit_BBIO.GPIO as GPIO
import Adafruit_BBIO.PWM as PWM
import time

MotorOne = "P9_42"

GPIO.setup("P9_42", GPIO.OUT)

GPIO.output("P9_42", GPIO.LOW)

#SinkOne =

while True:
print("making LEDs work for the Multimeter")
for i in range(1):
    GPIO.output("P9_42", GPIO.HIGH)
    time.sleep(25)

print("multimeter working for 30 more seconds")
for i in range(1):
    GPIO.output("P9_42", GPIO.LOW)
    time.sleep(25)

Okay…

So, I think I have the multimeter up and running for Sink1 w/ the GPIO pin HIGH and then LOW. I will attach the motor soon and get back to you w/ the photo of the motor and new software.

Seth

P.S. The one thing that is confusing me is the motor for the LoadCape. Should I use PWM for motor output or should I use another form of communication? Anyway, the GPIO pin is “P9_42” but I saw that a “negative SInk1” is possible. I hope I am making sense here. I looked online and found BeagleBoard.org online via their GitHub.com page for Capes. There is actually a Sink1 and -Sink1 that has a value of P9_42a and P9_42b, respectively.


#31

Hello Brett,

Seth here. I got the LoadCape up and running. Thank you everyone for insisting on providing additional support to my “hacking” of this new Cape from you and the BBB.io people.

Seth

P.S. I got one motor working on Sink1. I will inevitably figure out how to make that motor move in reverse w/ -Sink1 (I think).


#32

Mr. Dave,

I got it working today.

Seth


#33

Excellent. What did you do that got it working?


#34

Hello…I was told to plug in the MotorCape w/ the vdd_5v instead of the sys_5v like on my older Capes. I tried the same thing w/ the LoadCape and yep. It worked!

Seth

P.S. So, I had to set up a service instead of communicating directly from user space. But that did it.


#35

Hello,

Wait a minute. I am not plugged in via the vdd_5v. I am using sys_5v and it is still working.

It could be that the amount of wires in the VIN were too much for the Cape to handle. I was using two motors earlier and could not get it to work.

Seth

P.S. Strange to me. I am missing something again (most likely).


#36

You really should use a separate power source for motors.


#37

Hello Gus,

You mean a battery, right?

Seth


#38

Hello Again Gus,

Seth here. I have the battery hooked up to the LoadCape and sys_5v for the BBB.

I got you. I should use the power supply for the motors and not directly inserted and screwed to the leads in the LoadCape.

Seth

P.S. Thank you again for the support.


#39

You do not have to use a battery but using your computer power for running motors is not ideal. You do not want to damage your computer accidentally.


#40

Seth, pardon me for saying so, but I think you have very little knowledge of wiring and electronics so you should use extreme care to avoid damage. Your battery can output high current if wired wrong.

You can use the same power supply to drive the motors if the voltage is the same 5V and as long as you can supply enough current.

YOU MUST ALWAYS connect your motor supply + terminal to VIN so that the diodes are properly connected so that you don’t risk damaging the drive transistors.

You don’t have to stuff all the wires into VIN, just one from the motor + supply. The other wires can come direct from the motor supply to the motor + terminal.

If your motors are higher voltage than 5V, say 12V, you connect the + of this to VIN and the motor + terminals. The - terminal of the motor goes to the driver output on the cape. The 12V - terminal goes to the GND connection on the cape.

If you follow this procedure, it will all work. You have already confirmed that the LED’s work so your only issue is in understanding the wiring.