Go to advanced search

by OutoftheBOTS
Fri Jun 21, 2019 9:48 pm
Forum: Automation, sensing and robotics
Topic: Pulse output water meter (using pigpio?)
Replies: 12
Views: 5318

Re: Pulse output water meter (using pigpio?)

pigpio is definitely the only way to read fast pulses but considering your only get pulses up to 6Hz then software will easily keep up at this speed.

A simple python call back will get the job done :)
by OutoftheBOTS
Thu Jun 20, 2019 5:44 am
Forum: Automation, sensing and robotics
Topic: Choosing motors
Replies: 36
Views: 11205

Re: Choosing motors

I seem to be coming to this discussion very late. How to answer the age old question that has dogged robot builders since the beginning of time " How to make my robot drive straight ". I have lost count at how many hours I have spend chasing this unicorn :) There is a few options. 1. Stepp...
by OutoftheBOTS
Sun Jun 16, 2019 6:30 am
Forum: Automation, sensing and robotics
Topic: How to maximize Robot Play Time - NiMH Batteries?
Replies: 6
Views: 1615

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 OutoftheBOTS
Sun Jun 16, 2019 6:18 am
Forum: Automation, sensing and robotics
Topic: Raspberry Pi distance measuring
Replies: 4
Views: 1323

Re: Raspberry Pi distance measuring

In most cases when people uses stepper motors on CNC type machines they don't usually have measuring device but rather use step count for the stepper motor. i.e they have a limit switch and on start up it moves all the way till it triggers the limit switch then counts the steps that the stepper moto...
by OutoftheBOTS
Sat Jun 15, 2019 6:44 am
Forum: Automation, sensing and robotics
Topic: How to maximize Robot Play Time - NiMH Batteries?
Replies: 6
Views: 1615

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.
by OutoftheBOTS
Sat Jun 15, 2019 6:41 am
Forum: Automation, sensing and robotics
Topic: Let's give voice to my robot... Speaker problem
Replies: 11
Views: 2946

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

I usually just use a blue tooth speaker for my RPi sound
by OutoftheBOTS
Mon Mar 04, 2019 3:29 am
Forum: Automation, sensing and robotics
Topic: Rack and pinion
Replies: 4
Views: 1092

Re: Rack and pinion

Just out of interest why are you using a rack and pinion over a lead screw or belt pulley?? There is tons of buy off the shelf and plug and play of these 2 systems here is example of belt driver for a linear actuator https://www.aliexpress.com/item/Durable-HPV2-Linear-Guide-Set-Openbuilds-V-Linear-A...
by OutoftheBOTS
Fri Feb 22, 2019 10:17 am
Forum: Automation, sensing and robotics
Topic: Ultrasound sensor alternatives?
Replies: 11
Views: 3311

Re: Ultrasound sensor alternatives?

I tend to use these little time of flight sensors that are used on drone for obstacle avoidance https://www.aliexpress.com/item/GY-530-VL53L0X-World-smallest-Time-o-f-Flight-ToF-laser-ranging-sensor/32773126352.html?ws_ab_test=searchweb0_0,searchweb201602_8_10065_10068_10130_10547_319_317_10548_1069...
by OutoftheBOTS
Sat Feb 16, 2019 12:01 pm
Forum: Automation, sensing and robotics
Topic: Fuse between motor driver board and power source?
Replies: 12
Views: 2633

Re: Fuse between motor driver board and power source?

Thanks for the replies. Yes, I use non-rechargable batteries indeed. Why is it that rechargable batteries provide more current or in other words why do they have a lower internal resistance? Then this would also mean that I should rather use a 20A fuse when I use rechargable batteries and the 5A fu...
by OutoftheBOTS
Fri Feb 15, 2019 9:36 pm
Forum: Automation, sensing and robotics
Topic: Fuse between motor driver board and power source?
Replies: 12
Views: 2633

Re: Fuse between motor driver board and power source?

A fuse is basically a weak point. When something shorts out then current can flow very high and what ever can handle the lowest current will burnout first. So to protect the rest of your components you will add a fuse(weak point) so if there is a short and current goes high the fuse burnouts rather ...
by OutoftheBOTS
Fri Feb 15, 2019 9:16 pm
Forum: Python
Topic: Receiving printer data from PC using serial-to-TTY
Replies: 4
Views: 1111

Re: Receiving printer data from PC using serial-to-TTY

Normally when you get a heap of weird chars like that it means the configuration n is wrong (most common the baud rate). Your post you show the setup on windows and the setup on RPi and they match but I suspect that maybe windows changes the baud rate when printing??? especially since your only send...
by OutoftheBOTS
Mon Feb 04, 2019 10:58 am
Forum: Automation, sensing and robotics
Topic: Seeking guidance with powering motors
Replies: 19
Views: 3093

Re: Seeking guidance with powering motors

U can get these dual h-bridge very cheap that will drive larger motors https://www.aliexpress.com/item/Special-promotions-2pcs-lot-L298N-motor-driver-board-module-L298-for-arduino-stepper-motor-smart-car/32224772756.html?ws_ab_test=searchweb0_0,searchweb201602_4_10065_10068_10130_10547_319_317_10548...
by OutoftheBOTS
Sat Feb 02, 2019 7:37 am
Forum: Python
Topic: Need to Zero array in PyUSB
Replies: 2
Views: 692

