Go to advanced search

by Moe
Sat Aug 04, 2018 5:11 pm
Forum: Automation, sensing and robotics
Topic: ADC ADS1115 channels influencing each other with multiple devices
Replies: 11
Views: 2528

Re: ADC ADS1115 channels influencing each other with multiple devices

Yes, you're right. The read_adc function sets the mux to compare the specified channel with 0V. Odd that the erroneous values are negative though; this shouldn't be possible with a single-ended measurement. One other thing jumps out - you have the pot directly across the supply. Maybe at very low va...
by Moe
Sat Aug 04, 2018 2:39 pm
Forum: Automation, sensing and robotics
Topic: ADC ADS1115 channels influencing each other with multiple devices
Replies: 11
Views: 2528

Re: ADC ADS1115 channels influencing each other with multiple devices

Is there a chance you have the ADC set to differential mode? If so, it would be comparing A0 with A1 instead of reference voltage. I made this mistake once and got similarly odd behaviour :?
by Moe
Sat Jun 16, 2018 1:28 pm
Forum: Automation, sensing and robotics
Topic: Powering project question
Replies: 3
Views: 622

Re: Powering project question

Probably too big and heavy for your project but I tend to use 12V lead-acid batteries. Mainly 'cos I have some, but also 'cos they let me run 12V motors and it's dead easy to regulate down for the electronics.
by Moe
Tue Jun 12, 2018 9:18 pm
Forum: Automation, sensing and robotics
Topic: USB Ammeter for Solar Monitoring
Replies: 5
Views: 992

Re: USB Ammeter for Solar Monitoring

If you want to measure battery current, then no, that's an AC sensor. Are they 12V battteries and do you know what current the inverter takes from them? For the ADC I use this thing: https://www.abelectronics.co.uk/p/69/adc-pi-raspberry-pi-analogue-to-digital-converter It works nicely and is well-do...
by Moe
Tue Jun 12, 2018 8:22 pm
Forum: Automation, sensing and robotics
Topic: USB Ammeter for Solar Monitoring
Replies: 5
Views: 992

Re: USB Ammeter for Solar Monitoring

Not aware of any USB ones, but this is quite easy to do with a cheap curent sensor module and a ADC board for the Pi. Search Ebay for sensors that meet your voltage and current requirements. They usually output a small voltage in proportion to the current, that you will then have to measure with the...
by Moe
Wed Jun 06, 2018 11:32 pm
Forum: Automation, sensing and robotics
Topic: New DIY battery protector + power board idea : feedback request
Replies: 3
Views: 598

Re: New DIY battery protector + power board idea : feedback request

Hmm. Thing is, with these add-ons that try to do everything, I find there is always at least one thing that doesn't meet the requirement. For example, my robot runs off a 12V SLA, with 12V-5V buck module, 4-channel relay board to switch power to motors and stuff, and uses a resistor divider to check...
by Moe
Fri Jun 01, 2018 4:57 pm
Forum: Automation, sensing and robotics
Topic: Motors for automated storage locker
Replies: 13
Views: 1122

Re: Motors for automated storage locker

