Go to advanced search

by sparkyhall
Sat Mar 09, 2019 4:19 pm
Forum: Python
Topic: How to test encoder with raspberry Pi
Replies: 33
Views: 3210

Re: How to test encoder with raspberry Pi

The electrical output specification for this encoder is as follows:

A,/A & B,/B outputs are TTL/RS422
Maximum load current per output <= 30mA
Maximum output frequency =300kHz

The encoder is reverse polarity protected and short circuit protected.
by sparkyhall
Sat Mar 09, 2019 8:32 am
Forum: General discussion
Topic: Pi zero W - Goodnight Message on Low Power
Replies: 3
Views: 355

Re: Pi zero W - Goodnight Message on Low Power

If you create a rc.local_shutdown in /etc that may still work, that's how it used to be done. Failing that I would think systemd can do something similar.
by sparkyhall
Sat Mar 09, 2019 8:02 am
Forum: Python
Topic: How to test encoder with raspberry Pi
Replies: 33
Views: 3210

Re: How to test encoder with raspberry Pi

champ1 wrote:
Sat Mar 09, 2019 7:37 am

I have domino encoder model GPI9109 But I couldn't get the datasheet on internet, searching from long time

only pin description is there on the product
That doesn't look like a Domino number, can you post a picture of the label?

If not does that label include the number 14828?
by sparkyhall
Sun Jan 20, 2019 9:15 am
Forum: General discussion
Topic: DIY Webcam in Finland
Replies: 17
Views: 1268

Re: DIY Webcam in Finland

On top of what heater has suggested, you can also stop the Pi taking pictures when it is dark and therefore increase battery life further using something like an LDR or photo transistor as the sensor. If you do use a solar panel you may be able to use the panels output to detect when it is dark.
by sparkyhall
Sat Sep 29, 2018 7:11 pm
Forum: General discussion
Topic: Simple battery circuit feasible?
Replies: 16
Views: 3429

Re: Simple battery circuit feasible?

I've been using the 'Wide input shim' from Pimoroni on a Pi3 and Pi2, works really well 6xAA Nimh batteries:
https://shop.pimoroni.com/products/wide ... 8104321034

The shim doesn't get hot so it seems efficient, not tested on a Pi3+ though.
by sparkyhall
Wed Sep 19, 2018 8:45 am
Forum: General discussion
Topic: crontab not executing
Replies: 7
Views: 644

Re: crontab not executing

The output is normally buffered and may not be written until you exit the program. To prevent buffering you can start Python with the -u option, this will force mp.txt to be updated for each print command:

Code: Select all

@reboot python -u /home/pi/Desktop/accel.py >> /home/pi/mp.txt
by sparkyhall
Tue Aug 28, 2018 6:17 pm
Forum: General discussion
Topic: Color Bash Prompt - all grey
Replies: 11
Views: 2027

Re: Color Bash Prompt - all grey

Are you sure the default shell is set to bash for your new user?

You can check with something like, last part of response should be /bin/bash:

Code: Select all

getent passwd newusername
If not you can set it to bash with:

Code: Select all

sudo usermod -s /bin/bash newusername
by sparkyhall
Thu Apr 12, 2018 5:53 pm
Forum: General discussion
Topic: RPI can see my HDD but can't acces it
Replies: 4
Views: 3008

Re: RPI can see my HDD but can't acces it

It looks as though you have typed the letter 'O' instead of the number '0' in two places, you typed this:

A6DOE595DOE56C4D

instead of this:

A6D0E595D0E56C4D
by sparkyhall
Thu Jan 18, 2018 12:13 pm
Forum: General discussion
Topic: Whoops! - Two Power Sources
Replies: 9
Views: 2327

Re: Whoops! - Two Power Sources

If the power supplies were different by a fraction of a volt then there could have been large currents flowing through the power leads and the power tracks on the PCB. That could have made them hot enough to break. The self-resetting "fuse" on the power connector will have seen that current and may...
by sparkyhall
Mon Jan 08, 2018 10:06 pm
Forum: Beginners
Topic: Weather station project!
Replies: 1
Views: 707

Re: Weather station project!

You could start with my guide as it uses the same anemometer, wind vane, rain gauge, BMP180 etc:

https://github.com/sparkyhall/DIY-Raspb ... er-Station

My design is designed to be compatible with the official RPi weather station software (see weather station section of RPi site)
by sparkyhall
Fri Jan 05, 2018 5:04 pm
Forum: Beginners
Topic: New Profile Problem in Terminal Window
Replies: 2
Views: 345

Re: New Profile Problem in Terminal Window

I suspect its because you have not set the default shell to bash, to do this issue the following command:

Code: Select all

sudo usermod -s /bin/bash your-new-username
Clearly you need to replace "your-new-username" with your user
by sparkyhall
Fri Jan 05, 2018 9:14 am
Forum: General discussion
Topic: Who can tell me how to drive this motor
Replies: 2
Views: 377

Re: Who can tell me how to drive this motor

I don't think you need/should PWM it It looks like it just vibrates itself if you supply it with 2V The data sheet states 2Vrms Sinewave , you can approximate a sinewave with PWM. It is not clear to me what this does or why it is called a linear motor? Does it only vibrate at 180Hz, as implied by t...
by sparkyhall
Wed Dec 27, 2017 3:42 pm
Forum: General discussion
Topic: Python GSpread Installation
Replies: 2
Views: 1598

