Go to advanced search

by Ferdinand
Fri Sep 02, 2016 8:38 am
Forum: Troubleshooting
Topic: Photo resistor help
Replies: 27
Views: 3668

Re: Photo resistor help

Hi Raspiyo, 1) Place a print statement after reading += 1, what do you see? Large values, in daylight, means it does not charge. Output distroyed? 2) Maybe you have blown up your output stage. You discharge a capacitor over an output stage in a very short time and that is not a very good idea. If th...
by Ferdinand
Wed Aug 31, 2016 2:27 pm
Forum: Troubleshooting
Topic: rc.local trouble
Replies: 12
Views: 3839

Re: rc.local trouble

Hi smbitetti, Which editor do you use? I suspect that you have entered a carriage return (hex 13) and linefeed (hex 0A) instead of a linefeed (0A). sleep 6 is not the problem. Check on wrong invisible characters in rc.local and docstation_start. I have tested your script and nothing is wrong. A wron...
by Ferdinand
Tue Aug 30, 2016 9:28 pm
Forum: Troubleshooting
Topic: rc.local trouble
Replies: 12
Views: 3839

Re: rc.local trouble

Hi smbitetti, Your script is ok, but I think you have not set the proper permissions on docstation_start. chmod 777 docstation_start and reboot your pi. I have tested your script and it runs fine. Try to recover your original rc.local script. Check all permissions. Maybe it contains an invisible fau...
by Ferdinand
Sun Aug 28, 2016 4:39 pm
Forum: Troubleshooting
Topic: rc.local trouble
Replies: 12
Views: 3839

Re: rc.local trouble

Hi smbbitetti,

See this thread:
viewtopic.php?f=28&t=158199
otherwise post your rc.local.
by Ferdinand
Sun Aug 28, 2016 5:33 am
Forum: Beginners
Topic: Servo Motor Angle
Replies: 9
Views: 4203

Re: Servo Motor Angle

Thanks joan for your post!
I know that they are old posts but it points to some hints. The OP has enough information to write code for his servomotor project.
by Ferdinand
Sat Aug 27, 2016 7:34 am
Forum: Beginners
Topic: Servo Motor Angle
Replies: 9
Views: 4203

Re: Servo Motor Angle

by Ferdinand
Fri Aug 26, 2016 9:07 pm
Forum: Beginners
Topic: Servo Motor Angle
Replies: 9
Views: 4203

Re: Servo Motor Angle

Hi Daniel86, You did not initiate any value for requestedAngle, timeTosleep and requestedAngle2 Place the following lines after GPIO.setup... requestedAngle = 2 #replace 2 by a value between 1..100 corresponding to an angle requestedAngle2 = 2 #replace 2 by a value between 1..100 corresponding to an...
by Ferdinand
Fri Aug 26, 2016 8:26 am
Forum: Troubleshooting
Topic: rc.local [FAILED]
Replies: 5
Views: 1432

Re: rc.local [FAILED]

Hi,

Reboot your pi after removing the empty line and use your command in your first post.

the permission setting should look like this:
-rwxr-xr-x 1 root 506 Aug 26 10:15 /etc/rc.local
by Ferdinand
Fri Aug 26, 2016 7:59 am
Forum: Beginners
Topic: Servo Motor Angle
Replies: 9
Views: 4203

Re: Servo Motor Angle

Hi daniel86,

Option 1)
On this site you will find an arduino script.
https://www.arduino.cc/en/Tutorial/Sweep
"Translate" the c code to python code.
Perhaps you can use it.

Option 2 )
a steppermotor.

Success with your project.
by Ferdinand
Fri Aug 26, 2016 6:42 am
Forum: Troubleshooting
Topic: rc.local [FAILED]
Replies: 5
Views: 1432

Re: rc.local [FAILED]

Hi hazza_ob,

The first line in rc.local is an empty line. Remove this line.

You have added by accident perhaps this line?
by Ferdinand
Thu Aug 25, 2016 4:26 pm
Forum: Beginners
Topic: Running python shutdown script on startup
Replies: 6
Views: 1968

Re: Running python shutdown script on startup

