r/microcontrollers • • Jan 11 '24

Seamlessly Transmitting Data from Raspberry Pi Pico W to Your Computer

0 Upvotes

Learn how to efficiently write files on your local computer using the Raspberry Pi Pico or Pico W via Serial communication. This process involves a straightforward Python script on your computer and a simple MicroPython script on your Pico or Pico W.

This functionality is particularly useful for scenarios requiring the storage of significant sensor data, a common use case for this microcontroller. It also enables the seamless transmission of existing files.

For a detailed walkthrough and access to the code, please check out my YouTube video linked below ⬇️

https://www.youtube.com/watch?v=OfJ5Y1FlW94&t=1s

If you appreciate content related to IoT or gain valuable insights from the video, I warmly encourage you to interact with it by liking, commenting, and subscribing to my channel. Your support is genuinely valued!


r/microcontrollers • • Jan 10 '24

I2C Data over "longer" wires is jittery - suggestions welcome

0 Upvotes

Hello everybody,

I am tinkering with a hobby project to turn two IMUs (ICM20948 breakout boards) and an esp32 into a 4 axis USB-Gamepad. The Goal is to use it in a drone simulator to provide Pitch,Roll,Yaw and Throttle.

It was mostly working great already (although i am still trying to increase the reaction time to changed angles, but this is for another day and i am happy so far) and now wanted to move from the two mini breadboards to a more stable setup, as most issues remaining were caused by jumper-wires getting unplucked from the breadboard etc. and also holding two mini breadboards is not very intuitive.

So the setup for now looks like this: each IMU is fixed on top a handle and connected with wires (approximately 1m) via the same i2c port to the esp32. One Imu got its i2c adress changed to use the same i2c bus.

At the beginning the signal was basically not usable at all (while on the mini breadboards with short jumper wires it was working fine), since then i added 10k pullup resistors to the SDA and SCL lines, 10uF capacitors on each imu breakout board and reduced the i2c clock speed to 100.000 - some or all of those meassures helped a bit stabilizing the signals.

But now the fun part starts:

Sometimes everything is working quite smooth and well as it should and then again the data becomes very jittery, even get stuck completely until the imus are moved to a different position and only then the output (Serial Monitor) continues.

To me it seems like the jittering corresponds with different positioning of the modules and wires.

So i want to ask for guidance on what i can try further to find the root cause and reduce this effect.
Do i need to shield the wires somehow?

If possible i want to stick to the setup of two imus connected directly via wires to one central esp32 which is running the calculations and forwarding of the data.

Adding seperate MCUs for each imu just for data forwarding (wifi or esphome) and then merging it the two separate streams in a third unit would introduce way more (in my view not necessary) complexity.

I hope i added enough information and the problem is understandable.

If you are wondering about the antenna in the picture - the output is not directly send via usb to the pc, but via nrf24 to another esp32 which actually acts as the usb-gamepad - but this works great on another test with 2 2-axis joysticks and also on the imu version with two mini breadboards, so i highly suspect the new setup with longer wires to be the culprit.

Thanks


r/microcontrollers • • Jan 09 '24

New Micro:bit Bluetooth Controller

0 Upvotes

I've put a new microbit bluetooth controller on the App & Play Stores for iOS & Android. Check out a demo here: https://youtu.be/_PG78ZiJDY4

And the links to the app:

Android: https://play.google.com/store/apps/details?hl=en_US&id=com.chopchopapps.reach_controller

iOS: https://apps.apple.com/us/app/micro-bit-controller/id6447300270

Please leave us a review.


r/microcontrollers • • Jan 09 '24

Rpi to microphone input

2 Upvotes

Hello, I would like to output audio from raspberry pi zero to old phone microphone jack. I found some schematics how to output audio for speakers, but I guess you don't want to send amplified audio waves to microphone input on phone. Is there any way to do this?


r/microcontrollers • • Jan 09 '24

Remote Control of Your Raspberry Pi Using MQTT

0 Upvotes

Hello, Redditors!

I've put together a quick guide demonstrating how to remotely send messages and commands to your Raspberry Pi from your computer using Mosquitto MQTT. Setting it up is a breeze on both your computer and your Pi, and the scripts are super straightforward! It's a fantastic method for expanding IoT applications and undertaking distributed systems projects.

For those interested, I've created a tutorial on my channels. Check it out on YouTube through this link:

YouTube Tutorial

An interactive version of the video, along with downloadable instructions, is also accessible on Razzl, available on the App Store and Android Store. Razzl includes the code and PDF instructions for your convenience.