Re: Python GSpread Installation

If your python program is running under python 3 then you need to install 'gspread' using pip3, i.e. "pip3 install gspread"

Using pip instead of pip3 installs for python 2.7.
by sparkyhall
Fri Dec 22, 2017 4:42 pm
Forum: General discussion
Topic: Warrenty of the Pi ?
Replies: 63
Views: 8037

Re: Warrenty of the Pi ?

@JacoFourie You can start a Pi by pulling GPIO3 on the normal header low (short pin #5 to #6), there is no need to use the 'Run' pins for this. Hi. You need to enable I2C to use the UPS HAT http://www.raspberrypiwiki.com/index.php/Raspi_UPS_HAT_Board When you do that that method to start the Pi no ...
by sparkyhall
Fri Dec 22, 2017 1:40 pm
Forum: General discussion
Topic: Warrenty of the Pi ?
Replies: 63
Views: 8037

Re: Warrenty of the Pi ?

@JacoFourie You can start a Pi by pulling GPIO3 on the normal header low (short pin #5 to #6), there is no need to use the 'Run' pins for this.
by sparkyhall
Sun Oct 29, 2017 8:56 am
Forum: General discussion
Topic: Raspberry pi 3 Model B WiFi MAC address keeps changing
Replies: 31
Views: 19532

Re: Raspberry pi 3 Model B WiFi MAC address keeps changing

I don't think openVPN is to blame, I use openVPN and to my knowledge it has never changed my MAC address. Just checked and it is the usual b8:27:eb:xx:xx:xx as it should be.
by sparkyhall
Fri Oct 27, 2017 6:45 pm
Forum: General discussion
Topic: LAMP setup on Pi 3
Replies: 23
Views: 12181

Re: LAMP setup on Pi 3

Debian and therefore Raspian has switched to MariaDB as the default, they have also changed the way you log into the database as root. Instead of setting up a separate MySQL root account you now just use 'sudo mysql' to gain root access. I am posting this just in case the same now applies to MySQL a...
by sparkyhall
Sun Oct 22, 2017 6:14 pm
Forum: Weather station
Topic: HTU21D Reliability
Replies: 2
Views: 1327

Re: HTU21D Reliability

I had one fail on my home made weather station earlier this year after winter, it completely stopped working but was stuck at 100%RH prior to failing, I have replaced it with another cheap China one. I have noticed that Adafruit use the one with the built in PTFE filter (HTU21D-F) , although more ex...
by sparkyhall
Thu Sep 21, 2017 4:58 pm
Forum: Advanced users
Topic: adding new users to raspbian stretch lite
Replies: 4
Views: 3319

Re: adding new users to raspbian stretch lite

It looks like you have not set the default shell for your new user to bash, to do this enter the following:

Code: Select all

sudo usermod -s /bin/bash <your new user name>
by sparkyhall
Thu Sep 07, 2017 8:06 pm
Forum: General discussion
Topic: MYSQL
Replies: 2
Views: 546

Re: MYSQL

Not sure about MYSQL but MariaDB now uses sockets in Debian/Raspian Stretch so you no longer need a separate root password, you simply type:

Code: Select all

sudo mysql
to gain root access.
by sparkyhall
Sun Aug 06, 2017 7:41 am
Forum: General discussion
Topic: keeping the temp low without fans?
Replies: 14
Views: 3320

Re: keeping the temp low without fans?

You could try fixing the clocks to their idle values to see if you still have performance to do what you want, you can probably do this in config.txt. Only other thing I can think of is some sort of heat spreader in the form of a shaped piece of aluminum bonded to the cpu. @Hove, you may want to rea...
by sparkyhall
Mon Jul 31, 2017 8:14 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 15029

Re: Bricked my Pi. don't know why

sparkyhall, This is bad advice, most LEDs have a maximum reverse voltage rating of around 5V so simply using a series resistor when connected to 13Vac will do the LED no good at all. For this to work reliably you need to prevent this by placing a diode in the opposite polarity in parallel with the ...
by sparkyhall
Sun Jul 30, 2017 8:38 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 15029

Re: Bricked my Pi. don't know why

LED_Circ.png
LED_Circ.png (2.56 KiB) Viewed 2637 times
To answer you "current" question. The 0.01 amp value used by Heater is the current you want to flow through the LED, this is a typical safe value for driving an LED. You can get the maximum allowable current for the LED you have from the LED datasheet.
by sparkyhall
Sun Jul 30, 2017 7:59 pm
Forum: General discussion
Topic: Bricked my Pi. don't know why
Replies: 121
Views: 15029

Re: Bricked my Pi. don't know why

Just put a resistor in series with the LED. The LED is a diode so it will only conduct and light up for one half cycle of the supply. This is bad advice, most LEDs have a maximum reverse voltage rating of around 5V so simply using a series resistor when connected to 13Vac will do the LED no good at...
by sparkyhall
Sun Jul 23, 2017 5:20 pm
Forum: Advanced users
Topic: Setting up 2 wifi adaptors
Replies: 4
Views: 1051

Re: Setting up 2 wifi adaptors

1) I would plug your WiFi dongles in before applying power to the Pi. You can plug them in with power but you may find the Pi re-boots because the 5V supply rail drops when the dongle is plugged in. 2) The Pi should remember the settings for each dongle. 3) node-red should be able to access the inte...

Go to advanced search