Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

Python questions about libraries, algorithms, syntax, or code optimization should be directed to stackoverflow.com .... On-topic questions related to Python would include embedded programming, using it as a tool for circuit analysis, or how Python interacts with computational hardware.

0
votes
1answer
78 views

What's a better way to integrate an ODE for one time-step than the Euler method?

I'm simulating a simple cart-pendulum system for purposes of testing different control strategies and data-driven approaches. I need to simulate the dynamical system one time-step at a time. I'm ...
0
votes
0answers
16 views
0
votes
2answers
37 views

Voltage drop after writing to slave register with I2C protocol

I'm trying to control this bipolar stepper motor with an Adafruit Huzzah32 (ESP32) board and a stepper driver shield. Power sources: ESP32: 5V USB port Shield: 4 AA-batteries in series I ...
1
vote
0answers
78 views

Micropython on Esp32 MQTT

I've modified the instructions here for setting up publishing DHT-22 temperature and humidity sensor values over MQTT. I have the cheaper DHT-11 sensor instead and when I run my code in repl it works ...
2
votes
0answers
152 views

PV cells (photovoltaic) I-V curve plot simulation

I am trying to plot the I-V curve using python because that helps me in understanding PV cells / solar panels (and diodes as a general thing). I know the formulas ...
0
votes
0answers
47 views

MCP 3008 Re: Raspberry pi

I am new to circuitry. Naturally, this presents a few problems when asking a question: One often does not know enough to formulate a well-formed question. My apologies in advance. I use a ...
0
votes
0answers
51 views

Serial communication between raspberry and laptop not giving right values

I want to communicate between a Raspberry Pi 3 model B and a laptop using a USB to RS-232 cable and this RS-232 to 3.3V TTL converter via the serial module in Python: GND is connected to board pin #6 ...
1
vote
1answer
67 views

Sudden raspbery pi power cut or random long delay when running stepper motor using pigpiod

So I wrote another program that can run stepper motor nema 34 using leadshine DM860 driver and this is the example of my code: ...
0
votes
2answers
133 views

AttributeError: 'NoneType' object has no attribute 'send' pigpiod

So I create an another program that can run stepper motor clockwise and counter clockwise with a ramp up and ramp down in there and adding limiter switch on GPIO 16 and 26 to stop the ...
0
votes
0answers
39 views

Converting the output of a Proportional Control System to a meaningful drive of a Peltier

Trying to create a PID controller for temperature control using a Peltier element, I decided to take it step by step and create first the Proportional and then the Integral and the Derivative ...
0
votes
2answers
123 views

Monte Carlo Simulation In Python instead of HSPICE

Suppose I have a resistor and I want to simulate process variation on it. When I was reading online, I noticed that Monte Carlo simulation is used for this purpose. I also noticed that HSPICE has ...
0
votes
0answers
29 views

sht sensor overexposure to high air humidity

has anyone encountered SHT Sensors returning higher humidity readings after certain periods of overexposure to high air humidity? I'm using weatherproof sht10 sensor bought from aliexpress, running ...
0
votes
1answer
42 views

Getting valid input from Ultrasonic range finder

(I am posting this question here since I feel that the issue is a part of my lacking understanding of the electronics, and not a ) I am trying to monitor the feed hopper for my pellet furnace. I had ...
0
votes
2answers
217 views

Increase the ramp up stepper motor performance

I'm driving a NEMA34 bipolar stepper motor with the following specifications: Holding torque 5.9 Nm Step angle 1.8° Resistance / phase 0.33±10% Ω Inductance / phase 3.00±20% mH Max load axial 65 N ...
1
vote
1answer
251 views

Tektronix TBS 2000 oscilloscope to Python

I am a total beginner when it comes to communicating to your electronic devices using python. I installed PyVISA, Open Choice Talker Listner (Tektronix), a few other items. I was able to send basic ...
0
votes
0answers
42 views

Checking for signals above strength threshold over SDR on VHF

So I have a small NooElec Software Defined Radio and I've got it working well with my Raspberry Pi using GQRX as a controller and to visualize the SDR output. My goal though is to use a python script ...
-1
votes
3answers
158 views

Need Help with Python Script - ' 4 Dollar Programmer'

I am working on an embedded project and have made my first PCB with a processor mounted on board. The trouble seems to be actually getting my code onto that processor! I was sort of banking on being ...
1
vote
0answers
173 views