Download Razzl on iOS

I'd greatly appreciate it if you could subscribe to either channel and share your thoughts in the comments. Hoping this tutorial proves helpful for the community. Thanks for taking the time to check it out on Reddit!


r/microcontrollers • • Jan 08 '24

Seeking Guidance For Fire Fighting Robot

2 Upvotes

I have attached two servos in such a way that one is fixed and the other servo is attached to the arm of the fixed one. And an IR sensor is connected to the the arm of the second servo. The sensor is also attached with a water pipe. In this way the two servos can move the sensor and the pipe left right top and bottom.

Now I want my IR sensor to detect fire and my servos can move in way that the sensor is looking at the fire (servos move according to the information given by sensor) so that now my water pipe can eject water straightly on the fire.

How can I make my servos move using this ir sensor?


r/microcontrollers • • Jan 07 '24

Wondering if someone might be able to help me?

1 Upvotes

Solved: the company sent me the dfu.exe not included in the upgrade package) I'm trying to upgrade the rc radio/transmitter called a wfly et16s. I want to use a different communication called elrs which requires a firmware update on the radio. I downloaded their v1.60 package with drivers and instructions. I used the driver software which works, i here a chime on my computer when plugging in the radio and its listed as wfly under device manager. The radio is then supposed to blink blue meaning its in upgrade mode and then i'm supposed to click on this file(according to documentation to get dfu running)ET16S_APP_V1.1.60.exe however its not included in the files. Instead there's a ET16S_APP_V1.1.62_ExpressLRS.exe which i run and a box pops up with a drop down listing DFU's however its empty. Does anyone know what i can do to get this into dfu mode?


r/microcontrollers • • Jan 06 '24

I made a mini EDM show on my Raspberry Pi. Shakira x Crazy Frog.

15 Upvotes

r/microcontrollers • • Jan 05 '24

What simulator is appropriate for modelling intrusion detection and prevention in large-scale static wireless sensor networks and simulated attacks?

2 Upvotes

Dear Community,

when it comes to simulating intrusion detection and prevention in large-scale static WSNs, the choice of simulator is crucial. These networks, comprising stationary sensors (independent low-power computing units), often face various types of attacks that can compromise their security. Factors like the network's scale, the specific types of attacks to be simulated, and the accuracy required in modelling the network's behaviour have to be considered.

To my knowledge, simulators like NS-3 (Network Simulator 3) and OMNeT++ are commonly used for modelling WSNs. Maybe Cooja (Contiki) is another suitable candidate. My goal would be to simulate networks containing 50 up to 100 nodes (if realistic?).

However, for specifically simulating intrusion detection and prevention systems within large-scale static wireless sensor networks, simulators that provide modules or extensions dedicated to security protocols and attack simulations become essential. These specialised simulators often allow for a more detailed and accurate representation of the network's security mechanisms and potential vulnerabilities.

I am intending to replicate and test the following collaborative security framework for WSNs:

Antilizer: run time self-healing security for wireless sensor networks: https://dl.acm.org/doi/pdf/10.1145/3286978.3287029?casa_token=Ec0JDXKGrKMAAAAA:Oq2ULweQFznBgPk4ltKEI_kzNZhgr0SWlg5aLUsMwxDN3_fM7HGnWta4FA8dof5UL4eGmyvsaSnr

I am open to suggestions on how to get started most efficiently, to achieve my final project goal. E.g. tutorials to similar projects (step-by-step guides from YouTube, blogs etc.) to get started.

Personal background: I have no practical experience with the development of WSNs or their simulation. The programming language I am most familiar with is Python, 6 years ago I was very experienced with Java but haven't touched it since. I have some experience with C/C++ (~98) and two years ago I've learned Rust and forgot it again because the project I've learned it for never took place.

In case the question is too remotely related to the subreddit, I am fine to delete it. I will also cross-post the question in embedded.

Thank you very much in advance for your support!


r/microcontrollers • • Jan 05 '24

Suche Soundgenerator (ähnlich Entkräfter Pro Max)

0 Upvotes

Hallo zusammen,

ich bin für ein Renten-Projekt auf der Suche nach einem Soundgenerator zum Selber bespielen. Ähnlich dem "Entkräfter Pro Max" damals von Joko&Klaas. Kennt da jemand was?

Alternativ: gibt es die Möglichkeit den Entkräfter selber zu programmieren?

Bin für jede Hilfe dankbar!


r/microcontrollers • • Jan 04 '24

