Go to advanced search

by amcdonley
Sat Aug 24, 2019 4:28 pm
Forum: Automation, sensing and robotics
Topic: Data Logging, Plotting Help
Replies: 10
Views: 3635

Local: Data Logging, Plotting

For simple logging sensor data to a file and then plotting it, all local: 1) Log Battery Voltage and Plot on linear scale by hour of day, and by time since first measurement 2) Log PiCamera Brightness Value and Plot on log scale by hour of day It is also possible to tie sensor readings into the RPi-...
by amcdonley
Mon Aug 19, 2019 7:16 pm
Forum: Automation, sensing and robotics
Topic: Simple Variable Sharing Between Python Processes?
Replies: 4
Views: 1863

Re: Simple Variable Sharing Between Python Processes?

You may consider a generic messaging queue (eg mosquitto) to communicate state changes across processes. I have to admit I am intimidated by the whole IoT complexity. I've watched rosie the red robot as he ventured there, but I have kept my distance. After 40+ years of doing commercial software sys...
by amcdonley
Mon Aug 19, 2019 6:28 pm
Forum: Automation, sensing and robotics
Topic: Simple Variable Sharing Between Python Processes?
Replies: 4
Views: 1863

Re: Simple Variable Sharing Between Python Processes?

SQLite3 doesn't support multiple writers. You very rapidly destroy your database if you get two writers running. Use python multi-threading to run everything in a single python process. Results on my Pi3B using multiprocessing pool.map to 3 "worker/inserter" processes that each obtain closing_lock/...
by amcdonley
Mon Aug 19, 2019 1:03 am
Forum: Automation, sensing and robotics
Topic: Simple Variable Sharing Between Python Processes?
Replies: 4
Views: 1863

Simple Variable Sharing Between Python Processes?

Right now I have a python module to manage concurrent access to some robot variables stored in a file "carlData.json" carlDataJason.py : * saveCarlData(dataname, datavalue, logit=False) # adds datanaem:datavalue to carlData.json file * getCarlData(dataname=None) # either returns dictionary with all ...
by amcdonley
Sat Aug 17, 2019 7:05 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi High Frequency Sampling
Replies: 5
Views: 1978

Re: Raspberry Pi High Frequency Sampling

That is samples per second, not bytes per second. So if each sample was 12 bytes (4 bytes each of X, Y, Z) then that would be 20,000 times 12 or 240,000 bytes per second. The top line is 1 byte per second, the bottom line slower for 5 bytes per second, which implies 12 bytes per second will be even...
by amcdonley
Sat Aug 17, 2019 4:34 pm
Forum: Automation, sensing and robotics
Topic: Raspberry Pi High Frequency Sampling
Replies: 5
Views: 1978

Re: Raspberry Pi High Frequency Sampling

Hey guys, ADXL355 digital accelerometer over SPI and would like to sample at 4000hz. Does the pi have a maximum sampling rate cap, According to How Fast Is SPI the Linux SPI driver (in a C language program) seems to max out around 20K bytes per second. I don't know how many bytes each ADXL355 sampl...
by amcdonley
Fri Aug 09, 2019 10:43 pm
Forum: Troubleshooting
Topic: RPi 3B WiFi Down - recovered by unplug, replug dongle
Replies: 1
Views: 211

Re: RPi 3B WiFi Down - recovered by unplug, replug dongle

I think I see what happened - a few hours prior I did a: sudo rpi-clone sda and after it finished and unmounted both partitions, I unplugged the USB microSDcard adapter. Guess that did it. /var/log/messages: Aug 9 17:54:35 Carl kernel: [171141.137968] usb 1-1.4: USB disconnect, device number 5 Aug 9...
by amcdonley
Fri Aug 09, 2019 10:21 pm
Forum: Troubleshooting
Topic: RPi 3B WiFi Down - recovered by unplug, replug dongle
Replies: 1
Views: 211

RPi 3B WiFi Down - recovered by unplug, replug dongle

I just found my RPi 3B robot incommunicado by both wlan0 and wlan1 and this printed on the closed remote SSH login: packet_write_wait: Connection to 10.0.0.188 port 22: Broken pipe In spite of a solid blue light on the WiFi dongle, the RPI disk activity light seemed to indicate the bot was still run...
by amcdonley
Tue Aug 06, 2019 6:54 pm
Forum: Astro Pi
Topic: PiCamera as Luminosity Sensor?
Replies: 8
Views: 7549

