Questions tagged [python]

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. Questions about libraries, algorithms, syntax, or code optimization should be directed to stackoverflow.com.

Filter by
Sorted by
Tagged with
18
votes
1answer
8k 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 ...
8
votes
2answers
9k views

Is there a spice directive to export waveform data in LTspice?

http://www.linear.com/solutions/1815 The above web-page explains how to export the waveform data to a text file. You basically run the LTspice simulation, clicking on the waveform window, go to ...
7
votes
4answers
5k views

Wheatstone bridge sensitivity and accuracy

From my earlier question I was able to wire up 2 SEN-10245 weight sensors (each forming one half of a wheatstone bridge) with an AD620 InAmp & 47 Ohm resistor (to set the gain to ~1000). I then ...
7
votes
0answers
4k views

Automate LT-SPICE? [duplicate]

I'm running a lot of simulations in LT-Spice, and I need someway to run them all either sequentially or at the same time. I was going to use Python, but I'm not entirely clear on how I would get ...
5
votes
3answers
3k 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 ...
4
votes
1answer
445 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 \$...
4
votes
5answers
19k views

Python serial between Arduino and Raspberry Pi: Data is modified upon reception

I'm using an Arduino for sensor readings and sending them to a Raspberry Pi via USB, using PySerial for data reception. It works great, except for the fact received data is awkwardly modified (And ...
3
votes
2answers
4k views

Passing data from Python to Arduino over ethernet

I have an Arduino with Ethernet shield handshaking with my machine over Ethernet, and now I want to send data between them. My problem seems to be correctly parsing the different data types. For ...
3
votes
1answer
3k views

Test automation framework/software for hardware applications

I am an Electrical engineer so my background on software testing is limited. My application is not a software testing issue. I need to develop a software package in python to interact with a RF ...
3
votes
1answer
65 views

HX711 with RaspberryPi and python

I have been working to create a digital scale for IOT project, using HX711 ADC. The problem Since it is crucial to have wifi connection, I use Raspberry Pi, to control the scale. Everything works well,...
3
votes
2answers
112 views

Error correctly identifying Ls and Rs from measured Vin and Vo in LTSpice

As an exercise (using Python to process LTSpice exported data), I am trying to determine the values of Rs and Ls that were used in a circuit, from the the measurements of Vin, Vout, and the phase lead/...
3
votes
1answer
10k views

Digital Potentiometer (MCP4131) with Raspberry Pi

I'm very new in electronic stuff. I'm used to develop for desktop and mobile applications not for hardware products. I try to wire up my Raspberry Pi board with an MCP4131 digital potentiometer. But ...
3
votes
2answers
2k views

Can't Get Raspberry Pi and Xbee to Work Together

I am having the hardest time trying to get my XBEE's to work with my Raspberry pi (RP). I have one on a USB breakout board into my computer and the other XBEE connected to a RP. The one on the RP is ...
2
votes
3answers
222 views

How can I model an optical filter using python?

Say I have an RGB LED which transmit intensity modulated signals, at one symbol transmission I want to send a symbol with all three chips.. Can I just model three bandpass optical filters like RF ...
2
votes
2answers
4k 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 chart: I have coded the noise and ...
2
votes
3answers
10k 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 ...
2
votes
2answers
3k 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 ...
2
votes
1answer
384 views

Magic number in ADC Pi code

Im trying to measure temperature using PT100. Im using ADC Pi board for that. ADC Pi uses MCP3424(pdf datasheet) A/D converters, and in datasheet I found how to calculate voltage - it is pretty simple ...
2
votes
2answers
330 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? Edit: -> Answer: The program (RFSim99) displays only abs, not squared (which is what I plotted). ...
2
votes
2answers
883 views

Analyzing sniffed data from pins of LCD 2*16 using Atmega32

I sniffed DB4..7 of an 2*16 LCD using the below circuit : (Atmega32.PORTA1..3 is connected to GND) As you see above I connected En pin of LCD to INT0 of Atmega32 (That is configured for Falling Edge ...
2
votes
1answer
28 views

Dotstar Light Strip Low Update Frequency

I've built the start of a persistence of vision display. The rotation platform itself is built and I have just mounted the LEDs. After doing some testing, I can only get very slow update speeds of the ...
2
votes
1answer
1k views

Using Python to simulate an LTspice netlist

I am new to Python, and I want to simulate LTspice circuits automatically using Python. I added the library ltspice and scripted a fair amount in order for Python to automatically generate an ...
2
votes
1answer
46 views

Compute electric field in complex 3D geometry

I have a CAD file with a pretty complex geometry. I would like to compute the electric field generated by this geometry when a specific charge density is defined. I guess I will have to go through ...
2
votes
2answers
512 views

GPIO Input fluctuating between high and low when no input is received

I posted this on the Raspberry Pi StackExchange but I feel as though it might be better suited for here, as the SE is pretty inactive anyway. I've got a fairly simple circuit that I've made where a ...
2
votes
1answer
4k views

Parsing .s2p data through an automation script to plot graphs of the various s-parameters

Need to find a way to quickly decipher and plot s-parameters for tons of .s2p files in a short period of time. In specific, I need to plot the angle of the s-parameters versus frequency and then the ...
2
votes
2answers
103 views

How to customize the 'write' to instrument?

I'm communicating with Power Supply RIGOL DP832A via Ethernet. ...
2
votes
1answer
541 views

Communications issues between Ardupilot and Computer

The Issue and Project: I have been at a standstill with my autopilot because I cannot communicate with it using my high powered transmitter: the Ubiquity Rocket M5. But the whole communications issue ...
2
votes
0answers
69 views

How to calculate the Samples per second possible of a ADC (MAXIM 11605) using i2c with raspberry pi?

I would like to find out how many samples per second this ADC im using is capable of with a raspberry pi using i2c and python SMBUS2 library, but i dont know where to start. As far as i know this ...
2
votes
0answers
39 views

Trinket M0 PWM ValueError: duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)