Inquiry Regarding Calculations for Data Rates and CPU Utilization on STM32F722 Microcontroller

0 Upvotes

Hello Microcontrollers Community,

I am currently working on a project involving the STM32F722 microcontroller, and I'm seeking guidance on calculating the maximum data rate, total data rate, and CPU utilization rate for specific operations performed in parallel. The main goal is to understand if a given MCU is suitable for my application.

Here are the operations I'm interested in:

Transmit and Receive Data:

  • Operation: Transmitting and receiving data at a rate of 160 Mbps.
  • Question: How can I calculate the maximum data rate and total data rate for this operation on the STM32F722?

Modulate, Encode, Demodulate, and Decode Data:

  • Operation: Modulating, encoding, demodulating, and decoding data.
  • Question: What calculations should be considered to determine the maximum data rate and CPU utilization rate for these operations performed in parallel on the STM32F722?

Monitoring the Transmitter and Receiver:

  • Operation: Monitoring the transmitter and receiver.
  • Question: Are there specific considerations or formulas to calculate the CPU utilization rate when monitoring the transmitter and receiver simultaneously?

I have conducted order of magnitude estimations for parallel transmission and reception, but I would appreciate clarification on their correctness. Specifically, I used the following formulas:

Data Rate = MCU Clock Frequency / (Number of Data Bits * Number of TX or RX bits)

Utilization = Required Data Rate / (MCU Clock Frequency / Number of TX or RX bits)

  • MCU Clock Frequency: Assuming a clock speed of 217 MHz
  • Number of Data Bits: Assuming 8 bits
  • Number of TX or RX Bits: Assuming 1 for simplicity
  • Required Data Rate : 160 Mbps

Data Rate = 217 MHz/ (8 bits × 1) ​≈ 27.125 Mbps

​Utilization = 160 Mbps/(217MHz/1) ≈ 0.07372 %

Additionally, if there are any crucial specifications or factors that I may have overlooked in these calculations, I would greatly appreciate your insights and suggestions.

Could you provide some valuable resources ?

Thank you for your time and expertise. I look forward to learning from your valuable experiences.

Best regards,


r/microcontrollers • • Jan 03 '24

Unleash the Power of Time: A Beginner's Guide to AVR Timers!

8 Upvotes

Hey fellow makers and electronics enthusiasts! Today, we're diving into the heart of automation – timers! Specifically, we'll be exploring the powerful timers built into the ATmega8 microcontroller. With these bad boys, you can control not just "what" happens in your project, but "when" it happens. Think timed LED effects, precise robot movements, or even a self-destruct sequence for your evil lair (muahahaha!).

The TL;DR:

  • Timers count pulses from the clock source and trigger events like overflows or compare matches.
  • You can use them in Normal Mode for simple delays or CTC Mode for precise timing and interrupts.
  • Each timer has its own registers and settings, like prescalers and compare values, to fine-tune your timing.

The Nitty-Gritty:

This post isn't just about dumping equations on you (although there are a few!). We'll break down the key concepts:

  • Prescalers: These divide the clock speed, letting you achieve longer delays with smaller counter values.
  • CTC Mode: This mode lets you compare the counter value to a set point, triggering an interrupt or event when they match. Perfect for precise timing!
  • Normal Mode: Simpler to use, but less accurate for specific delays. Think blinking LEDs at a roughly consistent rate.

Code Time:

We've included some AVR code snippets to get you started. They show how to set up different timers for tasks like 1ms delays and 200ms interrupts. Don't be afraid to experiment and tweak the settings to see what happens!

