Search found 18 matches

by arpruss
Tue Oct 17, 2017 4:41 am
Forum: STM32F103 Boards
Topic: Black pill decoupling capacitor
Replies: 0
Views: 26

Black pill decoupling capacitor

The blue pill schematic shows a 10uF capacitor between 3V3 and ground. Do the black pills have them, too? I've had my black pill reset in a project while connecting a device to it, and the resets stopped once I put in a capacitor (at least 4.7uF, but I went with 10uF in the end to be safe) between 3...
by arpruss
Tue Oct 17, 2017 2:31 am
Forum: Libary request
Topic: ADCTouch capacitive touch implementation for STM32F103 development board
Replies: 13
Views: 434

Re: ADCTouch capacitive touch implementation for STM32F103 development board

If you want more demo code, here is a simple but working capacitive MIDI piano keyboard ( use this core for MIDI USB: https://github.com/arpruss/Arduino_STM3 ... addMidiHID ):
https://github.com/arpruss/capacitive-piano-Arduino
by arpruss
Sun Oct 15, 2017 5:04 pm
Forum: Libary request
Topic: ADCTouch capacitive touch implementation for STM32F103 development board
Replies: 13
Views: 434

Re: ADCTouch capacitive touch implementation for STM32F103 development board

I got a new stm32f103c8 in the mail. The sample code I posted works fine, but I wrapped it into a library with an example: https://github.com/arpruss/ADCTouchSensor The library works on STM32, AVR and probably any MCU whose internal ADC workings are similar. On the STM32F103C, it uses the fact that ...
by arpruss
Fri Oct 13, 2017 3:13 am
Forum: Libary request
Topic: ADCTouch capacitive touch implementation for STM32F103 development board
Replies: 13
Views: 434

Re: ADCTouch capacitive touch implementation for STM32F103 development board

Rather than port the ADCTouch code itself, I tried to duplicate how I understand the ADCTouch code to work. Since I didn't know how to pull the ADC to ground, I just sacrificed PA6, wrote 0 to it, and did an ADC conversion on PA6. The code (see below) then measures touch on PA7. Currently there is a...
by arpruss
Thu Oct 12, 2017 5:31 pm
Forum: General discussion
Topic: The fastest ADC (analogRead) - how ?
Replies: 9
Views: 347

Re: The fastest ADC (analogRead) - how ?

You are correct, analogread is not optimised for speed, however using DMA, and dual channel mode, you can get around 1 million samples per second. Right, but I want to note that you don't actually need to use DMA. If you use dual-channel interleaved mode, the regular CPU is fast enough to pull data...
by arpruss
Thu Oct 12, 2017 5:26 pm
Forum: General discussion
Topic: Power LED questions
Replies: 10
Views: 207

Re: Power LED questions

I want to continue to power over USB, but I'd like to be able to run it from a phone via OTG without draining the battery too much. My SMD soldering skills are very rudimentary (i.e., I once managed to solder a SOIC-8), so I don't want to add any new components. How about my thought about just takin...
by arpruss
Thu Oct 12, 2017 12:57 pm
Forum: Libary request
Topic: ADCTouch capacitive touch implementation for STM32F103 development board
Replies: 13
Views: 434

Re: ADCTouch capacitive touch implementation for STM32F103 development board

I've just replaced ADMUX |= 0b11111; ADCSRA |= (1<<ADSC); //start conversion while(!(ADCSRA & (1<<ADIF))); //wait for conversion to finish ADCSRA |= (1<<ADIF); //reset the flag by analogRead(ADCChannel); That's not equivalent, though. I've spent some time looking over AVR information, and the AVR c...
by arpruss
Thu Oct 12, 2017 12:47 pm
Forum: Libraries & Hardware
Topic: hardwire i2c hotplugging
Replies: 3
Views: 76

Re: hardwire i2c hotplugging

The Nunchuck draws power from the the connection, so when I unplug it, it gets unpowered and hence reset.
by arpruss
Thu Oct 12, 2017 2:22 am
Forum: Libraries & Hardware
Topic: hardwire i2c hotplugging
Replies: 3
Views: 76

hardwire i2c hotplugging

I've been wanting to use hardwire i2c with a device -- Wii Nunchuck -- that I want to be able to plug and unplug while the stm32f103 is running. No luck. It works fine if the device is plugged in permanent, but if I unplug, I get a hang. It works perfectly with the bit-banged i2c. Any suggestions?
by arpruss
Wed Oct 11, 2017 3:06 am
Forum: General discussion
Topic: Power LED questions
Replies: 10
Views: 207

Power LED questions

Does anyone know how much current the power LED is using on the cheap dev board (black pill in my case)? Can I just safely take flush-cutters and cut the power LED in half to save current?