Re: Need to Zero array in PyUSB

I assume that your using a call back when a mouse event occurs. If so what I would do is have a global variable that holds a time stamp that is updated every-time the call back occurs then in your main loop compare the time stamp to current time and if the needed time has passed then zero the array :)
by OutoftheBOTS
Sat Jan 26, 2019 9:40 pm
Forum: Python
Topic: encoder with python
Replies: 1
Views: 1916

Re: encoder with python

OK this is a long story and I will see if I can answer it as short and simple as possible with giving you enough info. For useful motor control you need to build up layers of behavior with each layer building on the top of the lower layer. First layer speed control: You make a function that controls...
by OutoftheBOTS
Fri Jan 25, 2019 8:50 am
Forum: Python
Topic: Paralell?
Replies: 4
Views: 1192

Re: Paralell?

It can be easily achieved like this The problem with that code is that unless you do use a callback or something like that, if the button is pressed while the sensor is being read, it won't be detected. The DS18B20 can take a second or so to read. I had no idea that reading that temp sensor was so ...
by OutoftheBOTS
Fri Jan 25, 2019 8:34 am
Forum: Python
Topic: Using one button to cycle thru 3 scenarios
Replies: 6
Views: 1162

Re: Using one button to cycle thru 3 scenarios

global btnclick btnclick = 0 def do_cycle(): global btnclick if btnclick == 0: labeloffo.configure(image=picred) labeloffo.image=picred btnclick = btnclick + 1 elif btnclick == 1: labeloffc.configure(image=picgrn) labeloffc.image=picgrn btnclick = btnclick + 1 elif btnclick == 2: labeloffo.configur...
by OutoftheBOTS
Thu Jan 24, 2019 10:48 pm
Forum: Python
Topic: Using one button to cycle thru 3 scenarios
Replies: 6
Views: 1162

Re: Using one button to cycle thru 3 scenarios

to elaborate a little more. When a function is called it will create/allocate any variables that are used within the function that are not declared global then when the function returns it will destroy/de-allocate all variables that are not global. So every time you call your function it creates a n...
by OutoftheBOTS
Thu Jan 24, 2019 10:41 pm
Forum: Python
Topic: Paralell?
Replies: 4
Views: 1192

Re: Paralell?

I generally wouldm't use call back threading for such a simple task. It can be easily achieved like this import time #add code to setup the pin for button pressed start_time = time.now() While True: #if 10 seconds has passed then read sensor if time.now() - start_time > 10: #code to read sensor goes...
by OutoftheBOTS
Wed Jan 16, 2019 8:24 am
Forum: Python
Topic: Read Multiple Lines of Data At Once
Replies: 2
Views: 1403

Re: Read Multiple Lines of Data At Once

Ok I haven't used the MCP3008 ADC but do know of it. I mainly use the ADS1115 or the ADC pins of a MCU. Now your trying to do this in a very usual way. Your code to read the sensors sets up the SPI and then reads the data then turns the data into a string. The data being returned is an integer why t...
by OutoftheBOTS
Wed Jan 09, 2019 6:52 am
Forum: Python
Topic: Using button to activate servo not working, it just make a wierd sound...
Replies: 2
Views: 688

Re: Using button to activate servo not working, it just make a wierd sound...

Well your code looks fine.

When your switch pin gets connected to ground then it should enter the loop that moves the servo.

Please check your wiring that the switch is pulling the pin to ground when pressed.
by OutoftheBOTS
Thu Jan 03, 2019 4:50 am
Forum: Python
Topic: 256 colors mode.
Replies: 13
Views: 2858

Re: 256 colors mode.

Well then you have a few options. Just write it in block of 4096 this shouldn't slow you down too much as it is still large blocks not individual pixels. I do believe it maybe possible to change the max size of SPI buffer but not sure on exact linux kernal settings. After a bit of googling it seems ...
by OutoftheBOTS
Wed Jan 02, 2019 8:11 pm
Forum: Python
Topic: 256 colors mode.
Replies: 13
Views: 2858

Re: 256 colors mode.

So what happens is python is slow to call a function. So calling the function to write to the SPI takes much longer than the writing. So make a buffer and write the whole screen in 1 write rather than call it over and over in a for loop. Something like this #create a buffer to hold a 16bit image of ...
by OutoftheBOTS
Tue Jan 01, 2019 10:43 am
Forum: Automation, sensing and robotics
Topic: DRV 8825 Potentiometer not changing voltage
Replies: 3
Views: 1092

Re: DRV 8825 Potentiometer not changing voltage

You won't be able to adjust the amp pot unless you have the RPi/MCU pulling the rest and sleep pins high. Make sure u have it wired up like following
0J4232.600.png
0J4232.600.png (77.16 KiB) Viewed 1082 times
The voltage needs to half the desired amps
by OutoftheBOTS
Tue Jan 01, 2019 10:34 am
Forum: Python
Topic: 256 colors mode.
Replies: 13
Views: 2858

Re: 256 colors mode.

I written my own drivers for these little screen before and once once u run initialization code then set the window you want to write too you can just send the RAMWR (ram write) command then send the image buffer to the SPI then it will appear on the screen. here is a good example of a driver I wrot...

Go to advanced search