Hi MericanPi, Try this: Edit the autostart file for a window environment. nano /home/pi/.config/lxsession/LXDE-pi/autostart add a line like this: @lxterminal -e /usr/bin/python /home/pi/shutdown.py & Save this file and reboot your system. or In a terminal environment: sudo nano /etc/rc.local add a l...
by Ferdinand
Wed Aug 24, 2016 1:28 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed,

It was a pleasure to help you. Success with ARS ELECTRONICA.
by Ferdinand
Tue Aug 23, 2016 8:23 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

also this is my current wiring diagram if it doesn't work, would i be able to use a ULN2803 to allow 5v to get to the MSD415? https://postimg.org/image/yrclc028z/ Did you use this wiring diagram (bipolar parallel)? Try bipolar serial, as suggested by gregeric in his previous post. Your psu is ok. D...
by Ferdinand
Tue Aug 23, 2016 10:39 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed, !A new challenge! That's right. If the scripts ends all the ports you have used will be cleaned up by gpio.cleanup(). So you need a smart power switch controlled by the pi. Or you may use an endless while loop before gpio.cleanup(), but that is not a perfect solution. endless loop whil...
by Ferdinand
Tue Aug 23, 2016 10:05 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed,

Great news!!!

What is the max. output current of your power supply?

What is the max. phase current of your motor. (it is dependent of your configuration.)

Do you have a torque / current diagram?
by Ferdinand
Tue Aug 23, 2016 9:35 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed,

It is StepCounter instead of Stepcounter in line 27 and 40.
by Ferdinand
Tue Aug 23, 2016 8:31 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed, Do you have an adjustable power supply? You may use an ULN2803 driver but the voltage drop on the output is > 1 V. According to the datasheet the ULN is 3.3 V logic compatable. The Vce is 1.3 V max. The voltage drop on the opto diode is about 1.1 V. The current through the opto diode i...
by Ferdinand
Tue Aug 23, 2016 6:08 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed, gregeric is right "simpify things". If you connect gpio24 to PUL then apply 3.3 V to the OPTO. Don't apply other voltages to OPTO if gpio24 is not buffered. If it does not work place a driver/buffer ic between gpio24 and PUL and apply 5V to the OPTO pin. See datasheet msd415 for other ...
by Ferdinand
Mon Aug 22, 2016 10:24 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed,

Try a n-channel mosfet or ULN2803.
Both devices are very cheap.
Use google for searching on "open collector" or "open drain drivers"
http://elinux.org/RPi_GPIO_Interface_Circuits
by Ferdinand
Mon Aug 22, 2016 9:29 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

by Ferdinand
Mon Aug 22, 2016 4:38 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

also this is my current wiring diagram if it doesn't work, would i be able to use a ULN2803 to allow 5v to get to the MSD415? https://postimg.org/image/yrclc028z/ This driver is not compatible with 3.3 logic. Search for 3.3 V open collector /open drain drivers. Hi ditchweed, The sn7407 has better s...
by Ferdinand
Mon Aug 22, 2016 2:49 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed, I could not run the latest version of your software caused by the try statement. Remove try: in line 36 and remove spaces in front of lines 37-40. Stepcounter in line 119 -> StepCounter my fault. Remove try: in line 150 too and remove spaces in front of lines 152,152. Success with your...
by Ferdinand
Mon Aug 22, 2016 1:10 pm
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

Hi ditchweed, I could run your code. I corrected a few mistakes and added some extra lines: See the following lines: 50,55-61,72-74,77-82,111,112,114,119,126,127,133,140,141 Success with your project. New Code #Step 0: Preamble #-----------------------------------------------------------------------...
by Ferdinand
Mon Aug 22, 2016 10:33 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

by Ferdinand
Mon Aug 22, 2016 10:19 am
Forum: General discussion
Topic: NEMA 23 STEPPER MOTOR CONTROL
Replies: 49
Views: 11396

Re: NEMA 23 STEPPER MOTOR CONTROL

but there's plenty of examples of people illuminating LEDs OK with the Pi's GPIO, sourced or sinked current. Won't do any harm to try it. Hi ditchweed, Try what gregeric suggested. If the MSD415 does not work then use a driver. If you apply a voltage of 5 V or higher to the opto pin then you must u...

Go to advanced search