I'm trying to control a servo motor from a Trinket M0. My circuitpython code is: ...
2
votes
0answers
593 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 ...
1
vote
2answers
997 views

Arduino Pin value gets stuck

I'm using a Python program to send some message over serial port to Arduino. This message contains the pin number of the pin and whether it should be HIGH or ...
1
vote
1answer
154 views

How to find out the used code?

I have a data stream that looks like x\xdam\xdd]\xc4\xeemZ\xc7q)2\xcc\xd6cL\x1a1\x8c\xc9hc\x0c)\xeb^\xaf\xd7Z (...) How can I find out what I do see here? At the ...
1
vote
1answer
1k views

What effect does the frequency have in PWM?

I am programming a PWM controlled breathing LED with RPi.GPIO Library in Python on my Raspberry Pi 2. The problem is I understand what the frequency does and what the duty cycle is but not how these ...
1
vote
1answer
359 views

Serial Link Between 3.3V devices

I have an RPi and a freescale FRDM-KL25z controller which will talk over serial protocol. I'm using the pyserial library on the pi: ...
1
vote
2answers
332 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
vote
1answer
251 views

Microcontroller and SDRAM

I have a project where i need to run a python script on a microcontroller. The python script is basically a GUI based script using pyQt and the internal ram of a microcontroller isn't enough. After ...
1
vote
1answer
365 views

How can I get a C program to execute Python code that sends commands to an Arduino? [closed]

I followed these instructions successfully, so I was able to get the Raspberry Pi to send "HELLO\n" to my Arduino Mega 2560 over USB and print to Serial console. I have installed Open CV ...
1
vote
2answers
582 views

I fried my Raspberry Pi while using L298N but I don't understand why

Everything seems to indicate that I fried my raspberry pi: the green light wouldn't turn on, I changed the SD card for a new one but it still didn't work. That is a shame because I was having a lot ...
1
vote
2answers
1k 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
78 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 ...
1
vote
2answers
766 views

Transfer Function Identification from Impulse Response

I'm working on a system involving a stepper motor that is used for moving a carriage back and forth in a linear motion. I have recorded the response (i.e. carriage position vs. time) corresponding to ...
1
vote
1answer
810 views

High Level Language on an STM32

Are languages like eLua and Micro Python feasible for production level use on an embedded micro like an STM32? There doesn't seem too be much information outside of their sites. Not looking to do ...
1
vote
2answers
65 views

How can I adequately recreate a signal with a biphase line code after band-pass filter in python?

I want to create a python model of a transmitter. The transmitter uses a biphase line code, which looks like this (from a datasheet): Additionally, the datasheet states that the signal is "...
1
vote
1answer
41 views

PCA9456A i2c switch channel 1 not showing up

I am using an PCA9456A i2c switch to help me toggle between i2c devices with the same address, but i am having problems opening channel 1 (second channel out of 4) and i ran out of ideas what is ...
1
vote
2answers
294 views

Writing commands to a microcontroller with a STM32f chip from python

Manual to the micro controller: https://drive.google.com/file/d/0B8PmY6nhQadKSVc5OE04c3ZJaFU/view?usp=sharing , where page 18-19 introduces the serial communication protocol. The micro controller on ...
1
vote
1answer
512 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 ...
1
vote
1answer
156 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 ...
1
vote
1answer
370 views

HC-06 (BT module) becomes un-responsive after ~20 minutes

I am seeing the following behavior on a HT-06 BT module (http://www.amazon.com/gp/product/B009DZQ4MG/ref=od_aui_detailpages00?ie=UTF8&psc=1) wired to an Arduino Uno. The module works great for ~...
1
vote
1answer
2k views

XBee Coordinator API not receiving data from Router AT pin 20

A Xbee Series 2 in Router AT configuration with a potentiometer wiper output connected to XBee's pin 20 AD0 is supposed to send the analog data every 100 ms. It was ...
1
vote
1answer
1k views

XBee + TMP36 temperature sensor - returning inaccurate values

I have rigged up a basic circuit as follows: The XBee is a Pro, series 2. It is configured as a Router using the AT firmware. Pin 20 (D0) is configured as an analog input. There is a co-ordinator ...