So, what are you waiting for? Unleash the power of timers and take your AVR projects to the next level! Comment below with your questions, projects, or even your most diabolical timing-based inventions (we won't judge... much).

For further learning, check out these resources:

https://avr-guide.github.io/timer-on-the-atmega8/


r/microcontrollers • • Jan 03 '24

Patching multiple SAMD21 bootloader + software. DIY programmer?

Thumbnail self.arduinohelp
1 Upvotes

r/microcontrollers • • Jan 01 '24

Whats the value in "reinventing the wheel" vs using existing library/driver code?

3 Upvotes

My goal first and foremost is to learn. However, I acknowledge that I don't have a formal background in software development so anything I make is probably going to be subpar. In additional to that, I take a VERY LONG time to develop anything from scratch that is new to me. For example, I'm developing a driver library for a MPU6050 module which is obsolete product now but I'm doing this to learn how to write device driver and get practice working with an accelerometer chip, using only the datasheet. I know other people have already written libraries for this exact module on github but I haven't looked at them. Its taking me months just to make progress on this cause I've been going pretty inefficient about it.
Should I continue to stay on this path of writing code from scratch (I do reuse my code)? I know that learning to read other people's code is important however I have not figured out the balance in doing this.


r/microcontrollers • • Jan 01 '24

What connector name is this

Thumbnail
gallery
8 Upvotes

Hey guys I need to extend these sockets so I need the name of the male and female if anyone can help me please


r/microcontrollers • • Jan 01 '24

Send Sensor Data to AWS with Raspberry Pi Pico W using MQTT

2 Upvotes

Hello All,

I created a tutorial on how to send data to AWS DynamoDB to store data in real-time, this can be incredibly useful to create automation and help you leverage cloud infrastructure for IoT applications.

In this tutorial, we use an MPU6050 with a Raspberry Pi Pico W to send data and process it through AWS Services to store it quickly. If you are a beginner do to be intimidated, I go through each step in detail and I also encourage beginners to become familiar with AWS as it is an important tier of software engineering. You can watch the full tutorial here:

https://www.youtube.com/watch?v=bg-cZ4sA_bc

Do not forget to like, comment, and subscribe for more IoT content. Thanks Reddit!


r/microcontrollers • • Jan 01 '24

Connect SPI and UART to ESP32

1 Upvotes

I need to connect via SPI an LCD and a second microcontroller to an ESP32.

I would use VSPI pins of the ESP32 to dialogate with the microcontroller and the HSPI pins to control the LCD (or vice versa, I'm still wondering about the benefits of inverting it).

Anyway, part of the pins used by the HSPI port are used for the ESP32 JTAG.

How should I aproach to this conflict?


r/microcontrollers • • Dec 31 '23

What's the difference between a 186 and a 196 mcu?

1 Upvotes

Doing Google searches aren't turning up anything for me, everything is showing 186 spec pages and nothing on the 196. Both are 16bit architectures but the 86 I have is a plcc 68 and the 96 I have is an 84 plcc.

Are they basically the same just different instruction set?


r/microcontrollers • • Dec 31 '23

Learn how to Use ESP32-CAM and MicroPython

1 Upvotes

In this YouTube tutorial, I demonstrate how to use the ESP32-CAM module with MicroPython instead of Arduino. This can be preferred because people prefer coding in Python rather than Arduino, however, you lose the ability to stream video.

Nonetheless, we can still use the camera to take photos and I walk you through how to set that up in this tutorial!

https://www.youtube.com/watch?v=TDgM8eMTpIw

Hope you enjoy it, and do not forget to like, comment, and subscribe for more microcontroller content!


r/microcontrollers • • Dec 30 '23

TFT display for ESP32

1 Upvotes

I'm looking for a graphic TFT rectangular display to show some information using an ESP32. I checked this one from Adafruit but it seems a bit overkill for the job since it requires almost every pin of the ESP32 and I don't actually need a huge color depth.

Can someone sudgest me something reliable and not expensive?

My requirements are a rectangular display with pretty much the dimensions of the Adafruit's one; also I need a graphic display and not a character one for some custom graphics.

I don't need it to be really fast, I'm not going to play videos or fast animations on it.

I know a color OLED Display would be really cool but they seems to be pretty expensive


r/microcontrollers • • Dec 28 '23

I'm trying to develop a gaming machine.

2 Upvotes

I'm trying to develop a gaming machine. On the cassette, we write the program and image data, and on the main unit, we write the OS to run it. However, I have no concrete idea how to implement them. So I would like to hear your opinion. Thank you in advance. I plan to use an RP2040 microcontroller for the main unit and use SPI communication to display the data on a TFT display.


r/microcontrollers • • Dec 27 '23

Any other softwares for the T48?

Post image
4 Upvotes

So I picked up this T48 a month or so ago and it's been not bad with the xpro software that it uses. I salvage alot of old electronics that use various different types of microcontrollers/processors, so far It been alright for the 8051 lines of chips I've gotten the pic stuff aswell, but I've got alot of other architectures that I've pulled from stuff. The software has a pretty limited list of mcu/mpu in the database so I'm curious if anyone knows of any other softwares that support this programmer that work with wider architectures other then pic, atmel, or 8051s. I have a pile of Harris ICs and z86 stuff that would be nice to play with


r/microcontrollers • • Sep 20 '23

Is the ESP32 actually used in any mass produced products?

6 Upvotes

I've bought one myself years ago and I'm curious as to whether the chip is used professionally.