PiCamera as Luminosity Sensor - Python Code Available?

Would love a post project report and to see luminosity sensor code.

I want to use PiCamera (v1.3) to measure room light level over 24hr periods - don't need calibrated value, just continuous values from darkness to brightly lit.
by amcdonley
Fri Aug 02, 2019 9:20 pm
Forum: Automation, sensing and robotics
Topic: Agree? “IMU worthless for simple robots' x, y, heading?”
Replies: 9
Views: 1091

Re: Agree? “IMU worthless for simple robots' x, y, heading?”

You might be right but the question on the title I answered to was different than the one you are thinking at, since it did not had the "x, y heading" words at the end.. Kind of author changes its ckick-baity question then argues people gave him wrong answers, Please - I asked my question wrong, yo...
by amcdonley
Thu Aug 01, 2019 1:08 am
Forum: Automation, sensing and robotics
Topic: Robot Shared Values / DB impact on RPi SD card
Replies: 2
Views: 405

Re: Robot Shared Values / DB impact on RPi SD card

Thank you - great response. consider in memory databases https://en.wikipedia.org/wiki/List_of_in-memory_databases Or. if it suits you, a faster in memory key-value datastore like LMDB https://en.wikipedia.org/wiki/Lightning_Memory-Mapped_Database I have heard of, but know nothing about, SQLite whic...
by amcdonley
Wed Jul 31, 2019 8:32 pm
Forum: Automation, sensing and robotics
Topic: Agree? “IMU worthless for simple robots' x, y, heading?”
Replies: 9
Views: 1091

Re: Agree? “IMU worthless for simple robots”

blimpyway wrote:
Wed Jul 31, 2019 8:09 pm
try to make a simple two wheel balancing bot (segway bot) without an imu.
Understandably impossible for the "keeping its head up" function, but can it provide accurate (world frame: x, y, theta)? It's a serious question. Am I wrong about that application of IMU?
by amcdonley
Wed Jul 31, 2019 5:29 pm
Forum: Automation, sensing and robotics
Topic: Agree? “IMU worthless for simple robots' x, y, heading?”
Replies: 9
Views: 1091

Agree? “IMU worthless for simple robots' x, y, heading?”