Dac over raspberry pi spi troubleshooting

I am trying to output a signal with dac124s085 from python code on a raspberry pi 3b, running Raspbian Stretch (kernel 4.14.30-v7+ #1102). I am sure the spi master driver is enabled - dtparam=spi=on ...
0
votes
0answers
30 views

Calculating cell resistance in dependence from cell temperature from CAN bus logs

I'm part of a formula student team. When we go testing we are logging the CAN bus data the car produces to further understand what the car is doing. We log all the battery cell temperatures/voltages ...
0
votes
3answers
121 views

using an ADC under Linux for automated current monitoring setup

I'm a slightly overchallenged undergrad ee student. I'm working on a project where I'm supposed to build an automated setup to measure hard disk currents over time. I want to use a Current Shunt ...
0
votes
0answers
812 views

Most accurate, available way to control a stepper motor with python

I am doing a project where I am controlling a nema 17 stepper motor with a raspberry pi 3b. The raspberry pi is controlling the motor through a pyqt5 gui (python 3 is the language). I am using tb6600 ...
1
vote
1answer
140 views

Device for toggling power to another device via raspberry pi GPIO?

So I have a PTZ camera and a siren. What I'm trying to do is trigger the siren when the camera detects motion. The camera hooks up via PoE, but the siren just has a 12 volt connection, so it has to ...
0
votes
1answer
1k views

Data acquisition with Python on a Beaglebone Black - Increasing sample speed

This is my first foray into programming and using a BeagleBone Black. I have some limited experience in Python, and have used this within the provided Cloud9 IDE in order to capture data and write ...
1
vote
1answer
147 views

Current flow between 2 circuits without common ground

I made a clock circuit with a 555 timer ic, then I measured the wavelength of the square wave generated using my Raspberry Pi. At first I connected the ground of the RPi to the ground of the circuit. ...
1
vote
0answers
143 views

Solve \$n \times n\$ rectangular grid of resistors for mesh currents

I am modeling a mechanical process by using an electrical analogue. I need to calculate the loop (mesh) currents, then I can see if any mesh current is greater than a predetermined value \$\lambda\$. ...
1
vote
0answers
193 views

Problem with Pyserial read time

I'm building a RS485 network with rpi3 as master and a bunch of c51 mcu as slaves. After sending an address, the master waits for the slave to respond and then starts to send data. I'm using Pyserial ...
0
votes
1answer
129 views

Comunication Xbee S1 Coordinator to End Device

I am new in the Xbee world, I have 4 Xbee S1 802.15.4, that 3 are end device and one a coordinator. The end devices transmit good to coordinator.The coordinator is connect to Raspberry Pi via USB ...
0
votes
0answers
406 views

Internet access to LoPy (ESP32) using its GPIO pins

LoPy is a LoRa module which uses ESP32 chipset. It has WiFi and Bluetooth connectivity for Internet. In my setup, I have certain interference issues, so I can't use WiFi nor Bluetooth to connect my ...
0
votes
1answer
136 views

Simple Impedance/Admittance based Transmission/Reflection Simulation

TL;DR: Why does the (pseudo-)code below produce a different output than a proper simulation software? Full problem description: I want to be able to simulate simple (idealized) RF circuits, such as ...
0
votes
0answers
127 views

What are the materials needed for boiling milk alarm sensor?

I have recently bought raspberry pi to start working on it. I have never ever used it before. I am thinking of doing very basic task of led bulb on/off for getting into it. I am curious on developing ...
1
vote
2answers
998 views

Serial communication between embedded system and PC with only USB ports available.

I am working on an application where I have part of an embedded linux system transferring some data to a PC utilizing PySerial (a Python module). My question is: is there an alternative to finding a ...
1
vote
1answer
52 views

Issue reading pressure transducers and getting floating value

So I'm trying to read a Honeywell pressure transducer off an Arduino Mega and I'm just getting floating values. I've tried ground the line straight to the Gnd and then I get a consistent 0 but ...
4
votes
3answers
2k views

ESP8266-12E MicroPython Unable to access REPL (Python prompt)

I am trying to install MIcroPython Firmware on my ESP8266-12E chip. I am using esptool.py to flash the firmware. I have successfully uploaded the firmware ...
0
votes
1answer
116 views

Logic Behind MQx Sensors Calculation - Raspberry Pi

Would you please explain the logic behind this snippet of code which is taken from here for calibrating MQx Sensor(s): ...
2
votes
2answers
2k views

laplace transform on simple low pass filter in python

Looking at the first picture in the link, showing a simple graph of an with- and without bypass filter circuit voltage difference, i wanted to recreate this picture. I have coded the noise and ...
0
votes
0answers
55 views

Embedding python interpreter in the TM4c1294XL

I have a python file that I want to run on the board. Hence I want to embed the python interpreter (written in C) in the board. I managed to write separate C project that runs the Python file. It ...
4
votes
1answer
289 views

Am I using Shannon-Hartley Theorem and thermal noise correctly here?

I'm trying to learn about noise, sensitivity, and the Shannon-Hartley theorem, and I'm using some specs for a LoRa node IC to try it out. The Shannon-Hartley theorem says that the maximum data rate \$...
0
votes
4answers
1k views

RPi GPIO relay interference with input

I'm trying to use a RPi3 to output/control a lamp using this relay module. I also want to be able to read from a push button and a switch. The problem I'm having is that it looks like switching the ...
0
votes
2answers
386 views

Why is there no attenuation in the magnetic field at the boundary of the near field?

I have used the Wikipedia FSPL formula for the farfield, and the one kindly provided by @mnsp for the near field: http://grouper.ieee.org/groups/802/15/pub/04/15-04-0417-02-004a-near-field-channel-...
2
votes
2answers
2k views

start a LTSpice simulation using code in MacOS

Help me please, I'm looking for the solution how to automate spice simulation with python on MacOS, currently, I'm thinking to use LTspice. However, I'm open to any proposal. I want to make ...
0
votes
1answer
122 views

PSOC 5 interfacing with PIR sensor

I am trying to interface the PSOC5 LP097 with PIR sensor to trigger the stepper motor for my Pet Feeder System. In addition, everytime the PIR sensor detects a movement, I try to send a mail using ...
12
votes
1answer
5k views

ESP8266 eLUA (NodeMCU) vs MicroPython

I am searching for an unbiased, up-to-date comparison of the eLUA (NodeMCU) and MicroPython on ESP8266. I can only find very superficial reports/blogs of users trying out one or the other. - All of ...
0
votes
1answer
388 views

How to talk with RTC hardware by Python?

I am using DT6 custom board from Variscite . This board is connect with DART MX6 board. DT6 in below link http://www.variscite.com/products/single-board-computers/dt6customboard I need to handle the ...
1
vote
2answers
292 views

Send a logic 1 from a USB port [duplicate]

I have an electronic system waiting to be triggered (no microcontroller for now). My laptop only has USB ports. I want to trigger it using voice recognition (this part is ok). For now the only think ...
-1
votes
1answer
85 views

Any ideas for a hardware to do AM and FM modulation? [closed]

I'm trying to do some signal processing (AM/FM Modulation) for signals from 0 - 60kHz. Any recommendations for hardware? Preferably something I can use MATLAB with (or Python) as I'll most likely be ...
2
votes
3answers
7k views

How to hook Raspberry Pi with Electret Microphone to detect sound levels in dB?

I have to detect sounds levels in an enclosed area, so I thought this could be the right choice. /*EDIT I wish to collect sounds levels of about 30-60dB, normally human conversations or just ...
0
votes
1answer
3k views

Pyserial doesn't read entire line [closed]

I have an Arduino programmed to print a line containing eight values separated by commas every 10 milliseconds. Every line is terminated by a new line character. But when I try to read this data into ...
0
votes
1answer
3k views

Can an XBee in API mode receive data through serial?

Following the python-Xbee library and an example, I am trying to communicate between 2 XBees Using XBee S2C Setup: Coordinator API=2, running the code in python @ Mac Router AT mode, running python ...
0
votes
1answer
1k views

How to create a network of multiple xbee s2 with python and arduino

I'm working on a wireless sensor network in which I have one coordinator router (API mode 2) connected to a Raspberry Pi 2, 5 or more routers in API mode 2 as well. Each router is connected to an ...
0
votes
2answers
384 views

Using Python to control Brooks MFC Power Supply

Is it possible to use Python to control the Brooks 0152/0154 power supply that powers and controls Brooks MFC units? The manual mentions the pin outs of the RS-232 ...