[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/diy/ - Do-It-Yourself

View post   

[ Toggle deleted replies ]
File: 14 KB, 224x224, 20180914_PADAUK-Tech-PMS150C-S08_C129127_front.jpg [View same] [iqdb] [saucenao] [google] [report]
1758827 No.1758827 [Reply] [Original] [archived.moe]

Previously /amg/ - arduino & microcontroller general.

Coronavirus imbued MCUs edition

Microcontrollers (esp32, blue pill, arduino, ...) & single board computers (Raspberry Pi, Banana Pi, ...) welcome.

>What to post
- Questions regarding microcontrollers & single board computers
- Discussion regarding microcontrollers & single board computers
- Projects you are working on

>What should I do with my [insert hardware]?
Look here:
https://www.reddit.com/r/raspberry_pi/ aka everyone is making magic mirrors
- This is not an idea thread. Check the catalog, or make a thread for it.

>Usefull resources:

Your chipsets default IDE

>General electronics, also check their OP

>Questions regarding software/OS on single board computers, unless specifically about GPIO

>I have junk, what do?
Get rid of it.
Old thread: >>1741001

>> No.1759226
File: 130 KB, 850x1074, sample_e068dcbdb98bd8d9baa5ad55e8c40a84.jpg [View same] [iqdb] [saucenao] [google] [report]

What are some resources about SBCs? I'm lost on what to get for specific budgets and applications.

>> No.1759933

How do I power something like an esp32 with a battery?
I only used USB cables and the like till now.

>> No.1759942

This, for example?

>> No.1759950

Hey guys, what is the most appropriate fpga
development board for beginners?

>> No.1759984

2x 18650 cells with 7805 to knock voltage down

1x 18650 with board to step up to 5v

>> No.1760000
File: 8 KB, 849x320, 5v_Is_this_right.png [View same] [iqdb] [saucenao] [google] [report]

I'm trying to do battery powered lighting under a pool table, but I don't know much about this kind of thing. Using an ESP8266 w/ a simple FastLED library design.

I've got two (2) 25800mAh 5v power banks. Would this be the way to hook them up to the length of addressable LEDs? (WS2812B 5v).

Thank you for your help.

>> No.1760002



>> No.1760032

I ordered my first off aliexpress. $35 delivered. Cyclone IV, vga port, ps2 port, IR and remote, led displays and switches, all the goodies, even came with a (certainly knockoff) USB blaster. It's a knockoff of a similar board I found on ebay for $330. SHould be enough for what I want to do, which is 1.) start learning about FPGA's since I've never done any hands on and 2.) eventually move up to emulating old 8-bit CPU's and play with making my own CPU core designs

>> No.1760419
File: 98 KB, 608x609, 1580412348639.jpg [View same] [iqdb] [saucenao] [google] [report]

Not sure where to post this, but I've got one of these cheap 433mhz receivers hooked up to an arduino nano using the rc-switch library, but it's not super accurate.
Searching around most people seem to say that you should use a 17cm length of wire instead of the metal coil it comes with, but I'm not sure if that will actually fix my accuracy problems.

>> No.1760569

Write your own protocol that does error correction.

>> No.1760572

Thanks, I will look it up

>> No.1760598

I went back and looked at my board, it's called an rz-easyfpga a2.2
Still trying to find time to play with it.

>> No.1761207
File: 28 KB, 1603x769, schematic.png [View same] [iqdb] [saucenao] [google] [report]

Electronics noob here, hoping someone can help me out with an issue.

I've got a PCB I had fabricated based off a kicad schematic, excerpt pic related. There are 4 CD4021BE ICs, each with switches connected to the parallel input pins, forming a keyboad, as well as some additional switches.

SW102 doesn't register presses at the arduino for some reason, but every other switch on the board does, and I'm not sure what the issue is. On the board, multimeter tells me that switch operates fine and there's no shorts or bad solder connections.

Any ideas what I've done wrong? I'm at wits end, but also I expect the problem to be stupidly simple.

>> No.1761209
File: 57 KB, 1269x824, footprint.png [View same] [iqdb] [saucenao] [google] [report]

Footprint. I've removed the copper pours for gnd and +5v from kicad for that screenshot for easier viewing, but they exist on the fabricated board. You can see the trace from SW102 to R194 to pin 1 on P104, a CD4012BE IC.

>> No.1761210

I want a bluetooth on/off switch to add to various electronic circuits. How cheap can I do this?

>> No.1761366

Not the same Anon, does this things transmit in different channels? I have a wireless doorbell that I believe transmits in 433 and I want to hook it up cheaply into an MQTT server

>> No.1762051

Probably about 2-3$. Look for bluetooth activated relais modules.

Alternatively you want a bluetooth module, relais and some way to convert serial to a digital IO. Save yourself the effort and just get a bluetooth relais module. If you want to design your pcb, get some microcontroller with bluetooth already, add anything to control bigger currents and voltages. Depending on where you want to use it, I'd look for Relais, Transistors or Mosfets.

>> No.1762850
File: 94 KB, 834x712, 7309e812048a982acd53622802e15126.jpg [View same] [iqdb] [saucenao] [google] [report]

Reposting from lain
I'm looking to build an USB oscilloscope, however, I'm lost at what kind of MCU/MPU to use, I'm looking for a low amount of GPIO pins (only for a bit of control and for 2 channels), high-res ADC and a sampling rate about 2MHz, if it is powerful enough for an FFT + Window thats also alright, however, most heavy-tasks will be handled by the USB-Host.

>> No.1762979 [DELETED] 

Here is an infographic. In short the Odroid C2 wins, but the picture is a bit old and now the Odroid N2 has beat that. Of course is not listing the Rock64 and others so you still have to check those. I had made a little research and the N2 still beats everything but the Rock64 might be on par.
Of course your needs might not be the same, as you can see specs are mostly about video, the HC2 is all about USB3, and the N2 not mentioned here supports even better video resolution and codecs.
I believe the /hsg/ on /g/ still maintains some notes on SBCs.

>> No.1762981
File: 117 KB, 1431x530, List-of-Single-Board-Computers-Raspberry-Pi-Alternatives-1.png [View same] [iqdb] [saucenao] [google] [report]

Here is an infographic. In short the Odroid C2 wins, but the picture is a bit old and now the Odroid N2 has beat that. Of course is not listing the Rock64 and others so you still have to check those. I had made a little research and the N2 still beats everything but the Rock64 might be on par.
Of course your needs might not be the same, as you can see specs are mostly about video, the HC2 is all about USB3, and the N2 not mentioned here supports even better video resolution and codecs.
I believe the /hsg/ on /g/ still maintains some notes on SBCs.

>> No.1763389
File: 326 KB, 452x451, fpga.png [View same] [iqdb] [saucenao] [google] [report]

I ordered this bad boy for 45$
I'm planning to do some stuff with image processing and video encoding

>> No.1763462

I just picked up a pi4 4gb and an ardruino kit. Cool

>> No.1763491

A USB oscilloscope is a big and rather difficult project. Judging from your question you dont have a good skillset in embedded microcontrollers, probably you dont know much about high frequency system design either.
If you need an Oscilloscope, buy one. It will be worth every penny. I recommend the Agilent 54622D or Agilent 54624A. You can get one for under 200€.

If you want to attempted to build a device which can sample , digitize and send a signal to a pc pick a ADC of your choice and hook it up to a raspberry pi, that way you wont run into issues with processor speed and you dont have to be familiar with the microprocessor architecture.
There many similar projects on the internet, look for data acquisition system .
With a raspberry PI you will be able to design and construct what you have in mind

>> No.1764496
File: 231 KB, 653x1000, e40ed5fb028a22987544efa573ca8193.jpg [View same] [iqdb] [saucenao] [google] [report]

Do you know about any resources dealing with high frequency system design and embedded microcontrollers? Art of electronics has a section on MCUs but I really don't know where to start on high frequency systems.

>> No.1764647
File: 181 KB, 597x476, 86d80f5a5b1a4ee8aa15ce51ed829669.png [View same] [iqdb] [saucenao] [google] [report]

What are you doing with them?

>> No.1764665

Garbage. If you wanna do spectrum analysis you go with a swept-tuned super-heterodyne topology or bust. FFT is shit and always will be.

>> No.1764893
File: 21 KB, 446x291, Capturar.jpg [View same] [iqdb] [saucenao] [google] [report]

How do you program pic related?

>> No.1764919


start by identifying it

>> No.1764939

He wants to sample at only 2MHz. That isn't hard.

>> No.1765159

For my pi, no hardware projects in the near future yet. I got it setup with Ubuntu server 19.10. My plan is to do some testing and learning with docker images, web apps, and SQL servers.
Once I finish with that I might consider a project with hardware integration.
My arduino kit came with exactly the hardware I wanted, back in highschool (5 years roughly since I've been in) I did an rc car, LEDs, motors n such through a parallel port to a breadboard. I forget how all of this works so with the arduino I will be practising with LEDs, Motors, switches n such again. The kit actually comes with an IR sensor too which is cool.
Overall my goal is to get familiar with hardware project and make some sort of IoT device

>> No.1765621
File: 359 KB, 800x533, pizzero.jpg [View same] [iqdb] [saucenao] [google] [report]

The Raspberrying Pi Zero was a great idea:
- dirt cheap
- same size as your dick
- wifi & bluetooth
- micro USB OTG
- EMC/RoHS compliance
- in production until January 2026

Yet it has a number of moronic idiosincracies:
1. has useless HDMI and camera ports
2. USB ports on the wrong (long) side
3. demands 5V supply

First of all, such a tiny piece of hardware is clearly not intended for desktop and data-center projects. In other words, it doesn't need an HDMI port. Why were they so gay to add a microHDMI instead of letting out its SPI and audio output only?

Camera port is also wasted 99% of the times. Why were they so gay to add a camera connector instead of saving up space, traces, parts, costs?

Then there are those two microUSB prots on the side. Why were they so gay to place them there instead of the short side? That means a normal project cannot take advantage of the small width.

Then there's the gay 5V supply. Yes, I know it is required for proper USB work. But almost everything on a Pi Zero works on 3.3V.

It would have been definitely great if it only required 3V, because a nominal 3.7V battery (ranging from 3.1-discharged to 4.3-charged) would have been enough without need to stepup-stepdown-stepaside-stepmom.

Such a tiny beast is literally inviting you to cute projects. Install it into some old toy. Install it into your sleeve. Install it inside some pipe. Inside the frame of your bicycle. NAY!!! The gay designers decided it had to be 5V microUSB power supply. And on the side. And if you want to push 5V directly in, you have to solder on the PP1/PP6 pads. What. The. Gay. Fuck.

Oh, but there's plenty of third party solutions. Like the JuiceBox, pretty well done. Excep it adds quite the vertical bulk. And it costs $34. Thirty-fucking-four dollars. I bet the designer didn't laugh when Apple demanded $999 for a fuckin monitor stand.

Man, I hate braindamaged products. A small project that could fit in my hat sports HDMI and requires an USB powerbank. WTF.

>> No.1765643

rpi's are not conducive to battery power, they have no low power mode, and take forever to boot up. You just would never choose one to use with battery.

I'm not disputing your other points, but they aren't the right choice for "in the field". For example, i use one in a product, but it only gets turned on when back at base station and charging.

>> No.1765647

>Then there's the gay 5V supply. Yes, I know it is required for proper USB work. But almost everything on a Pi Zero works on 3.3V.
>It would have been definitely great if it only required 3V, because a nominal 3.7V battery (ranging from 3.1-discharged to 4.3-charged) would have been enough without need to stepup-stepdown-stepaside-stepmom.
Just get a 30 cent power bank module from Ali.

It requires 5V anyway to provide a USB Host and HDMI.
You can actually run the Pi Zero with 3.4V (anything less is too little for the 3.3V regulator to work with) if you disable both those things.

Something complex like that needs a fairly precise regulated voltage, you're never gonna run that stable with just 3V directly.

>> No.1765820

Help me out here please fellas.
I'm fairly new to the whole Arduino thing, but I have a basic knowledge of electronics and the theories behind them. Basically what I'm trying to do, is make a gameroom table, that when you sit down, your side of the table lights up. Each of the sides would have a different color. I can't decide whether I should use one long rgb strip that's addressable, or multiple different strips set to one color. Wiring and hooking them up is no problem for me. But when coding, how exactly do you change the color of say 15 LEDs, in an addressable strip of 150 of them? I've seen several different sensor types that I could use, and so far the best/easiest way would be for a PIR sensor under the table but at the edge close to the seat. If anyone has any other ideas for sensors I could use, I'd really appreciate the help.

>> No.1765876
File: 597 KB, 2048x1536, IMG_20200211_135415.jpg [View same] [iqdb] [saucenao] [google] [report]

My raspberry 4 just arrived. It is so cute yet super strong. can handle two 4k displays at the same time.
I got the 4gb version which is currently state-of-the-art in fruit technology. Can't wait to try it

>> No.1765906

Basically, I would say addressable, because you don't need to do anything beside coding, even if it's more expensive. But if you can make the required circuit for the rgb strips, and don't think you want to create more complex animations, stick with the rgb.
If you use addressable, I think the WS2812B is suitable. You can download the FastLED library for Arduino, you should look up some videos about it, or tutorials, but basically, you can tell the microcontroller, that you want 7th led to be red. The first led on the strip is indexed 0, the second 1 etc. If you know, that every side will have 30 leds, for example, you can just write a little for cycle that triggers when someone sits down, that goes through the first 30 leds and sets them green, or someone sits down next to him, and leds from 31 to 60 turns red. If you wish, you can even program animations into it. I would say it's a good choice, and there are a lot of great tutorials for the library. If you have programming skills different than zero, I think you won't find it hard.

>> No.1765930

PIR would work, if you set the sensitivity up, set it to retrigger and set a long time after trigger. PIR is not always effective, some smart ass decided to put PIR sensors on our classrooms to save energy when there was nobody there. With the students and teachers sitting still this would result in lights going out every 10 minutes or so, and having to do the wave each time.
I'd go for adressable too, you can always add more effects afterwards if you wish.

>> No.1765937

PIR alone isn't enough for room occupancy. The best is PIR+ultrasonic combo. But he wants to detect butts in a chair? Ultrasonic under the table might work, but I guess if he can take the chairs apart, some kind of pressure sensor could work too. It could be as simple as two layers of aluminum foil with a sheet of plastic in between with holes punched into it.
t.used to dev on building lighting systems

>> No.1765945


>> No.1765948

how do I program Cortex-M4 based microcontroller?

>> No.1765969
File: 690 KB, 900x593, file.png [View same] [iqdb] [saucenao] [google] [report]

Has the ricing gone too far?

>> No.1766074

Ignore the shitty grandpa advice from the other two and use a single camera with a vision api to solve this problem.
You can use facial recognition to give each person different color or effect so use RGB led strip. And that way you can have the person si anywhere he wants and it will play the correct effect for him

>> No.1766175

Where can I get a RPi Zero for a reasonable price? I don't know where the '5$' price comes from since I can't find anywhere where it is stocked and at that price.

>> No.1766178

Same question in general for all SBCs too, might be useful in the future.

>> No.1766339

probably only in clappistan
i checked any my stores sell it for $15

>> No.1766396

This is stupid. I am sure it has LDO internally to drop from 5V to 3.3V. are you sure there's no 3
3V pin on it so it could be fed avoiding LDO?

>> No.1766649
File: 186 KB, 510x510, file.png [View same] [iqdb] [saucenao] [google] [report]

esp32 is a chip you tard, you need to specify how you are using it
what i assume you mean is the devkit 1 board which has generic ldo so read the number on it and google a datasheet for it
my guess without looking anything up is it can handle up to around 16V, and you connect it to the vin pin

>> No.1766655

Dude, are you actively trying to win the Grand Moron of the Year award prize?

shaves off voltage while wasting current and getting insanely hot.
say, 7.5V in, shaved one third to drop to 5V, sucking 200mA @ 5V, actually demanding 300mA off 7.5V (aka 2.25 watts)
basically you waste more than half the power because you're applying a 7805 on fuckin batteries. M-O-R-O-N.

>step-up to 5V
that's the usual answer, yet it means more circuitry and some oscillating (aka extra noise/interference).

>> No.1766659
File: 2.00 MB, 313x238, BANANA DOLE-MAN.gif [View same] [iqdb] [saucenao] [google] [report]

>be me
>willing to buy some 15-20 raspberry Pi Zero W for a cute project
>mission: impossible
>5 vendors in my country (Europe), 3 of them have it "out of stock" since ages, fourth one has it "coming January 2020 - not yet available" (yes, to date it's still "coming Jan 2020"), fifth one has it but only 2 available and it ships from a different country. 17 bucks each. Excuse le fuckin me, but le fuckin what?
>not considering ebay because ebay is cancer
>scared about cheap shit off china - friend ordered 500 MOSFETs for 35 bucks and he got 500 legit retarded cheap transistors

So, we're in 2020 and le epic meme of le $5 Raspi is still a meme.

>> No.1766700

The Zero W was never 5$, only the normal Zero.

The Pi guys are kinda retarded because they insist on only producing them in production facilities in Wales that can't keep up with the demand.

>> No.1766986

>can't keep up with the demand
and charge premium
if the outsourced to a chink factory not only could they shit them out 100 times faster but also at half the price

>> No.1767143
File: 183 KB, 600x600, 15775-Pimoroni_Aluminum_Heatsink_Case_for_Raspberry_Pi_4_-_Gunmetal-02.jpg [View same] [iqdb] [saucenao] [google] [report]

I bought some aluminum tubes with the intent of making a water cooled version of pic related. By that I mean I would just bend a tube into a u-shape, solder it to the top of this case and connect it to a pump/radiator.

>> No.1767152

but why? raspberry pi 3 can run easily without any extra cooling at all
pi 4 is fine with just that small passive cooler on it in 99% of the cases
and if you use it for something that really loads the cpu and gpu constantly a small fan on top of the passive will cool it no problem
anything more is a total waste of money and resource and nothing more than rice
you think you riced out raspberry pi will get you a slice of the stacy's strawberry pi? nope

>> No.1767169

not if you're running that thing under full sun for the entire day

>> No.1767179

>raspberry pi 3 can run easily without any extra cooling at all
By throttling

>> No.1767183

no, extra cooling is only needed if it runs under full load for extensive periods of time which is almost never
i have several of them i run 24/7 and none of them has anything more than the small black passive blocks on the cpu and they get only warm at most because like i said running them at full load constantly is extremely rare and 99% of projects don't do that

>> No.1767185

how do you know what anon needs though?
maybe he does need it cooled.

>> No.1767346

Because I'm him from the future and I will regret wasting money on pointless RPI cooling every day for the rest of my life

>> No.1767742 [DELETED] 
File: 1.09 MB, 1920x1080, output.webm [View same] [iqdb] [saucenao] [google] [report]

Two questions:
1. Why are all the LEDs except the one connected to RX so dim? Have I damaged the chip?
2. Why doesn't TX behave like a normal output and is always on instead?
Code: https://termbin.com/aqu8
This is of course a Chinese clone, not an original.

>> No.1768080
File: 33 KB, 778x818, board.png [View same] [iqdb] [saucenao] [google] [report]

i've never used an esp8266 without a master microcontroller. what's the absolute least painful toolchain for programming these things? i only need the tcp stack for getting an accurate clock, something i can hopefully copy and paste. i can accomplish the rest of what i need through retarded bit banging so i'm just after the toolchain least likely to drive me to suicide.

>> No.1768157
File: 1.98 MB, 1920x1920, 1563537123829.png [View same] [iqdb] [saucenao] [google] [report]

I want to give my ESP8266 32io pins. What IC should I look for? I want to read key matrix with it.

>> No.1768173

> i've never used an esp8266 without a master microcontroller.
lol, what?
> what's the absolute least painful toolchain for programming these things?
Just install esp8266 for Arduino.
OR flash micropython, then you can just write python and not give a fuck.
download firmware pre-built for 8266, download esptool, lern2webrepl to upload files, eventually upload main.py which runs on reset, ??? profit.

>> No.1768191

>download firmware pre-built for 8266, download esptool, lern2webrepl to upload files, eventually upload main.py which runs on reset, ??? profit.
thank you for the espduino rec because this does in fact sound like something that would drive me to suicide

>> No.1768285

I just updated the firmware on my USBasp clone with the usbasp.atmega8.2011-05-28.hex, and it verified the update. My USB controller also recognises it as a USBasp version 1.04, with PID 0x05dc and VID 0x16c0. But when I try to program anything with it or even just enter:
>avrdude -cusbasp -pm8
It shoots me down with:
>error: program enable: target doesn't answer. 1
>initialization failed, rc=-1
>Double check connections and try again, or use -F to override this check.
The connections can't be wrong because it's not plugged into anything but the computer via USB (half the online guys were just saying that their breadboards were the problem). When I put -F there too it tells me:
>could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'
Even though that's exactly what my USB controller tells me is connected. I even soldered a large cap across Vcc and GND just in case there's too much ripple there, but measuring it with a scope there's basically no ripple at all. My fuses are E:FF, H:D9, L:9F, meaning reset isn't disabled. I'm not on a windows machine so I don't need drivers for it AFAIK.

Anyone know what's up?

>> No.1768293

I've worked out that the shiftin seems to offset the bits by one. So, with the following code it means that the switch on PI-1 (pin 7) should be the most significant bit 0x80, but it is read in as the second most significant bit 0x40. It also means that the switch on PI-8 (pin1) is supposed to be the least significant bit, but is read as the most significant bit on the next IC in the chain.

My first thought was an issue with clock speed, but it behaves the same way with only one of the ICs attached to the board. Otherwise, I have no idea what the issue is. Any thoughts?

int _CD4021B_dataPin = 5;
int _CD4021B_clockPin = 6;
int _CD4021B_latchPin = 7;

void setup() {
pinMode(_CD4021B_latchPin, OUTPUT);
pinMode(_CD4021B_clockPin, OUTPUT);
pinMode(_CD4021B_dataPin, INPUT);

void loop() {
int data1 = 0;
int data2 = 0;
int data3 = 0;
int data4 = 0;

digitalWrite(_CD4021B_latchPin, LOW);
data1 = shiftIn(_CD4021B_dataPin, _CD4021B_clockPin, LSBFIRST);
data2 = shiftIn(_CD4021B_dataPin, _CD4021B_clockPin, LSBFIRST);
data3 = shiftIn(_CD4021B_dataPin, _CD4021B_clockPin, LSBFIRST);
data4 = shiftIn(_CD4021B_dataPin, _CD4021B_clockPin, LSBFIRST);
digitalWrite(_CD4021B_latchPin, HIGH);

if (data1 || data2 || data3 || data4) {
Serial.println(data1, BIN);
Serial.println(data2, BIN);
Serial.println(data3, BIN);
Serial.println(data4, BIN);
delay (300);

>> No.1768388

>move from pic to avr
>use PORTn everywhere trying to read pins
>spend 6 hours debugging before i finally figure out why i'm reading garbage

>> No.1768418


If you got that error message about the target then the usbasp worked and you got the correct error if no target was attached.

sometimes I have to unplug from usb to get it to recognize the usbasp a second time; my notes suggest that this started after I flashed the usbasp with "newer" firmware. I can't really say how I fixed this, but I'm pretty sure it went away and I know I use new firmware with success now, except that I have made several modifications to the usbasp firmware, not to fix any errors but to add features.

>> No.1768658

I am trying to send some serial data to an led matrix using an FTDI adapter from my PC. But somewhere along the way, 0xa or \n get a characted added to them. This in it self isn't too strange, but I can't figure out where this is happening. It doesn't seem to be on the side of the PC cause I am writing to /dev/ttyACM0 in C using fputc() which seems like it shouldn't just start adding characters. Is anyone here aware if it would make sense for an FTDI adapter IC to do this? Btw, I also tried the atmega16U2 ftdi implomentation from an arduino uno with the atmega328p removed, but the same problem seems to be happening.

>> No.1768686
File: 4 KB, 720x94, 0xfffff.png [View same] [iqdb] [saucenao] [google] [report]

Hey this is some PIC micro controller instructions I need to read and understand. What's going on here? I get we're setting the clock speed but I don't understand why we set 0x60 into W, then the instruction directly below it we move W to F then F into OSCCON1 ?

>> No.1768724

Because OSCCON1 is a configuration register? It should be documented somewhere, either the data sheet or a programming reference manual.

>> No.1768732
File: 48 KB, 403x308, Screenshot_2020-02-16_17-33-58.png [View same] [iqdb] [saucenao] [google] [report]


>> No.1768737

Yes, but why do we have to put 0x60 into w, then w into f?

>> No.1768744


I'd guess that you can't directly load a register like osccon1 so you load a general purpose register first.

Read the spec, or keep asking questions. One way is faster for most people.

>> No.1768752

>If you got that error message about the target then the usbasp worked and you got the correct error if no target was attached
I see. I also get nothing from my target when I try to program it with my arduino nano, so it's possible I've messed up my programming board or got a fake ATmega IC. But when I plug the USBasp into my Arduino Nano (which works because I used it to upgrade the firmware of the USBasp) I get the exact same error.

>to add features
I googled around to see if there was a newer version of the firmware by someone else, but I couldn't find anything. What modifications did you make?

>> No.1768767


movlw means load W with a value. in this case 0x60

movwf means load whatever is in W into f, which is OSCCON1

this info is from this document: http://ww1.microchip.com/downloads/en/devicedoc/31029a.pdf


I'm pretty certain the error message you listed earlier is only given when the programmer is found successfully but it in turn cannot get the correct response from the target. I believe the first step is to ask for the ID bytes or whatever they are called. If the reply is wrong then you get a different error message. The message you listed says the target did not reply at all.

The mods I made are because I use the usbasp as an interface between a PC and another AVR that collects data. The additional instructions raise or lower SS, and send one or more bytes back and forth.

>> No.1768773

it's a limitation of the pic architecture. your program is stored as a series of instructions that each take up 14 bits. those 14 bits are all that the chip has to work with, so anything you're asking it to do in any one cycle is limited to that. 6 bits tell the chip what kind of instruction it's about to run (eg MOVLW is 110000) and the other 8 bits hold data. that data is either your number (0x60) or the spot you want to put that number (OSCCON1, which might be located at 0x8D). there's no room for both numbers, so you literally can't fit an instruction that says "set 0x8D to 0x60".

the BANKSEL operation is because there's too many registers to cover them all in 8 bits. so the chip separates registers into groups ("banks") of registers. you first set the register group you want, then you target the register address inside that group.

this is why C was invented.

>> No.1768779

>this is why C was invented.
This is also why it is such a pain in the ass for a C compiler to generate code for PIC.
Mercifully, they eventually went to a MIPS instruction set.

>> No.1768786

just to expand on the absurdity, BANKSEL is in fact a macro that generates two instructions:
>MOVLW 0x08 (the bank that OSCCON1 is in on the 16lf15313 i have in front of me)
>MOVWF BSR ("bank select register")
as a result i'm pretty sure that if you put the BANKSEL operation after the MOVLW operation, you'll actually be putting 0x08 into OSCCON1 instead of 0x60. i guess the assembler might autocorrect that though. fortunately the bsr is a common register that's accessible from every bank, so you don't have to BANKSEL your BANKSEL.

>> No.1768809

>ask for the ID bytes
When I hit -F it says
>Device signature = 0x000000
Which if I'm understanding right means that it's asking for data on the MOSI line but the MISO line is just giving 0V constantly. Or maybe it isn't receiving anything on MOSI, or it is sending stuff back on MISO but the programmer isn't receiving it.
Do you think it's worth getting out the logic analyser and monitoring the communication? I'm pretty new to this so I probably wouldn't know what I'm looking at, but at least being able to differentiate where the communication error is happening might help.

>> No.1768810

>Do you think it's worth getting out the logic analyser and monitoring the communication?

sometimes that helps. I tried the code you used up there from 5-28-2011 and had problems. The code that works for me has been removed from github, so I put it back up here:


I won't be around much longer tonight, but tomorrow if you're interested I can show you the mods I made, but in the meantime you might want to look at this version, not that it will solve the issues you are working on.

>> No.1768824

Shit, pulseview is crashing on startup, even when upgrading to the nightly version, it doesn't like my distro.

I'll give that code a go later, thanks.

>> No.1769078

is there any cheap alternative to lora with similar range?
i am not paying out of my ass those riddiculous prices when the cost of making those devices ie like 10% of that

>> No.1769158

SX1276s aren't too expensive on ali

>> No.1769184

I already have two of them ordered but those are just ordinary lora modules, i was hoping for some cheapo chinkshit like with arduinons
I also wonder how hard would it be to modify them for more power because fuck FCC i want to transmit at least 100km

>> No.1769200
File: 59 KB, 818x734, image search result.jpg [View same] [iqdb] [saucenao] [google] [report]

Is there a name for this type of hexapod featuring 3 motors?

>> No.1769205

14 bits? Hold on, I thought it was 16 bits?

>> No.1769223

>more power
Last I checked at least some of the modules had their power limited in software to comply with regulations, so just setting a variable differently might get you the range you want, but otherwise you'll need an RF amplifier of some sort. But I didn't think range was an issue even over those distances so long as you used a sufficiently low bitrate and transmitter for long enough (shannon-hartley theorem), see if those variables can be altered. Also check out the ham thread on /diy/.

>> No.1769228

What's the point in this? It cant move shit. Definitely a fucking W H E E L could do better.

>> No.1769235

who cares, I want the fucking name.

>> No.1769246


The wonderful thing about the internet is that lots of information if free for anyone to read.


"Data memory is 8-bit, 16-bit, and, in latest models, 32-bit wide. Program instructions vary in bit-count by family of PIC, and may be 12, 14, 16, or 24 bits long."

>> No.1769277

3D printable 3 servo micro hexapod. MAKE magazine. google image search is your friend.

>> No.1769479
File: 2.21 MB, 3264x7200, MISO waveforms.jpg [View same] [iqdb] [saucenao] [google] [report]

Just updated the firmware, no dice.
But with the scope out I'm getting a proper waveform on MOSI but the signal on MISO is only 0.5V high with a bit of a capacitive ramp on it centred around 0V. I tried slapping a pullup on MISO in place of the slave ATmega, and it wasn't pulled to ground by the programmer or anything. When I detach the MISO line I get the same low-amplitude signal on the arduino's MISO pin. The MISO wave seemed to be rather affected by ambient noise (there is a 20mV mains-freq wave sitting on top of it) so I added a 100k pulldown resistor but only the edges of the MISO wave remained; the rest gets pulled to ground and I'm left with a very spiky waveform. I'm convinced that the path from the slave MCU to the MISO pin goes through a high-pass filter, it's the only thing that makes sense. But it also gets attenuated far too much for the programmer to read.

Also the apparent frequency of the data on both MOSI and MISO seems to be rather high at the start of the attempted fingerprinting before settling to a much lower frequency/bitrate. Pic related is with -b set to 300 with the scope paused as soon as I could. I'm having a hard time getting my single triggering to function, probably because of the noise.

I'm going to test my diy ATmega dev board next.

>> No.1769480


>> No.1769507

I don't care about it being 3D printable makershit. Im asking about the name of the mechanism, I see it everywehre on simple hexapods.

>> No.1769575

OK my ATmega diy dev board is spitting out nothing at all on MISO, so either my ICs are fakes (unlikely, pretty sure i used one of them before) or I fucked up my soldering somewhere and need to fix it, or I fucked up my soldering somewhere and ended up frying them both. Existence is pain. Maybe I should just buy one of those Arduino Unos with the socketed ATmega, but then I'd miss out on programming my ATtinys and any other MCUs I happen to get my fingers on.

>> No.1769597


Are you sure the target boards are getting power? Look at the 5v pin and see if it's good. Then double check all your connections. I sometimes find myself in "uart mode" and make the mistake of connecting MISO to MOSI instead of MISO to MISO, etc.

>> No.1769613

I want my arduino uno to communicated with 3.3V components which are not 5V tolerant. So i was thinking, i don't want to use gay ass logical converters and such so what if i connect 3.3V power source directly to the 5V pin and GND, thus completely bypassing the linear voltage regulator on the uno.
Will that work? Will the work with such a low voltage?

>> No.1769617

one downside though is that every time you want to upload new code you have to disconnect all connected devices since usb will pump in 5V

>> No.1769653

It's an overcrowded band.I had about 1 in 100 packets lost even with 500kHz Lora on 434MHz.If you scan the band,you'll hear data being transmitted about every second.

>> No.1769659

>It's an overcrowded band.

What's your opinion of the 900 MHz band? I've been using an xbee on that band for about 15 years now, in a fairly dense neigborhood, to transmit about 1/8 mile through dense trees, RVs, and mobile homes, and I'm amazed that I've never noticed any problems with interference. Maybe it's well designed, or maybe the band isn't used very much by anything with power.

>> No.1769667

Im in Europe so 868 and 915 have much less interference.Im using 868.350 for a current project and even uncoded fsk works very well.Im using 100mW,15kHz deviation fsk at 30kbaud and no line of sight ,and there hasnt been any packet loss at all at a distance if 300 meters.
434 is almost completely unusable for anything but short data bursts due to every keyfob,door bell,alarm etc. in the neighborhood constantly shitting up the band.
If you have an sdr you could see if interference is a problem.

>> No.1769671

My favorite chink company is nicerf.Bought dozens of 1W sx1278 and sx1276 modules and not a single one failed.
They are about 20$ each and the guys are very cooperative.

>> No.1769691

can you link me?
i thought the strongest they sell are 20mw because of the FCC trash
would love to buy some 1W

>> No.1769692


1W is technically illegal but they don't write anything about the output power on the package when they ship it.I ordered a shitload of these and I never had any trouble with customs.Just make sure you don't order too many modules at once.

>> No.1769695

btw the sx1276 at 868 says 500mW but I measured the output power,and module version 2.2 is usually around 800mW while version 3.0 is slightly above 500mW.
Both versions of sx1278 at 434 are around 1W.

>> No.1769696

the official 20mw ones have like a 3000 meter range, so do you get something crazy like 80kilometers with 1W?

>> No.1769699

Some people supposedly got hundreds of miles of range with 100mW with 434MHz modules but it was line-of-sight and using the lowest baudrate.I never tested the 1W modules at such extreme ranges,but I can confirm that they certainly work at 7 miles in urban areas with 500kHz bandwidth and SF12 both with and without fec.Would probably be insane if you transmitted from a mountain top.

>> No.1769702

that is awesome, i am definitely hyped now
stupid question though, how do i buy them? there is no way on the page i can see
do you have to like write an email to their costumer support and they send you a bank account number to send money or something like that?
i looked at the the map of distributors here https://www.nicerf.com/baseinfo_194.html and i am actually from czech republic which is listed here, so if they had them in stock that would be fucking awesome, since i could have them in like a couple of days if i figure out how to order them

>> No.1769705

You can email them directly or buy from their aliexpress store,but I personally always email them.

>> No.1769708

btw they accent paypal and bank transfers

>> No.1769710

Do they sell in small quantities? As i would only like to buy just two to test them out first.
I will try to shoot an email and ask about that czech redistributor they claim to have

>> No.1769713

There's no lower limit.Sometimes I order 2 and sometimes 10 at a time with no issues.

>> No.1769714

what do you use so many for?

>> No.1769715

My family has a small company and make custom transceivers for telemetry and such.The modules work at licensed frequencies too so they're used for things like transmitting river water levels,wind speeds etc.

>> No.1769726

So the one you linked is the module you recommend the most from their selection?

>> No.1769731

yes,we use that one the most,but sometimes we order the 868 version if the customer wants those frequencies

>> No.1769737
File: 52 KB, 550x550, 0002456_nema-17-stepper-motor-6v-1a-18-degree-2-phase-4-wires_550.jpg [View same] [iqdb] [saucenao] [google] [report]

I need to handle powering my Nema stepper motor (12V) seperate from my Arduino board power supply (5V) and needs to be portable. What would be a suitable battery setup for it? After watching li-po fire videos, I'm skeptical to trying it myself.

>> No.1769754
File: 491 KB, 1191x693, Screenshot_5.png [View same] [iqdb] [saucenao] [google] [report]

Greetings, I have these buttons

Do they need a resistor or can I just light them up by sending a digital out "1" on the Arduino directly? If I need a resistor which one should I use? Many thanks

>> No.1769759

Since they come with 5V or 12V options, I'd say they have built in resistors

>> No.1769762

cheers that's what I assumed, I tested them for a brief moment and it seemed to work perfectly fine I was just worried that letting them operate like this might damage the LED/my arduino. Thanks again.

>> No.1769770

Thanks, i will order a couple then. Can't wait to see if i can reach my friends house that is 25km away with the 1W version, or if i will have to like ducktape a repeater lora module to some tree in a forest somewhere with a lipo and hope nobody steals it

>> No.1769884

Read the datasheet. An ATmega328p will run off 3.3V, but probably not at 16MHz, so you'd probably need to use a different crystal. Considering the other issues here, I'd just use a few logic-level converters or a 3.3V board instead. Or, you know, make your own dev board.

>> No.1770049

>swapping MISO and MOSI
Ok, that stopped me seeing absolutely nothing on MISO, but now my dev board's header is running opposite to how my arduino nano works so I'll have to swap those pins.

I'm getting the exact same issue on MISO as the nano was, this time with a ~300mV wave without a pulldown, a bit less than the nano's 500mV. Just as an idiot check I tried it with a 100kΩ pullup, which just resulted in the same issue but near the Vcc rail, as expected for the high-pass characteristics I'm seeing. The only solution I can think of is to use a transistor to buffer/amplify the MISO signal enough for the programmer to read it, but A: it's running at 1MHz peak, and B: it's too low a voltage for my transistors to have a good chance at responding. I'll still give it a shot though. For A I've found that -b does shit-all but -B will actually let me set the sck frequency down at stupid levels like 1kHz so it's not an issue, and for B I may or may not be able to use a comparator with biasing to ~2.5V. Fuck this is a clumsy endeavour.

I found one very similar circumstance here: https://electronics.stackexchange.com/questions/400227/attiny20-isp-low-voltage-on-miso but the guy said that he was programming his MCU via some unsupported method, which can't be my problem.

>> No.1770089

Hey /mcg/, I was thinking of using the 1-wire interface on some ATTiny uCs to cut down on the number of traces connecting separate PCBs together. All I plan to use it for is querying each ATTiny to identify a topology formed by all the uCs and sending simple commands from a single uC to all others.

I haven't actually worked with 1 wire ever though, so can someone at least tell me if this is a retarded idea or not? I don't plan on the graph made being extremely large. At worst, it will be a graph with ~30 nodes connected with a maximum degree of 4.

>> No.1770108
File: 371 KB, 540x405, Please slow down I am stupid.png [View same] [iqdb] [saucenao] [google] [report]

Is there any significant difference between the Arduino Nano and Nano Every apart from the Every being more powerful and also cheaper? Is there really no downside?

>> No.1770113

Doesn't seem like there is much difference between the common peripherals, which makes sense given that the atmega809 is advertised as the architectural successor to the original atmega328 chip. The every is clearly more feature-rich though.

>> No.1770118

>not just buying chink clones of the older versions

>> No.1770129

Shit, I solder the damn comparator circuit together, get a 0-5V waveform from the thing (with a little help from positive feedback) but it still doesn't recognise anything. I look closer at the waveform and it isn't data at all; it's just copying the sck line. Coulda checked that before going through with all this horseshit.

To be clear, I'm plugging the USBasp directly into the SPI header on the arduino nano, and it's definitely plugged in the right way because I looked it up on the pinout diagram (the one without MOSI and MISO swapped) and the LED is on. Now that I think of it, that guy with the ATtinys was probably seeing the same thing, no way would it be spitting out legitimate SPI data but at a lower voltage. I'm probably getting capacitive coupling from the SCK pin to what should be the MISO pin, but that doesn't explain why loading it with a resistor didn't dampen it entirely, the implied capacitance is quite large. On further inspection, I get that waveform on basically every other pin too.

is the MCU's reset supposed to be pulled down (active) for 140ms before the attempted programming and all the way until until 320ms after? Because after probing about a bit that's what I'm seeing.

>> No.1770130

How would I go about casing a raspberry pi, sheild, and touch screen (7" maybe) and 2.5' hdd bay?

How do you case custom?

>> No.1770139

I'd get some guy to CNC one out of aluminium, or weld one up out of steel, or whatever. Wood or even 3D printer filament could work, but you'd have to design around the material's inherent weakness.

>> No.1770151
File: 257 KB, 886x768, Screenshot_2020-02-19_07-32-17.png [View same] [iqdb] [saucenao] [google] [report]

>is the MCU's reset supposed to be pulled down (active) for 140ms

When all else fails, read the spec. I'll hook up my logic analyzer and see what avrdude does for me, and post the output in a bit. I'd suggest that you stay away from all that pullup pulldown testing and very carefully analyze your setup. And, just because the led is on does not mean all is well. You can power an AVR through just about any pin. If it's not too hard, I'd pull all the jumpers off the usbasp and provide independent power to the target.

>> No.1770154
File: 61 KB, 991x426, Screenshot_2020-02-19_07-40-27.png [View same] [iqdb] [saucenao] [google] [report]


sending AC 53 to enter programming mode

>> No.1770157
File: 10 KB, 370x366, Screenshot_2020-02-19_07-46-36.png [View same] [iqdb] [saucenao] [google] [report]


all that clutter to the left is avrdude entering prog mode, reading sig bytes and fuses and some eeprom bytes, then that reset blip is it going high for 7.5 micro seconds.

>> No.1770160
File: 64 KB, 709x531, Screenshot_2020-02-19_07-53-12.png [View same] [iqdb] [saucenao] [google] [report]


When it finally settles down after that 7F 1 D6 crap, whatever that is, it raises reset for 5.5 micro seconds then handles eeprom and flash programming. I modified avrdude to write a bunch of other stuff to the end of the eeprom, like file name, date, avr serial number, etc., so you won't see nearly as much eep writes, but the overall picture should be similar

>> No.1770208
File: 29 KB, 750x455, Transmitting-Side-Connecting-LoRa-SX1278-with-Arduino-UNO[1].png [View same] [iqdb] [saucenao] [google] [report]

I am looking at some tutorials and i see this shit over and over again
>alright the module is NOT 5V tolerant you have to be careful, use the 3.3V pin on the UNO to connect the power to the module
and then those retards connect the digital connection wires directly like in pic related
nigger, you do realize those logical pins on UNO are still 5V right? and those digital pins on the module are definitely not 5V tolerant (and it does not have any level shifter either)
is see this mistake so fucking often it's ridiculous

>> No.1770241


according to the pdf


"Each radio comes with some header, a 3.3V voltage regulator and levelshifter that can handle 3-5V DC power and logic so you can use it with 3V or 5V devices."

I also read a few of their pages and it isn't clear to me what happens if you attach it the way your pic shows. Based on the above quote I would think you should drive the lora with 5v and it puts 3v where it needs it on the board, and level shifts the outputs back to 5.

other quotes from the pdf:

The left-most pins are used for powerVin - power in. This is regulated down to 3.3V so you can use 3.3-6VDC in.

All pins going into the breakout have level shifting circuitry to make them 3-5V logic level safe. Use whatever logic level is on Vin! (What does this mean?)

SCK - This is the SPI Clock pin, its an input to the chipMISO - this is the Master In Slave Out pin, for data sent from the radio to your processor, 3.3V logic level

Rather confusing to me.

>> No.1770478

Man that would be really handy to have up and running. So I've decided to boot up pulseview on my raspi instead, but I can't find the wifi stick for it and my ethernet settings are fucked so I can't use that, so I decided to use a USB stick to just transfer across the data. But I couldn't find that anywhere, so I decided instead to use a micro SD card, but chang didn't ship my micro SD card reader 6 months ago and the mixza one is also missing somewhere so I can't read it with my raspi, so I decided to use my digital camera as a USB card reader. But it's out of battery, so I have to wait a few hours for my camera battery to charge.

>> No.1770497

Stupid question but I cant find the answer. The arduino uno shares its led pin with pin 13. Does the nano also share its built in led with a digital pin.

>> No.1770504
File: 277 KB, 1754x1239, Arduino Nano Schematic.png [View same] [iqdb] [saucenao] [google] [report]


>> No.1770505

fuck, the camera doesn't like having a file in it that isn't an image

>> No.1770540

pin13 huh. explains why my button wasnt working.

>> No.1770545

Oh, because it has a pulldown resistor+LED? Yeah, I'd ignore D11,12,13 just out of principle because that's where ICSP happens.

>> No.1770573

OK I'm retarded. In a last-ditch effort I reflowed the solder on the ICSP header on my arduino nano, now it's detected by the programmer just fine. I guess that capacitive shit I was seeing was due to the tiny gap between copper and solder on that pin. I wish these chink arduinos had plated thru-holes. Then again, that would have its own problems.

Now that I've determined that I just happened to have shitty enough luck that BOTH of my completely different ATmega boards had the same fucking issue, I can stop chasing phantoms on the software or programmer and start getting work done. So now I just have to figure out where the bad soldering on my shitty perfboard ATmega programmer board is. Which will be fun.

>> No.1770582

Alright! My current Arduino Nano fuses are (E:FD, H:DA, L:FF), while the raw ATmega fuses are (E:FF, H:D9, L:62). Here I thought the Nano's fuses were supposed to be (E:05, H:DE, L:FF). From what I can see with an online fuse calculator, there's basically no difference between E:05/FD, just some undefined extra bits set high or low, BOD voltage is still the same (the default has no BOD). As expected, L:FF means the external 8+MHz crystal oscillator, while L:62 means the internal 1MHz oscillator, the exact reason why I want to change the fuses in the first place. But I'm not really sure what the high fuses are all about. The three variants toggle between boot sizes, which I assume means startup code or static memory or something, and between the boot reset vector being on or off.
So, 256 or 1024 words for my boot size?

>> No.1770591

>look at the newer atmega chips
>lol just use UDPI instead of ICSP bro
>literally need another uC to function as a combined usb to ttl converter and avr programmer
>internal clock scaling
>lose the crystals but now also have baud rate minimums dependent on the clock prescaler and also non-commited uart/reset pins
I'm not even sure how to feel anymore.

>> No.1770594

>literally need another uC to function as a combined usb to ttl converter and avr programmer
Can you not bit-bang via serial port?

>> No.1770599

You need to burn a bootloader first for which you would still need to use another chip to function as a udpi programmer. It's another standard that really doesn't have a reason to exist. Who the fuck asked for a single wire debugging/programming interface?
Not to mention that using the bootloader removes the ability to use the reset as gpio and a couple other smaller side effects. Just a strange decision overall for what ends up being a nano with a larger memory.

>> No.1770606

>burn a bootloader
Why not just send it into the UDPI pins that a UDPI programmer would use? IIRC you just need to use a resistor to combine tx and rx.

>> No.1770699
File: 119 KB, 1000x900, Gebrochene_loetstellen.jpg [View same] [iqdb] [saucenao] [google] [report]

It was probably a bad solder joint with a ring crack completely around the pin, that's a not-uncommon problem with wave-soldered stuff. The worst part is that it can work sometimes, then wiggling the pin around a bit will cause it to fail. And they're hard to see unless you look really close.

>> No.1770726

Because I'm autistic about change. I know I can use any board with an FTDI and use a gpio pin as some generic half-duplex line for updi, or just use some board programmed via an ICSP and tie the dedicatad uart to simulate a half-duplex lane.

>> No.1770783

>wave-soldered stuff
No it was hand-soldered by myself 3 years ago. This is the first time I've needed to use the ICSP header so who knows when the thing broke.
Can't wave-solder an arduino nano, it has components on both sides.

>> No.1770893

>diy dev board atmega responds to avrdude just fine
>program fuses to mirror existing arduino
>it stops responding
>the only difference between now and then should be the use of an external crystal for the clock
>nervous because of out of spec 10pF caps on crystal
>measure with scope
>nothing at all
>check my soldering
>one leg of crystal is grounded
>spend 3 minutes overheating the crystal trying to wick off that blob of solder
>eventually get it correct
>plug it in
>works just fine
>measure oscillation frequency of existing arduino
>measure oscillation frequency of overheated undercapped crystal
feels good man

>> No.1770985
File: 1.12 MB, 2605x1119, ATmega programmer.jpg [View same] [iqdb] [saucenao] [google] [report]

And here we are! The diffuse 3mm red LED is for power, the 5mm clear LED is an RGB LED, with red hooked up to RESET, and green and blue hooked up to MOSI and MISO respectively. Maybe I should have hooked up those last two through series capacitors, so I can see through both "tied to ground" and "tied to vcc" issues.

>> No.1770996

Just added an orange LED tied to SCK, because that's the common builtin LED pin. Originally had it on the same resistor as the RGB LED, but that caused the red RESET lamp to flicker when SCK was flickering, so I squeezed another 10k on the board. The dependant lighting of RESET, MISO, and MOSI is acceptable since they're only on together and flickering to fast to see during programming.

Considering fitting a reset button on here too.

>> No.1771011

what is the character added?led matrix is controlled by what? microcontroller? raspberry? some library i used on a raspberry used to output a '?' (0x3F) whenever there is a parity error

>> No.1771362

Anyone using ESP32 on linux feel like helping me? There is something wrong with my user permissions. I have added myself to the dialout group but putty will only connect if I run sudo putty. idf.py flash will not work as it gets denied. sudo idf.py does not work. Help?

>> No.1771513

Need a good microcontroller that can run a camera then transmit with an antenna please recommend a good kit or dev board

>> No.1771532

just go with one of the stm32 variants like everyone else

if you want actual advice, what kind of bitrate do you intend on transmitting with the antenna, and more importantly, what framerate and resolution do you want to use the camera at?

>> No.1771534

2 megapixel jpg every 5 or 10 minutes
part of a security system

>> No.1771564

2MP isn't very descriptive, but, in general, you can probably get any STMFx board to work with the camera using the DCPI peripheral. There should be some examples using the HAL on the stm32cube examples library of the board of your choosing. You really only need to worry about how to store the image since it probably won't fit in the onboard chip's available memory depending on the chip you choose.

>> No.1771565

lel, I mean DCMI

>> No.1771566

The compression algorithm might take more processing power than it's worth, might just want to transmit it raw. Assuming 24bit color, 2MP means an uncompressed 48Mb per image, which would require being transmitted at 160kb/s. This transmission isn't likely to be an issue, but buffering the full 6MB image before transmitting won't be as trivial. Might need an external RAM IC.
On the other hand, you could transmit the pixels as you read them, and attempt to do so fast enough that rolling shutter/blur/whatever isn't an issue, in order to avoid the memory issue. Assuming that the CCD/shutter system lets you do that. If 1/5th of a second is good for this, you'd need to send data at 240Mb/s, which is potentially possible, depending on the method of transmission.

>> No.1771595


did you add it to /etc/udev/rules.d

if not google that. once you add the correct file you need to reload the rules - google to find the command for your system.

and if you have to be added to dialout sometimes you have to log out and log back in for it to take effect.

>> No.1771613

>trying to interface between two incredibly different IT standards with MCU
>code isn't working
>can't troubleshoot it
so this is what it felt like to be a computer science back when computers were the size of rooms

>> No.1771622

>so this is what it felt like to be a computer science back when computers were the size of rooms

sorta. for a more similar experience get one of those old 6800 or similar dev boards where you had to enter the code via a hex keypad, and you had to type it all in after every power on, and if it crashed you had to type it in all over again. the fact that I survived that and still love computers is proof that I am mentally ill.

>> No.1771634

bros im such a brainlet, I have the arduino nano ble 33 (has a LSM9DS1 IMU)

how do I get the g's when the board is moved left and right? is that the Y axis? I'm too retarded, this is for an RC car display of live g-force values

>> No.1771666

I think the word you're looking for is "fun". I love figuring out how to make obscure hardware do new things, and shuffling bits and bytes and knowing just how they all interact. We had those 8085 dev boards in a class I took... I had loads of fun writing code to make the display do fun stuff like scroll messages and blink while most of the rest of the class were struggling with the exercises in the book.

>> No.1771671
File: 3.04 MB, 1512x1134, pepsi.png [View same] [iqdb] [saucenao] [google] [report]

Made a pi hat for one part of my senior design project, its pretty simple but fun experience. Just has an ADC that converts my analog sensors to something the pi can read, the adc connects to the pi over i2c and I can index which senor I'm looking at. (Blacked out my name)

If anyone else uses KiCAD for their projects, i highly recommend checking out JLCPCB. Not to shill them but 2 bucks for 5 boards (+ shipping) is a steal.

>> No.1771685

How do I into encoder acceleration lads? At the moment i'm using a timer interrupt every 200ms to see if the encoder is still being rotated, and I just double the value i'm adding to the variable that keeps track of the encoder count, but it doesn't feel nice to use or feel like a natural acceleration based on how fast i'm turning the encoder.

>i highly recommend checking out JLCPCB. Not to shill them but 2 bucks for 5 boards (+ shipping) is a steal.
Same, and you can get the stencil for applying solder paste at the same time if you need it for a reasonble price.

>> No.1771939
File: 115 KB, 1078x706, HPGL decoder.png [View same] [iqdb] [saucenao] [google] [report]

just fuck my shit up

>> No.1771940

Ok, I've got
>Serial.println("Serial begun");
>Serial.print("Creating filename at start: ");
inside my setup() before I attach interrupts, but even without pressing the reset button or having anything connected to the reset button, I'm getting my code starting from the beginning again. Does this mean it's crashing somewhere? Where it resets seems to be undetermined, but it always seems to be halfway through a serial.print() even though I do all those when interrupts are disabled. Sometimes on a crash it starts again (like in the middle of that image) and sometimes it stops and doesn't do anything else (like at the end of the image), but I imagine that's just the same crash but at different times in the program.

Also I'm seeing every second RS232 byte being a 255 regardless of how I time the end of the byte and reenabling of interrupts. A 255 means absolutely nothing for HPGL, which uses 7-bit ASCII. I wish my logic analyser was working.

>> No.1771963

Is there any SBC that has the small form factor of the zero but without all of the gayness?

>> No.1772163

Looks like something's being overwritten in memory. String array too small for what's being written into it?

>> No.1772177

As some other anon said, oscilloscope is a pretty complicated project. If you still want to go ahead I would use something like an MSP432, which is a pretty good dev board albeit it has a lot of stuff you probably wont need. Look for dev boards with arm single core MCUs.

>> No.1772178

Yeah I agree, wouldnt use an RPi for those kinds of proyects. I actually think it makes a lot of sense given the direction IoT is heading. Lots of computer vision projects. If you wanted low power you would need a proper Micro without an OS, not a mini pc

>> No.1772179

Agreed. I would go with ultrasound. If you care for power consumption pressure would be better. Pressure would probably be better overall, but more work rigging the chairs. Or you could put two pressure sensors on diagonally opposite legs, touching the floor. That would probably work pretty well, and be easy enough to conceal

>> No.1772182

You get the makers Board Support Package (BSP). As for IDE, if youre using an MSP432 you would Download Code Composer from Texas Intruments, which is basically a fork of the Eclipse IDE with added functionality for working with dev boards. I think that includes de BSP as well, can't recall right now

>> No.1772242

There's a function that will tell me the amount of RAM remaining, right? I think I've run into issues with it before, but only when using an ATtiny85. The behaviour of the crashes seems very dependant on minute changes to the code (specifically to the serial.print stuff) so a cumulative issue like memory overflow is relatively likely.

>> No.1772359
File: 8 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google] [report]

How about capacitive sensors in the chairs themselves? So they'd pick up on a person's presence by the radiated 60Hz noise if he's within 5cm. An open-gate FET with a filter on it would work well. Possibly with an AC signal generator nearby with another capacitive plate to ensure that the person is at a reasonable potential, but if you did that you'd want it to be at.

>> No.1772364

Just FYI, microcontroller UARTs are likely to have a buffer of a few bytes, but more importantly the C library usually has a buffer too, and if the UART is driven with interrupt code, your print statement will have been long since stuffed in the buffer and the CPU moved on, while the actual bytes are slowly being transmitted at 9600 or whatever baud rate. When a crash happens that breaks the UART ISR, it stops transmitting.
tl;dr: just because it stops halfway through a print call doesn't mean the crash was inside the print call

>> No.1772366
File: 90 KB, 2406x938, buggy rs232.png [View same] [iqdb] [saucenao] [google] [report]

Ok, before all that, looks like the logic analyser was a good idea after all. Here I can see that the serial printouts end before the code's RS232 receiving stops functioning. It's also not printing anything to the text file, not even the "BEGINNING OF FILE" that should be there, so I'm reformat the card now. I increased the serial baudrate and now I'm not seeing the abrupt stops in the middle of serial.print() commands. I'm still getting the "serial prints every second symbol as 255" bug even though there shouldn't be any edge for it to trigger off and there's no room between some of the bytes for the required microsecond delays and no sign of the CTS line being pulled low as it processes the serial data. So it isn't a timing bug but something far stranger.
>>1772364 Ah, good to know, that explains what I'm seeing here.

Note that the funky looking $ and . signs are my custom interpretations of particular nonreadable ASCII symbols that make up the start of an HPGL datastream. They appear at the start but nowhere near the actual data I'm harvesting, so it isn't an issue.

This code used to work without crashing (but it still had the 255 bug) half a year ago, but now I've fleshed the code out to generate its own filenames to store the data in. Which at some point was working very well. It counts up the number of files on the SD card to number N, checks file "hpgl_[N-1].txt" to see if it exists. If it doesn't exist it makes it to write in. If it does exist but is empty it uses it to write in. If it does exist and already has over 15 bytes of data it makes the file "hpgl_[N].txt" to write in.

>> No.1772382

oh yeah i forgot about this thing

>> No.1772388
File: 51 KB, 1028x510, thinkingemoji.png [View same] [iqdb] [saucenao] [google] [report]

This is rather telling, 130B each cycle, even with F() on the .print() functions. Probably not coincidentally, my ASCII array is 130B long.

>> No.1772423
File: 1.64 MB, 480x270, Neopixelx8.gif [View same] [iqdb] [saucenao] [google] [report]

I feel like I'm stupid or something but can't figure out what I'm doing wrong. Decided to dick around with some neopixels, writing some tests to become more familiar with the library. Starting simple, just doing some fade in/fade out, and I'm trying to do a smooth fade from 0 to 100 and then back to 0 again. For some reason, it looks "granular" (like if you increased the brightness by steps), so I made my code display the RGB value it's writing in the serial monitor. Looks fine, it's incrementing/decrementing by 1 each loop, great - but it's still granular, not smooth. Then I read the brightness value of the neopixel itself and the thing ALWAYS moves in steps of 5, despite the brightness being directly set (e.g. if I have a counter that's supposed to set the brightness 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15, the brightness it reads back is 0 0 0 0 0 5 5 5 5 5 10 10 10 10 10.

I'm just using strip.Color(r,g,b) to set it, what's going on here? Why is it stepping in steps of 5? I can't find anything on google about this.

>> No.1772426

...and I figured it out. strip.setBrightness() divides 255 by whatever the value you put in the above, which causes it to think it's incrementing by the resulting value each time while not actually reaching the maximum

>> No.1772427

ok I tried some more garbage using the reserve() command and my memory is only going down by 72B, not 132B, but I'm getting a gap of up to 50ms before CTS goes high again, tanking my bitrate. This project is hurting me, I'm close to rewriting the code from scratch.

>> No.1772450

On /g/ you’ll find consumerism. On /sci/ you'll find IQ threads. I guess this is the best place to ask this sort of question.

At a Canadian, top 100 university (University of Toronto, UBC, University of Alberta), electrical engineering, computer engineering or computer science?

I’m leaning toward CE because CS is full of onions, but only CS is available at the UBC Okanagan campus in Kelowna. uAlberta is cool, but the province of Alberta is an economic shit show.

If there aren’t Canadian anons available, what does /mcg/ think of studying CS vs CE (not related to Canadian universities specifically, but generally, as a major at a reputable university)?

>> No.1772452

By onions I meant “CS is full of onions”
inb4 phone poster

>> No.1772453

Fuck it did it again
I meant “onions”

>> No.1772455

>he doesn't know

>> No.1772456

I'm not from canada so no idea about what universities are good or anything like that, but if you have to choose between electrical engineering, computer engineering or computer science, desu these are entirely different areas. What do you care about? Money? Interest? How do you imagine your job later in life?

Personally I went with EE and I didn't regret it. A lot of flexibility in where you want to work. Then again the "programming" that is part of EE is laughable, you really have to learn alone on the side. The upside is of course that you get to actually build machines, control circuits and do stuff in the real world.

Ask yourself how well you handle abstract concepts and if you prefer programming or circuitry as the focus.

>> No.1772457

I thought those filters were sitewide, surprised someone can not know about them desu.

>> No.1772459

was that "desu" facetious?

>> No.1772461
File: 53 KB, 800x800, sad.jpg [View same] [iqdb] [saucenao] [google] [report]

I wish. I might just be retarded.

>> No.1772462

gave me a laugh anon, keep on doing what you're doing

>> No.1772469
File: 254 KB, 524x679, blue pill serial pinout.png [View same] [iqdb] [saucenao] [google] [report]

newfriends can't sѹpost

>> No.1772473

No clue what I did, but now it's flickering between 947B and 1013 of free RAM, and working excellently. No crashing. Except for the filename issue. And the "every second character is 255" issue. This feels really good, I'd quite like to make firmware interfaces for other kinds of obsolete digital hardware. But next time I think I'd prefer something synchronous, having to trigger with interrupts on UART's start-bit is a little painful. Also PulseView is getting really laggy trying to collect 200M samples at 25kHz and decode the UART on the fly.
It takes 1.7ms to send each byte, but I'm spending 22ms between each byte as I write to the SD card and other stuff. I imagine removing the serial.print()s will improve this. It takes only 1.2ms from the CTS line being pulled high to the start bit of the next byte to start transmitting.

And fuck, it crashed after running just fine for 10 minutes. Right from 947B to 10B. This bug isn't going to be easy to stomp.

>> No.1772475

>Pi Zero
>dirt cheap

They literally never went under 15 euros around here which I never found to be justified. Especially with the whole 5 bucks meme and marketing around them.

>> No.1772478

Then you got really unlucky. I got mine (the Wireless version) for 10$, and I can get the non wireless for 5.5$. Still it'd be so much cheaper if they weren't insisting on building them locally. They really should just upscale their production.

>> No.1772479
File: 151 KB, 716x643, 2020-02-24-1582547831_716x643_.png [View same] [iqdb] [saucenao] [google] [report]


>> No.1772481

Wait, it still wrote all the way to the end of the transmission though, so maybe the crash was a part of the code after the 5s delay that ensures there's no more data?

Also another minute change to it brought back the quick crashes, and I think the crashes have something to do with the shitty SD library when it tries to write and can't.

Where from? I've never seen them in-stock for anywhere near $5.

>> No.1772483
File: 400 KB, 1191x431, berrybase.png [View same] [iqdb] [saucenao] [google] [report]

Since I'm from germany:
for the basic one.
They only deliver within the EU though.
pic related

>> No.1772495
File: 664 KB, 791x786, Screenshot_2020-02-24_08-57-07.png [View same] [iqdb] [saucenao] [google] [report]

Does nano pin PB5 not work well as an input? It's the one connected to the onboard LED, and I could not get it to work with a simple pushbutton connected to ground. I enabled the internal pullup.

>> No.1772509

I now know. Been lurking for 2-3years

>> No.1772723

you may want to consider using wled if you are new to this.

>> No.1772850
File: 654 KB, 1753x1240, Arduino Nano Pinout.png [View same] [iqdb] [saucenao] [google] [report]

Shit, now that's the second time in a few days it's fucked my SD card so I have to reformat it, as I think the crash is happening inside the SD-card reading function. Any earlier and there isn't anything fancy to crash, anything later and CTS would be pulled high again and I don't see that.
I'm going to check out SDfat once my card finishes reformatting. Anyone know if the Adafruit fork is the one to go for? The non-Adafruit one was updated more recently, so I'll go for it first.

Guess where the LED goes? Yep, from D13 to GND with a resistor. Who'd a guessed? So it always has a ~1k pulldown, meaning you'd need an even smaller valued resistor as a pullup to counteract it, so small that you'd set the resistor on fire. You'd be better off having a button to Vcc instead. I always have both the pinout and schematic on hand so I know what I'm dealing with. That one you posted isn't too good for knowing which pins are PWM and which aren't, I prefer this one. Pins D11 to D13 are also behind the ICSP header, so I tend to avoid them as they could mess with programming it later.

>> No.1772851

And here's the schematic I use:
Could probably cut down on the kB by converting it to a .gif, if you so desire.

>> No.1772882

i want to kill the retard who thought it was a good idea to have two logic levels coexisting as 5V and 3.3V
it is SO FUCKING ANNOYING interfacing them together because you need level shifters and shit like that and it makes everything annoyingly complicated

>> No.1772887

You're stuck at the limbo where you don't have the choice to entirely go one side or the other for all your parts, but you have enough freedom to exit the ecosystem of a part family/series. Go one way or the other. If your circuit needs logic level shifters you're either dealing with very specialised parts or you didn't choose the parts well enough to begin with. Plus if your communications are such that RX and TX are on seperate wires, you can probably ignore it, using voltage dividers one way and nothing the other way. IIRC 3.3V is still within 5V logic's high range, though it may depend on whether you're doing CMOS or TTL.
Common ATmega328ps will run off 3.3V if you program the fuses to run the oscillator slower.

>> No.1772888

You can also underclock almost all arduinos to run at 3.3V, you rarely need them to run at full clock speed anyway, 8MHz is usually plenty
and 90% of the interfacing problems is that the device you want to use with arduino is 3.3V only so this solves almost all hobby cases

>> No.1772940

Not him, but I've had problems with trying to drive the CMOS 5V inputs on a HUB75 LED panel (SM16126 LED driver chip) that have a Vᴵᴴ minimum of 0.7*VDD, which is 3.5 volts, from a 3.3V blue pill. Go slowly and it's fine, go fast and it starts missing on the pixel and shift inputs.
I understand how 3.3V logic was a good idea since TTL already used ~2.2V for a high, but fuck the chink who decided to use CMOS input levels on that chip.

>> No.1773126

So does the driver chip use 3.3V logic? Or is it the MCU that's telling the driver chip what to do that's 3.3V?

>> No.1773338

The MCU is 3.3V, but the LED driver and panel are 5V CMOS and want at least 3.5V for a logic 1. The space between 0.3Vdd and 0.7Vdd (1.5-3.7V) is where dragons be. Noise dragons.
Someday I'll get back to that project and try again. I tried to use an under-volted 74HC chip but it didn't seem to make a difference. Next time I'll try some 2N2222s.

>> No.1773340
File: 5 KB, 400x400, tegaki.png [View same] [iqdb] [saucenao] [google] [report]

Then use a 5V MCU? RTL inverters will give you the buffered inputs you want.

>> No.1773343

Sure, just find a 5V MCU with enough CPU speed and RAM to drive a 32x64 LED panel. I'll stick with using a few transistors.

>> No.1773357

How many colors? 32x64 doesn't sound that big.

>> No.1773445

Look up what a HUB75 RGB display is.
Anyhow I'm doing this for fun with the Blue Pill boards I already have. I'm not going to get some Memeduino just because 5V when I only need a little level shifting.

>> No.1773547

You sound like you need a power-resiliant filesystem. Take a look at littlefs.

>> No.1773902

My dad keeps buying me raspberry PIs for christmas. I have like four of them now.
What do I do with them?

It's an Model 2B V1.1, Model 3B V1.2, A model 3B+ (2017) and a model 4B (2018). Then I have a watterott 2.8" Touchscreen display, And a JOYIT 7 Inch Display (Touchscreen, LCD), a MicroBit and several sensors (PT100s, EnvironPhat etc). I'm not into electronics that much anymore but they're only gathering dust and I want to do something useful with them.

Oh yeah, also got couple breakout boards.

Should I just like...connect all of them, make a small cluster and put it on the net for anons to enjoy?

>> No.1773912


The web idea is not great, but I'm in a similar position with rpis and arduinos. I wrote a sketch for the rpi to show me a real-time status of how many pis and arduinos I have in boxes and drawers, categorized by date of purchase, pertinent specs, etc. My friends like it so much they are going to pay me to set up systems for them.

I can github the code for you if you like, since there's no need for you to re-invent the wheel and actually learn something that you'll never use again.

>> No.1773913

Oh yeah and like two pi zeros, it's hard to keep track.

>> No.1773914

Media server/NAS, pihole, home automation server or security server, and use the forth as some sort of data interfacing tool or MCU programming tool.
A NAS is a really handy thing to have, just connect to it remotely and get access to all your data even at a web cafe or on your cellphone. I'd put all my datasheets on one.
As for a security server, get (salvaged) laptop webcams since they're all USB pin compatible and cheap, and put them about your house or outside.

>> No.1773918

Yeah I don't really do development anymore. And I already have access to a NAS system, albeit not really using it as I keep all my data offline on a USB harddrive.

I did however develop a asyncio/flask/vue.js system for controlling the GPIO and displaying data. It's nothing fancy but I am thinking of releasing it for others to use if they want to.
It was originally intended to automize a brewery system for cheap (as that system used PT-100) but due to limited (read: non-existant) budget that never happened.
I think it could be easily modified for indoor gardening or whatever you need temperature/GPIO controls for.

I don't know if that will be necessary.

>> No.1774309

If I'm already using the GPIO pins on my Rpi how could I power a screen that is usually powered via the gpio? I'm new to this.

>> No.1774323

The raspberry pi has a HDMI port. There's plenty small screens with HDMI ports. You need to power them normally as well, so a micro USB or USBC connection is needed.

>> No.1774326

To add to my post:
If you alread have a screen using pins, those are "used up", so you'll have to make do with the left over ones. A few methods to get more use out of a few pins are multiplexing and most effectively serial communication. If you are for example able to start a I2C bus, that's two pins used for up to 1024 devices (minus some reserved adresses so more like 1010) you can connect. Those are your best bets I'd think.

>> No.1774634


>> No.1774646
File: 104 KB, 644x536, 1527089379151.png [View same] [iqdb] [saucenao] [google] [report]

>image processing and video encoding

post upskirt vids

>> No.1776168

I have battery powered fartduino project and i would like to add a display. but the display is going to be always on so i need som that draws absolute minimum of energy possible, any ideas?
also has to support either i2c or serial, since i want to use with those little ATTINy shits so i don't have that many pins to spare
The data displayed will be just numbers so any display that can do at least 8888 is fine (where i can turn on or of each individual segment)

>> No.1776184
File: 24 KB, 350x350, Sinda-Standard-COB-Character-2x16-lcd-display.jpg_350x350.jpg [View same] [iqdb] [saucenao] [google] [report]


my guess would be LCD without a backlight; some have I2C interface.

>> No.1776200

If the display doesn't change much, use e-ink which doesn't draw power unless it changes.

>> No.1776201

what sort of currents are we talking here?

>> No.1776210

Look at the data sheets to see how much power they need. I know they make those 14-pin LCDs as small as 1x8, but the display panel is hardly the thirsty part. If you find an I2C version, it'll probably just have a small MCU on it that talks to a regular text LCD chip.
Naked LCDs are the best for low power, but they need special driver pins, which you won't see in an ordinary Ardunio. I think you can drive them by connecting them between two GPIO pins alternating high and low, but that would very much be a hack.
In any case, you aren't going to get low current with an LED display.

>> No.1776375

Does that even work? I thought you needed some backlight to see anything on those, unless they have the silvery background like on calculators. Here's a question, why do LCDs use backlights when they could just use a white piece of paper on the back to reflect incoming ambient light? Is it because they'd reflect light that isn't covered by the narrow filter bands of a color LCD? Sounds like an easy enough fix.

>> No.1776392


The original LCD displays had no light at all and needed ambient light to be seen. The backlit versions can be seen in almost any lighting condition except strong sunlight.

>> No.1776534

St bros help a noob out please. I have a design I'm going to throw an stm32f401ccu6 and have some questions regarding USB. Am I locked down to using otg or can I use it as a normal usb host and omit the otg functionality? All the designs I see with it have usb-c as well but could I wire it like you would a normal micro usb? Thanks in advance

>> No.1776549

I mean color LCDs, like on tablets, or even B&W ones for e-readers. As I said, calculators already do this. Why do we have to us e-ink for it? Not like e-ink displays have any trouble in ambient lighting.

>> No.1776772

Should I just program microcontrollers with an arduino? I'm considering throwing something together like >>1770985
and I'm wondering how you guys generally go through the process of moving code from meatspace to microcontroller logic.

>I even soldered a large cap across Vcc and GND just in case there's too much ripple there,
As a sort of aside, you're not supposed to cross 10uF to limit inrush current, if you go too far past that you can have problems with connecting. There are a couple designs for soft start and things of the like if you really need bulk capacitance, but for filtering it shouldn't matter at all.

>> No.1776791

>you're not supposed to cross 10uF to limit inrush current
Yeah I ran into that a while ago when using a 1mF cap, my computer refused to provide any power at all. This one was only a 22µ or so and my computer didn't really care about it even though it was out of spec. I've since removed it since it wasn't making any difference.

My problem turned out to be that both my arduino nano and my hand-soldered proto-dev-board had failed solder joints on their ICSP headers, in case you haven't read the rest of my posts. Works fine now, hence me removing the cap.

>> No.1777065

What is a good cheap SPI flash programmer that is compatible with linux?
Also how do you call one of those sockets for SOIC-8 packages?

>> No.1777068

>GIS for "soic8 socket"
>find a bunch of them
Is something wrong with you, son?
Check it out, I even found a double socket:

>> No.1777071

I'll be honest I didn't even try looking for it since I had trouble finding a good programmer in the first place, but thanks.

>> No.1777084

>As a sort of aside, you're not supposed to cross 10uF to limit inrush current, if you go too far past that you can have problems with connecting.

Could you or anyone elaborate on this? What does the part about "problems with connecting" mean? And as for caps across Vcc and gnd, I've been using 2200 uF electrolytic caps for decades on AVR boards without any issues, so maybe I'm misunderstanding your comment. In my designs I have a 7805 voltage regulator with 2200 caps from Vin to Gnd and from Vout to Gnd.

>> No.1777097

>What does the part about "problems with connecting" mean?
The USB spec just mentions failing handshake or clock sync, I have no way to tell you why or how that happens because I don't know. The standard is designed to be fault tolerant, obviously it will work outside of spec, but the spec is to have a maximum of 10uF of capacitance. If you want bulk capacitance, you are _supposed_ to use some variety of soft start. This is also detailed in the USB spec sheet if you want examples.

Also, in case it wasn't clear, this only applies to USB. If you're just designing circuits with microcontrollers in general then just throw a decoupling cap of whatever size on there, it doesn't matter.

>> No.1777100

posted this on /ohm/ but I think it fits here better so

I need to have few micocontrollers remotely around house.
What device should I get when I value:
>should be small
>long battery life (preferably coin cell battery but can be bigger)
Looking maybe BLE, wifi or infrared might even do it but not sure.

>> No.1777102

>Also, in case it wasn't clear, this only applies to USB.

Thanks for the reply. It makes sense now. I almost never use USB to power anything, but it's good info to know in case I do run into issues related to it.

>> No.1777425

If I want to make a thermometer with a pro micro that updates every hour and outputs to an e-ink screen, how should I go about power optimization? Just shut down most modules?

>> No.1777462
File: 271 KB, 995x900, aus.png [View same] [iqdb] [saucenao] [google] [report]

I did this, but it doesn't work.

As you can see, this "Sequences_vectors" python embedded block that I created, has a list of bit sequences and it uses a for cycle to select each sequence and then return them to the next block (Repeat block) to go on in the flowgraph.
I did this to simulate a "Vector Source" block(that takes a _single_ list of bits), but that takes more than a single sequence of bits (in my case, as you can see in the code, there are three sequences).

I'd like to transmit each of these three sequences of bits. How can I do?

If I start the graph, it reports errors, I think because I can't return list but only single int.

In fact, even if it started without errors, I guess that the python embedded block wouldn't behave as expected. I think it would return one list and stops, since the "return" only works one time and not more than one (so the other two sequences can't be "returned"). So I think my code wouldn't work.

>> No.1777596

look into sleep mode. You want your microcontroller to go into sleep and only wake after a given time interval. Saves the most power.

>> No.1778015

Yeah but how do I wake it up?
It seems in lower power modes the watchdog timer is the only on-chip component that could wake it up, and that can only be set up to 8 secs.

>> No.1778080

Late reply but they do exist.
They just kinda fell out of favor I guess.

>> No.1778148

I'm a noob. What's the purpose of "Rational Resampler" and "Low pass filter" in GNURadio? When should I use them?

>> No.1778199

Somebody please point me to a resource on PCB antennas There is virtually no documentation online; It seems that nobody can explain how to measure an antenna's impedance (for impedance matching), there are no resources I could import into my Altium projects, the whole thing just sucks ass.
Specifically I'm thinking 433 MHz because the transmitter and receiver chips are less expensive than, say, 866 MHz.

>> No.1778201

Some STM32s have RTC working in the lowest power state.

>> No.1778237

You find something that gives you an interrupt to wake up, perhaps keep a timer unit running for once a second. An RTOS would probably go into sleep mode when it went idle, until the next interrupt.

>> No.1778290
File: 1.14 MB, 1920x1440, 1582076046694.jpg [View same] [iqdb] [saucenao] [google] [report]

Is getting a job in embedded background demanding? I am very interested in the topic and i want to specialize on it. The problem being i'm studying E.E (4th out of 8 semesters also not from the U.S, lineal program) wich is heavily power line-electric machines based with only a few classes about electronics and i doubt they cover embedded systems at all. My original plan was to get the degree and then apply for a Masters based on it, while trying to rack up on certs on the side and doing projects on my own, given that right now i basically know nothing about the whole thing. Alternatively i could apply for a job on the field with just the certs i get and my E.E degree, however that brings me back to the first question. Now i'm not sure if my E.E degree could be a mayor setback in applying for a Masters on the field, but the possibility of changing to an Electronics based program is also present, with the downside of having to start from, say, 3th semester, as not all classes are transferable. What would you suggest me?

>> No.1778414

I went in and purchased a board.

I did not buy an arduino. I am having trouble finding solid documentation or even forums on this brand and I am about to kms feeling overwhelmed.

>> No.1778415

8 seconds is fine. just turn on for 3ms (or whatever your wake time is) every 8 seconds to decrement a counter, and then go back to sleep unless that counter reaches zero.

>> No.1778416

Correcting myself. There is plenty of solid documentation, plenty of schems and such, but this feels like the programmer's equivalent of culture shock and there's not many strong communities or tutorial for a brainlet like me

Still wanna kms

>> No.1778417

>I did not buy an arduino
getting a toolchain to work the first time is possibly the most annoying thing you'll ever do in your life. buy a $1 chinkduino nano off ali, wait a month, and get on with your life.

>> No.1778426
File: 353 KB, 943x582, relevantcaptcha.png [View same] [iqdb] [saucenao] [google] [report]

>getting a toolchain to work the first time is possibly the most annoying thing you'll ever do in your life

I had a feeling it wasn't just me being a total brainlet. This feels like high industry grade equipment I am dealing with and no "so you're totally new to this" material

I will take your advice desu any recommendations?

Also captcha relevant

>> No.1778437

>any recommendations?
post project specs for better recs. otherwise just buy a few of the cheapest "arduino nano ch340g" listing on aliexpress, install the chinese ch340g drivers, and then use it exactly like you would a normal arduino (as far as you're probably concerned, at least). the main reason everyone recs arduino for newfags is that 95% of firmware IDEs/toolchains are written at only a first level abstraction from the hardware, which is incomprehensible unless you understand the hardware (aka read the datasheet) plus the autistic quirks of the software tools, which literally never work the same way the guides tell you (if you're lucky enough to have any).

>> No.1778615


what planet is this thread coming from. I buy the cheapest clones on amazon and use the generic Arduino IDE or Platformio and everything works, whether it's nanos, unos, megas, ESP8266, NodeMCU, Wemos D1 mini, you name it.

>getting a toolchain to work the first time is possibly the most annoying thing you'll ever do in your life


>> No.1778639

>programs everything with the arduino IDE
it's easy to do that, that's why i recommended it to the newfriend over whatever weird shit he might have bought. if you want to counter my point then go buy a lattice devboard and tell me that software isn't the most annoying thing you've ever dealt with.

>> No.1778642

What board have you bought?
And yeah arduinos are currently the easiest to get started with. Once you've gotten the hang of that and read a couple of datasheets you can move on to anything else.

>> No.1778646

>go buy a lattice devboard

Sorry, I thought he was struggling with an arduino clone. Carry on, anon.

>> No.1778655

arduino noob question
i have seen a lot of arduino shields that you attach to the uno. some of them might have some lights, switches or ics. but all of these eat up space from the pins of the arduino, so what the fuck is the point of them, i can have this shit in a breadboard, why spend money to put it on top of the arduino.

the only shield i have seen online that seems to have any value is the one that converts the uno into a wifi version or something like that.

>> No.1778660

I guess they're for people who use arduinos for more permanent things, it beats wasting a breadboard for a long period of time and the wiring is more reliable. Also it doesn't eat up many of the pins, I'm pretty sure most shields have those combined pin/sockets so you can plug wires or another shield into them.

Basically, if you want to do breadboarding, get a nano or mini or pro micro. If you want to use shields or program DIP ATmegas, get an uno. If you want to use shields with really inefficient code, use a mega. If you want to use 3.3V logic and can't be arsed to use logic level shifters, use a due or leonardo. If you don't mind the bootloader taking up 2/3 of your progmem, use a digispark. If you're a fucking faggot, use a lillypad.

>> No.1778661
File: 2.31 MB, 3264x2448, 20200307_142002.jpg [View same] [iqdb] [saucenao] [google] [report]

I just made a MIDI keyboard wireless using an arduino nano and an NRF24L01 module
it takes power from the onboard USB port (I want to add batteries eventually) and data from the onboard midi port, and just transmits the raw midi over (default channel for now) to another radio (midi is just 3-byte packets if you didn't know)

not the most complex project but pretty fun to work on

>> No.1778665

shields are for making them yourself desu, or for a very specific application, so you can attach and detach them without having to rebuild the entire breadboard setup. There's some shields which expose the pins they cover, too, like the SD card shield.

>> No.1779165

Pretty neat regardless

>> No.1779222

Gecko dev board from Silicon labs.

I tried loading sample programs. This would take someone weeks to figure out. I could have an easier time writing in 86x assembly than this this board desu.

All I needed was a good microcontroller that could snap a picture with my camera (on a timer) then send the picture to be broadcasted over a radio. I think I need an adruino because this board will add weeks maybe months to the development time

>> No.1779241

We developed a basic photo system with an Arducam OV5642, an ATMega328 (you should use a ProMini) and a SIM800L module with an RTC timer, so once a day the system sends a photo via GPRS to an FTP

>> No.1779262

I've never used silabs anything anon, but developing for ARM devices generally constitutes to fetching the ARM GCC toolchain and figuring out how the fuck your manufacturer's libraries work, as well as hope you're not forced to use some RTOS. Apparently silabs has some sort of IDE which you could try.
But yeah, in the end you're kind of on your own with anything that isn't Arduino. It's not too bad once you get the hang of it but the learning curve is there.

>> No.1779304

the off-the-shelf shields seem more useful for prototyping. in a final application you will probably want to aggregate your various sensors/converters/processors/amplifiers/connectors into a shield or other assembly of your own design. if you're smart and you're not especially concerned with optimizing MCU selection, you will probably also want to bring the MCU onto the board and adjust the form factor to the enclosures available

pcb antenna design is still antenna design. the usual antenna designs and analysis software apply. MMANA-GAL is a free and accurate antenna analyzer. you just draw your antenna as lines/planes in space, specify the material properties and diameters, and it will calculate the impedance and SWR at your choice of frequency. there may be other software that is better
http://www.antenna-theory.com/antennas/main.php will be highly educational. a lot of 433MHz equipment uses for its antenna a 1/4-wavelength helical coil of wire connected at one end to the board

>Rational Resampler
decimation, for example, when you need to convert something to a different sample rate e.g. IF to AF
>Low Pass Filter
low-pass filtering. when your high sample rate is desirable but high frequency content is not

the trend seems to be toward IDEs with pin planners and peripheral configurators
and there ain't a damn thing wrong with FreeRTOS, ever

>> No.1779351

>in a final application
In a final application I'll use a custom PCB. Using a whole arduino uno and a whopping great shield atop it is a waste of money and space.

>> No.1779365

>and there ain't a damn thing wrong with FreeRTOS, ever
In applications where you don't need it it's completely unnecessary complexity, which adds to the learning curve.
Peripheral configuration is nice for prototyping, I just don't like being stuck with the IDE they decide to use. STM32's tools can generate a project that then works completely independently from the tools.

>> No.1780674

Will someone please tell me why my if else statement doesn't work? I've only been messing with arduino for a few days. i was trying to fire a relay when the temperature is above 80. The LCD, temp and humidity works, but when powered up it always shows "on" no matter what the temperature shows and the relay never fires. The signal wire from the relay is plugged to pin 9 on the arduino. TIA

// include LCD library code
#include <LiquidCrystal.h>
// include DHT library code
#include "DHT.h"

#define DHTPIN 8 // DHT11 data pin is connected to Arduino pin 8

// LCD module connections (RS, E, D4, D5, D6, D7)
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

#define DHTTYPE DHT11 // DHT11 sensor is used
DHT dht(DHTPIN, DHTTYPE); // Initialize DHT library

int relay_pin = 9;

char temperature[] = "Temp = 00.0 F ";
char humidity[] = "RH = 00.0 % ";
void setup() {
// set up the LCD's number of columns and rows
lcd.begin(16, 2);
pinMode(relay_pin, OUTPUT);

void loop() {
delay(1000); // wait 1s between readings
// Read humidity
byte RH = dht.readHumidity();
//Read temperature in degree Farenheite
int Temp = (dht.readTemperature() * 1.8 + 32) * 10;

// Check if any reads failed and exit early (to try again)
if (isnan(RH) || isnan(Temp)) {
lcd.setCursor(5, 0);

if(Temp >= 1000)
temperature[6] = '1';
temperature[6] = ' ';
temperature[7] = (Temp / 100)% 10 + 48;
temperature[8] = (Temp / 10) % 10 + 48;
temperature[10] = Temp % 10 + 48;
temperature[11] = 223;
humidity[7] = RH / 10 + 48;
humidity[8] = RH % 10 + 48;
lcd.setCursor(0, 0);
lcd.setCursor(0, 1);

if (Temp > 80){
digitalWrite(relay_pin, LOW);

digitalWrite(relay_pin, HIGH);

>> No.1780675

I can control the relay with a simple on,delay,off,delay sketch.

>> No.1780703

in applications where you don't need it, just neglect to create tasks and neglect to call vTaskStartScheduler() so you can forget about the RTOS entirely. if the compiler driver is told to -Wl,--gc-sections your linker will also forget about the RTOS entirely

because Temp is actually degrees * 10 and you need to compare to 800

>> No.1780733

Lack of a proper debugger is probably the worst thing about Arduino.

>> No.1780768

does it not need to be like this:

if (Temp >= 1000) {
temperature[6] = '1';
} else {
temperature[6] = ' ';

? Not sure if C needs those extra curly brackets, but it's the only thing that stood out to me.

>> No.1780773

there's much to be said for ARM in that regard

no https://en.wikibooks.org/wiki/C_Programming/Statements#Compound_Statements

>> No.1780775

oh good to know. I'll still always use them just for cleanness though.

Wasn't there an arduino emulator out there?

>> No.1780787

You can emulate the chip, but how are you going to emulate the crap you've wired up to it?

>> No.1780801

a built-in circuit sim

>> No.1780842

meh, it depends mostly on what you're used to and what kind of help your editor/IDE offers in either case. I've found a newline between short groups of closely statements to be more helpful in aiding understanding than mandatory curly brackets
I know there are AVR simulators of varying capabilities, and would be entirely unsurprised if someone has linked one of them up to Fritzing

>> No.1780845

Has anyone tried to dump a spi flash with an arduino?

>> No.1780851

I want to make a room environment sensor, that periodically reads data and send it wirelessly.
1) How should I send the data? Ideally I'd be able to read it with a phone app or local webpage. Most instructions online use a UART-BLE board but the UART on the arduino pro micro I plan to use is occupied by the dust sensor.
2) The dust sensor is always on which will drain the battery. It's connected over UART. How do I turn it off? Just a transistor on the vcc pin?

>> No.1780924

1) choose a different board, or use a radio peripheral that talks SPI or I2C
2) depends on the board, get the schematics for it and see if you even can turn it off. possibly another reason to choose a different board

>> No.1780956

>it will forget about the RTOS entirely
what are startup files and initialization routines, anon.

>> No.1781069
File: 37 KB, 600x408, you-da-real-8zczlq.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.1781134

if you mean the startup stuff that sets up the initial stack pointer and copies/clears the data/bss sections to RAM before calling main(), those usually come with libc. gcc and libc for microcontrollers are usually built for the OS target "none". those startup files don't do anything specific for RTOSes, which are mostly just libraries of functions that know enough about the machine to save, restore, and manipulate execution contexts without violating credible assumptions on the programmer/compiler's part

transistor on ground is better. most serial-bus lines are conventionally (due to the nature of historical TTL implementations) high when idle. most ICs contain protective diodes which will shunt extra-rail input voltages eg ESD charges and overshoots into the nearest rail. so the device may power itself through the UART high line or pullups, that diode, and the Vcc chip-internal bus and pin. this is usually undesirable as the protective diode isn't constructed to carry significant current for long, the power supplied is often inadequate and variable, and devices may not start or function correctly or reliably

>> No.1781143

The OS target "none" means exactly that there's no startup file, so it has to be provided by whatever microcontroller-specific library or toolchain you're using. There's no such thing as a generic startup file so it can't be provided by a generic (OS target "none") libc. I've seen such startup files initialize things other than the stack or the RAM before (calling some HAL-related functions) so I kind of expect RTOSes to do similar, but I could be wrong.

>> No.1781149

thanks, I did mean "generic" in the strict sense of OS-agnostic. C itself, at the beginning of main(), has some minimal expectations about its execution environment: a working stack, working and prepared instruction and data RAM/ROM, and that's about it. give a C program a place to stand and it can move the world
the categories RTOS and HAL don't overlap too strongly. FreeRTOS is basically just a library that you hook up to a few exception handlers and call its functions. so is libc, in a certain light. I can believe startup files calling HAL code, but I would expect hardware initialization to be done in main() or a function called by main()

>> No.1781272

What is the go to option for a wired connection between two arduinos over say 50m/160ft?
I don't need high speed, something like 300baud would be fine, just needs to be reasonably robust.

>> No.1781276

RS-485 has many useful properties for a medium-length haul such as that. I think your maximum speed over a 50m wire will be like 20kbps if you feel like pushing it

>> No.1781277

I'd send your signal down ethernet cable, it's ubiquitous and not very expensive. Not sure what protocol you'd use, but I'm sure a little transistor circuit or dedicated IC to send well-buffered differential signals would cover you well.

>> No.1781314
File: 155 KB, 768x432, electronicdesign_5374_74762tab2.png [View same] [iqdb] [saucenao] [google] [report]

This. RS-485 is underrated for ~100m runs. Or RS-422 (the same in both directions) if you can't into polling protocols.

>> No.1781648

>he doesn't use coax for everything

>> No.1781655

Wow, population count and leading zero count instructions are great.
I just added them to my homebrew CPU and now software multiplication has dropped from 130 cycles to ~31 cycles on average.

>> No.1781822

I want to get into CPU design too. Where should I start? I already ordered an FPGA

>> No.1781923

step 1: get an FPGA board
step 1.5: git gud at verilog (modules, parameters, generate blocks, synchronous logic design) and the FPGA toolchain particulars (I/O pin constraints/configuration, clock constraints, RAM/ROM init data)
step 2: look up picoBlaze and the KCPSM series of tiny processor cores for FPGA
step 2.1: look up some peripherals on OpenCores or LibreCores or github
step 3: read this https://www.amazon.com/Computer-Organization-Design-Hardware-Interface/dp/1558604286
step 4: (recommended) read this https://www.elsevier.com/books/computer-architecture/hennessy/978-0-12-383872-8
(you do those readings so that you understand the idioms and taxonomy of computer design)
step 5: choose a theme for your design to explore and experiment with
eg instruction set architecture:
>every instruction is 18 bits wide, with a 3-bit opcode and a 15-bit immediate
>a two-register instruction format where the second register is addressed as an offset from one given register
>non-mainstream-RISC instruction formats, eg VLIW or CISC
>conditional skip vs. conditional branch
or implementation architecture or quality
>basic 4-stage Hennessy pipeline
>non-pipelined microcode machine
>instruction and/or data caches and their geometries
>absolute minimum size
or specialized speedups
>zero-cycle hardware looping/streaming SIMD
>barrel shifters on the register file output
>interrupt acceleration via hardware context saving
or maybe you're more interested in the software around a relatively normal RISC chip
>write an assembler to target it
>write a simulator that loads hex images
>port sdcc to target it
>port gcc to target it
>build a Forth for it
>port FreeRTOS to run on it
>port Rockbox to run on it
or maybe you just want to cook with some peripherals
>load/save stuff from SD card
>output audio
>output VGA (advanced: or DVI or HDMI)
step 6: build it
step 7: iterate and redesign until it works or you paint yourself into a corner
step 8: goto 5

>> No.1782478
File: 224 KB, 675x1022, variable to char array problem.jpg [View same] [iqdb] [saucenao] [google] [report]

What is the best way of writing a 4-digit number to an unsigned char array on the arduino? Took me far too long and I kept finding people saying strings should be avoided.

my solution as follows:

int x = 1234;
int 12x = 0; //int for storing digits 1, 2, of x
int 34x = 0; //int for storing digits 3, 4, of x

void setup(){
Serial.begin(115200); //using this baudrate for MCP2515 canbus module
unsigned char stmp[8] = {0, 0, 0, 0, 0, 0, 0, 0};

void loop(){
String 12str = String(x);
String 34str = String(x);

12str.remove(2, 2); //prints value 12
34str.remove(0, 2); //prints value 34

int 12x = 12str.toInt(); //convert string to int
int 34x = 34str.toInt();

stmp[0] = 12x; //add values to char array
stmp[1] = 34x;
} //end

And it works, but I’m curious if there is a more elegant solution, or one that avoid the use of strings?

>> No.1782491

start with math
>stmp[0] = (x / 100);
>stmp[1] = (x % 100);

>> No.1782573

Thank you, worked like a charm!

>> No.1782635

>What is the best way of writing a 4-digit number to an unsigned char array on the arduino?
Just because it's C++ doesn't mean printf has vanished.
#include <stdio.h>
char s[8];
sprintf(s, "%.4d", x);

On the other hand, the main problem with printf and friends is that unless you select a stripped-down printf, it is likely to bring in the entire floating point library and suddenly your code is like 10K bigger. I'm going to guess this was handled on Arduino over a decade ago.
I use sprintf on ARM-based boards all the time, and even have a Sega Genesis dev setup with my own custom printf core.
In any case, having a decimal to ASCII subroutine that works in a loop is still going to be better than mucking around with the String class and tossing a bunch of heap objects around like so much salad.

And if you didn't need the leading zeros then
#include <stdlib.h>
char s[8];
itoa(x, s, 10);

>> No.1782819

I started by learning as much about existing CPUs as I could, like the PDP-11, MIPS, 6502, Z80, M68K.
I learned AVR assembly and wrote several programs in it as a part of my degree.
Ben Eater's SAP build on a breadboard is a great intro to a very basic computer architecture.
With all of this in mind, I started designing an Instruction Set Architecture based on what parts of assembly I liked or didn't like, and built an instruction encoding for the chosen instructions.
At this point I started trimming the fat and ideas which didn't quite pan out, and implemented a preliminary version of the ISA in Logisim.
Now that I'm a few iterations in and the ISA is finalized I'm working on implementing it in verilog so I can flash it to a FPGA.
I also made a simplified subset of the ISA so that I can build the CPU out of TTL/CMOS logic chips.

>> No.1782909

>I already ordered an FPGA
what fpga did you get?

what's your opinion on board and book related for a i'm a csfag with no HDL background?
more interested about task acceleration than designing my own cpu

>> No.1783050

pretty expensive for what it is. doesn't seem to come with a programming dongle either, but Altera USB Blaster clones can be had for a few bux
it'll be enough for you to get started but likely won't be enough to fit a complete system implementation. even a 32-bit CPU core alone of any significant complexity would be iffy because 100% utilization is impractical. also that board doesn't have any memory other than what's built into the FPGA, (26) 4kbit RAMs. you'll probably want more depending on what tasks you're accelerating
if needed, you can get boards with amenities like onboard (async/SDR/DDR) DRAM if you spend another $10-$20. these will likely include larger FPGAs. you can then use IP, as provided with the vendor tools or downloaded from the internet, to configure and access the DRAM. see for example https://www.amazon.com/QMTECH-Development-Cyclone-CycloneIV-EP4CE15/dp/B07VQV7TDF/, which has RAM and a USB-UART on the board (and also Ethernet, which is fun). there's a cheaper "core board" variation (just RAM, ROM, FPGA, power, and rows of unpopulated header pins) too
ooooorrr if you're talking about task acceleration at a higher level maybe you're looking for some kind of ZYNQ dev board, where you have a genuine ARM™ hard core with multiple lanes to and from the logic fabric
it looks a bit like a hobbyist-level guided tour of CO&D. the reviews are on point for your situation, and the cover art doesn't simplify out tricky details like forwarding which is a good sign

>> No.1783210

>you'll probably want more depending on what tasks you're accelerating
the projects i work on the job as a software engineer have nothing to gain from fpga acceleration. it's all on the cloud™ so we are at the mercy of whatever bargain bin hardware they allocate to us
it's more me wanting to start dicking around with fpgas out of curiosity as a hobbyist because my autism, and a potential slow career move to hpc or scientific computing

>inb4 do cuda instead for scientific computing
can do both :3

the zynq boards seem quite expensive, cheapest i could find is this one
are the arty a7 boards worth it? they get shilled a lot by some of my EE frens and reddit but that is around the same price range as above

>> No.1783301

yes, ZYNQ is a bit expensive, but you can run linux on the core(s)
Artix is a decent series, supported by all the present day Xilinx tooling, the on-chip amenities are good. the trouble with Xilinx in general is that their "USB platform cable" aka programming dongle is a bit more complicated and therefore expensive, and clone dev boards usually use something proprietary which isn't easily used with the Xilinx software tools (you have to run a separate upload step)
I'd suggest you want no less than 5kLUTs, preferably at least 10kLUTs, more for the routing fabric needed to support so many LUTs and other amenities so that you can have lots of large buses on the chip, than the LUTs themselves
the original $20 board will be good enough. a frist-timer might want some components on the board to serve as known good I/O during initial experiments or as a regular tool on the design workbench
Digilent products are definitely first-quality and famously well supported. maybe you can find an equivalent of this ZYNQ starter kit on amazon https://www.aliexpress.com/item/4000323573953.html but you should explore the joys of aliexpress shopping. the excitement is contagious

>> No.1783340

what is the consensus on 8-bit guy's Commander X16? its an 8-bit throwback machine.

>> No.1783495

Seems pretty neat, but it seems like the design is still in flux, so who knows how it will turn out.

>> No.1783517

he has paired up with a company that manufactures MOBOs so the machine has its own MOBO and he also got a custom case made.
but he is using a ton of spare parts from old IBM and Commodore machines that arent made anymore. I dont know what he is gonna do when all the spares and scraps he can put to use in these machines go extinct.
maybe we'll see an X32 at that point

>> No.1783595

I need to pick a signalling protocol that I can use to interface a PIC18F26K83 with an arduino at the end of a hundred feet of cable. Bit rate can be pretty low, like 100bps. What's the easiest choice on the PIC side? I've looked at LIN bus, CAN bus, RS-485, and they all kind of look like a pain in the ass. I haven't used any of them before, and I want something I can spend a minimum of time setting up.

>> No.1783669

Dang, is he still going through with using NOS parts?
I though he had finally conceded to just re-implementing them in a FPGA.

>> No.1783764

he said he wanted to try reimplimenting everything but he thought it would take away from autheniticity

>> No.1783793
File: 98 KB, 640x960, 1578167247721.png [View same] [iqdb] [saucenao] [google] [report]

doing what, exactly? what sort of messages are you needing to pass to and fro?
you can sometimes strip down a standard protocol, skipping particular components or cases or even whole protocol layers, in order to leverage the parts/layers of interest
picrel at top is a degenerated model of a half-duplex wired-OR bus where only one node can speak sensibly at a time. if you can get your devices working and talking to each other on the bench using that bus model, you can use any suitable wired-OR physical layer such as CAN or LIN to scale up the distance as in picrel at middle
good physical layer. instead of dealing with the CAN controller, which is a complex machine designed for high performance and reliability, use a U(S)ART. note that CAN transceivers do have built-in send timeouts (300µs dominant bit time) according to fail-safety requirements of their intended use case and bit rate, so you will have to use a U(S)ART bit rate that ensures stop bits will occur at least that often (30kbps or more), orrrr
LIN transceivers have a much longer built-in send timeout (6ms), so you could use the normal LIN physical layer and termination/wiring scheme, and configure the U(S)ART for normal non-LIN mode, then pass bytes back and forth at a lower speed, such as 9600bps. you can ignore the LIN wake-up condition, addressing, and power management stuff, just send and receive your bytes
recommend you bring signal ground and power with you over the data cable, and isolate your remote receiver from remote ground (optos?), so you'll have less to worry about ground offsets blowing one or the other end
good and reliable, but the manual transmitter enable is undesirable complexity. if you have dual twisted pair cable, you could build two simplex links and use them together as a full-duplex link, otherwise use stripped-down LIN or CAN as above

worse than reddit

>> No.1784120
File: 124 KB, 1000x1000, 8658635.jpg [View same] [iqdb] [saucenao] [google] [report]

I want to make a gunpla rotatin base, what motor should I use? I never used one before
I have, steper motor, servo and 5v motor
I want to be a continous regulated movement, so i cant control it with a potientometer

>> No.1784151

the most practical solution is to get one of those cheap, compact 1rpm motors off aliexpress

>> No.1784156
File: 145 KB, 334x312, file.png [View same] [iqdb] [saucenao] [google] [report]

actually this is what i had in mind. the kind you have in your microwave. guess it's <1rpm.

>> No.1784176

fuck nice

>> No.1784180

and, because it's class F, it's free

you're not going to get smooth out of a STEPper motor, silly
go for the little gearbox motors used in timers and that

>> No.1784370

>you're not going to get smooth out of a STEPper motor, silly
>What is microstepping
There won't be any real load on a simple rotating base like that, so you could microstep the hell out of it. The motion would be very smooth.
Granted, that adds more cost and complexity, so you'd be better of going with a servo or gearbox motor anyways.
Although, a microstepped stepper motor would probably be a lot quieter than a cheap gearbox motor or servo.

>> No.1784453

What, from a 30V transformer?

>> No.1784494

Bros, I understand that this is not an idea thread but desperate times call for desperate measures.
I'm usually too busy between work and my MSc to build any projects anymore, but now that I'm quarantined I finally turned my garage into a part workshop, part gym space.
I have a couple STM32 dev boards, an ESP32 dev board, 2 arduinos (plus some ATmega & ATtiny chips) and a raspberry pi, as well as a bunch of parts, like most resistor values, a bunch of caps, buttons, leds, sensors, some pots and stuff like that.

What are you guys working on? What projects would you recommend with simple components, for fun?
I was thinking of making a midi controller or a general controller for my pc, eg to control which workspace I'm in with an ON/OFF/ON switch that goes back to middle after you move once, some buttons tied to applications, yada yada.
Anyone done anything similar?

>> No.1784499

Pretty sure there was recently (within ~4 threads) an anon who made a midi controller either here or on /ohm/.

>> No.1784508
File: 1.28 MB, 1024x767, file.png [View same] [iqdb] [saucenao] [google] [report]

that's just the first pic my drunk ass got off amazon. you'd want a mains rated version like pic. this one's actually pretty fast and might benefit from a leading edge triac dimmer.

>> No.1784679

no, from a 21V transformer

yes, do this. special purpose USB-HID controls improve quality of life. and it's good to have more people around with USB-HID experience

>> No.1784686

>from a 21V transformer
But a 21V transformer usually produces 21V peak, since it is intended to be rectified and filtered with caps.

>> No.1784895

>what's the absolute least painful toolchain for programming these things?
VSCode + PlatformIO.

>> No.1784944

I just say fuck it and NodeMCU it

>> No.1784998

New thread:

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.