Found a phenomenal [90 page introduction and analysis](https://arxiv.org/pdf/1704.06053.pdf) (university level, but first and last sentence of some paragraphs are understandable): Manon Kok, Jeroen D. Hol and Thomas B. Sch ̈on (2017), ”Using Inertial Sensors for Position and Orientation Estimation”,...
by amcdonley
Wed Jul 31, 2019 5:16 pm
Forum: Automation, sensing and robotics
Topic: Robot Shared Values / DB impact on RPi SD card
Replies: 2
Views: 405

Robot Shared Values / DB impact on RPi SD card

My robot is nearing the point of needing a place to share more state and history between Python processes. Currently I have a “json data module” that abstracts access to a few rarely written values persisted on the SD card file system, and two logger files which are written to once or twice an hour....
by amcdonley
Sun Jul 28, 2019 4:07 am
Forum: Automation, sensing and robotics
Topic: 'Uninteruptible' Power Supply
Replies: 3
Views: 519

Re: 'Uninteruptible' Power Supply

strongly suggest this UPS, I use it with my desktop RPi for over a year with no off time, even through hurricanes.

https://lifepo4wered.com/lifepo4wered-pi+.html
by amcdonley
Thu Jun 20, 2019 5:46 pm
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 11
Views: 1713

Re: Let's give voice to my robot... Speaker problem

drotosclerosi wrote:
Wed Jun 19, 2019 2:29 pm
So i bought this little speaker

I'm just worried about the weight: could a 42grams speaker connected to the 3.5 mm jack damage it in any way?
Use a short extension cable and velcro the speaker to your bot.
by amcdonley
Tue Jun 18, 2019 12:52 pm
Forum: Automation, sensing and robotics
Topic: irritating battery limits
Replies: 21
Views: 2160

Re: irritating battery limits

OK, so i took a look at that specialized battery, and it definitely looks intriguing. The problem lies in that this solution would only work for the pi part of the robot, and would not allow function for the rest whilst charging. Ideally, I would need a circuit that could take a signal from a GPIO ...
by amcdonley
Sun Jun 16, 2019 10:19 pm
Forum: Automation, sensing and robotics
Topic: irritating battery limits
Replies: 21
Views: 2160

Re: irritating battery limits

Have you looked at this phenomenal UPS https://lifepo4wered.com/lifepo4wered-pi+.html ?

I have the earlier version running a desktop RPi continuously for six months at a time. I like to update the OS periodically and sometimes that requires a reboot.
by amcdonley
Sun Jun 16, 2019 1:02 pm
Forum: Automation, sensing and robotics
Topic: How to maximize Robot Play Time - NiMH Batteries?
Replies: 6
Views: 939

Re: How to maximize Robot Play Time - NiMH Batteries?

Are you using the batteries with UPS to run both the RPi and the motors?? My bot is built upon the Dexter Industries GoPiGo3, which provides the power management and isolation using a single 7 to 12 v 2.5A source. Note: I have found it best for me to start from a supported platform. I spent/wasted ...
by amcdonley
Sat Jun 15, 2019 12:42 pm
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 11
Views: 1713

Re: Installing OpenCV

THe fact is that i'm already in big pain installing opencv for facial recognition If you are willing to use Python and not virtual environments: (From https://www.pyimagesearch.com/2018/09/19/pip-install-opencv/) sudo apt-get update && sudo apt-get upgrade sudo apt-get install libhdf5-dev libhdf5-s...
by amcdonley
Sat Jun 15, 2019 12:17 pm
Forum: Automation, sensing and robotics
Topic: How to maximize Robot Play Time - NiMH Batteries?
Replies: 6
Views: 939

Re: How to maximize Robot Play Time - NiMH Batteries?

I usually use Hobby Lipo batteries for all my projects as they are cheaper and have higher energy density as well as can handle much higher amps if needed. But I would guess you are not running them in a UPS (uninterruptable power supply) mode that allows connecting/disconnecting the charging sourc...
by amcdonley
Fri Jun 14, 2019 7:23 pm
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 11
Views: 1713

Re: Let's give voice to my robot... Speaker problem

My current bot first used a "Wired Rechargeable Speaker": https://www.amazon.com/Otimo-Rechargeable-Speaker-Design-Smile/dp/B01DQ6RE4O Carl_Charging_After_Marathon.jpg This was an OK speaker, but a bit of a pain because I needed to recharge it separate from recharging the bot, and I had to get on th...
by amcdonley
Fri Jun 14, 2019 2:49 pm
Forum: Automation, sensing and robotics
Topic: How to maximize Robot Play Time - NiMH Batteries?
Replies: 6
Views: 939

Re: How to maximize Robot Play Time - NiMH Batteries?

BAck to basics. There are only four possible problems here; 1. The charger is not doing its job 2. The battery pack is faulty and not holding a charge 3. The robot is using more power than expected 4. The Juice data is bullshit. I suspect you either have a dodgy charge situation, or a bad cell in t...
by amcdonley
Thu Jun 13, 2019 7:02 pm
Forum: Automation, sensing and robotics
Topic: How to measure distance with the raspberry pi camera
Replies: 4
Views: 2994

Re: How to measure distance with the raspberry pi camera

For a PiCamera fixed to a bot with a fixed/known pointing angle, the distance to the bottom line of the image is a known, fixed number. I have a PiCam v1.3 on my bot: 5MP 1080p30 2592 x 1944 pixels 35mm focal length equiv. focus 1 m to inf. H 53 deg x V 41 deg f/2.9 (Use 1296 x 976 and 2x2 binning f...
by amcdonley
Thu Jun 13, 2019 6:34 pm
Forum: Automation, sensing and robotics
Topic: irritating battery limits
Replies: 21
Views: 2160

Re: irritating battery limits - this works for my bot

A subject dear to my heart, this is - how to recharge a robot without shutting it down? (In my case because the bot has no wakeup timer function.) Carl Recharging On His Dock.jpg How I solved it for my GoPiGo3 robot: 1) Eight 2800mAh NiMH AA-cells (series connected) 2) Twin pigtails in parallel off ...

Go to advanced search