you're now welcome to excoriate me now and tell me how this is all a fool's errand. Consider yourself excoriated - this is going to be really, really hard. But that shouldn't stop you; it's a great idea for a project. (It didn't stop me attemping to build a guard robot the size of a small car. It d...
by Moe
Fri Jun 01, 2018 3:01 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 24
Views: 3643

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

Just use pigpio to count the pulses and read the tally at whatever interval you want. OK, that sounds like a nice simple plan. But I'm not using pigpio for anything else - will it mess with the rest of my code that uses RPi-GPIO and board numbering (I'm a hardware person)? (Sorry to hijack the thre...
by Moe
Fri Jun 01, 2018 2:21 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 24
Views: 3643

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

Write your software callback and hook it up to both your scope and software call back at same time and compare the 2, if they both count the same number of pulses then all is good but if your callback counts much lower number of pulses then it is missing some. Results to date are commensurate with ...
by Moe
Wed May 30, 2018 6:48 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 24
Views: 3643

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

I'm measuing 2.72 kHz at (roughly) 80rpm, which is how I derived the figure of 2100 pulses per rev. So callbacks should be OK?
by Moe
Tue May 29, 2018 9:14 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 24
Views: 3643

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

Thanks pootle. I'm not a great programmer so most of that is way beyond me :o but I think I get the jist. I'll probaby just use standard GPIO callbacks for the encoders and then do the PID as you have - your third link (python module with class) doesn't seem to work? I have the advantage that I alre...
by Moe
Tue May 29, 2018 9:03 pm
Forum: Automation, sensing and robotics
Topic: raspi to monitor and switch 12v cicuit
Replies: 5
Views: 549

Re: raspi to monitor and switch 12v cicuit

I've used that AB electronics board to monitor a 24V lead-acid battery. The I2C stuff is bit of a faff but it works. You will need to solder on the header, then just plug it on top of the Pi. Don't try to be clever and mount it separately like I did :roll: . You will need a resistor divider to bring...
by Moe
Sun May 27, 2018 2:43 pm
Forum: Automation, sensing and robotics
Topic: monitoring rotary encoder on fast motor with pigpio - improving performance?
Replies: 24
Views: 3643

Re: monitoring rotary encoder on fast motor with pigpio - improving performance?

Following this with much interest - I'm doing a similar thing but at a very early stage. The motors I'm using are JGB37-3530 Chinese knock-off gear motors, advertised as 80rpm but they all seem to be different. Obviously the encoder is on the motor not the output shaft, I don't know the gear ratio a...
by Moe
Sun May 27, 2018 1:45 pm
Forum: Automation, sensing and robotics
Topic: Sensing 50Hz frequency deviation fast
Replies: 18
Views: 1599

Re: Sensing 50Hz frequency deviation fast

I know the basic hardware to generate a square either as 50 or 100 Hz, so that is not an issue.
Looks like a few posters missed this bit and immediately assumed ItsCool was planning to plug his Pi directly into the mains :lol: .
by Moe
Mon May 21, 2018 11:51 pm
Forum: Automation, sensing and robotics
Topic: Alarm voltage detection
Replies: 6
Views: 700

Re: Alarm voltage detection

Voltage is the potential difference between two points in the same circuit/system, so you weren't measuring a fluctuating 'voltage' as such, just witnessing the meter's attempts to interpret the electrical potential of two isolated systems floating relative to each other. By connecting the meter (wh...
by Moe
Sun May 20, 2018 8:12 pm
Forum: Automation, sensing and robotics
Topic: Alarm voltage detection
Replies: 6
Views: 700

Re: Alarm voltage detection

It sounds like you're trying to measure a voltage that is not referenced to the measuring device. You need to connect the grounds together. An optocoupler will do it but unless there is a specific reason the alarm circuit needs to 'float', then it's a very roundabout and complicated way of doing som...
by Moe
Wed May 02, 2018 8:23 pm
Forum: Automation, sensing and robotics
Topic: Autonomous Drone Boat
Replies: 4
Views: 1178

Re: Autonomous Drone Boat

My Pi experience only extends to fairly basic hobby robotics and my programming skills are terrible, but my day job is naval communications, my employer is involved in UUVs, sonars and comms buoys and I am very familiar with complex systems in a marine environment. Adapting commercial-off-the-shelf ...
by Moe
Thu Apr 26, 2018 9:11 pm
Forum: Automation, sensing and robotics
Topic: Power Supply for 24V vehicle
Replies: 2
Views: 630

Re: Power Supply for 24V vehicle

Search for isolated 24V to 5V DC converters on RS or Farnell. There are many options available. They might be slightly more expensive than a phone charger but will do the job.
by Moe
Thu Apr 26, 2018 8:57 pm
Forum: Automation, sensing and robotics
Topic: 9V or 12V?
Replies: 8
Views: 914

Re: 9V or 12V?

Well, if I'm not mistaken that's a PWM-controlled H bridge, which simply converts the PWM signal to analogue DC for the motor. So, use 12V to the HAT, and just be careful not to run the 9V motors at maximum PWM. H bridges are fairly linear and motors are not particularly fussy, so a 75% mark-to-spac...
by Moe
Thu Apr 26, 2018 8:24 pm
Forum: Automation, sensing and robotics
Topic: Motor Query
Replies: 6
Views: 554

Re: Motor Query

Maybe. The instructions don't seem to say anything useful, but the schematic shows four pads in the middle labelled 'xtra pwm'. This makes me think you could just use the HAT's PWM outputs before the H bridge stage. You could then use these to drive an external, higher-rated motor controller. You ca...
by Moe
Mon Apr 16, 2018 10:55 pm
Forum: Automation, sensing and robotics
Topic: Monitoring a 12v solar & battery system
Replies: 7
Views: 6063

Re: Monitoring a 12v solar & battery system

Yes tis is straightforward - I have done this using ADC and resistor dividers. You don't even need precise resistors; you just calibrate your software against a meter. You can get current sensors on Ebay up to 100A that output a small voltage related to current that you can also measure with the ADC...
by Moe
Tue Apr 03, 2018 7:52 pm
Forum: Automation, sensing and robotics
Topic: 3b+ battery?
Replies: 6
Views: 2340

Re: 3b+ battery?

All cheapo PSUs and DC-DC converters are switchmode devices and wil generate a lot of noise. The problem signal is the switching frequency, which will be in the 10s or 100s of kHz, so propagation will be mostly conducted rather than radiated. This means your metal shield will not help, but a well-pl...
by Moe
Mon Mar 26, 2018 4:26 pm
Forum: Automation, sensing and robotics
Topic: Portable remote control pan/tilt camera power supply problem
Replies: 4
Views: 643

Re: Portable remote control pan/tilt camera power supply problem

The limitation here I think is the Adafruit powerboost charger as it can only supply 1A. That might be enough for the Pi alone but those servos coud take 650mA each. I would suggest something capable of 3A @5V. The simplest option for a beginner is probably one of those USB power banks - they are ch...
by Moe
Sat Mar 17, 2018 10:59 pm
Forum: Python
Topic: GPIO not working when called from different module?
Replies: 3
Views: 637

Re: GPIO not working when called from different module?

OK thanks, makes sense. I moved the GPIO configs to the class definition in the lower level module and all is working now :)
by Moe
Fri Mar 16, 2018 12:29 am
Forum: Python
Topic: GPIO not working when called from different module?
Replies: 3
Views: 637

Re: GPIO not working when called from different module?

OK, maybe I'll rephrase the question. Has anyone ever published any guidance on how to control GPIO across multiple modules?

Go to advanced search