Hello,
Very interesting project !
When I try to put your gerber files in JLCPCB site, there is no view, and no dimensions ?
Is it normal ? which dimensions is required ?
Thanks
Hello,
Very interesting project !
When I try to put your gerber files in JLCPCB site, there is no view, and no dimensions ?
Is it normal ? which dimensions is required ?
Thanks
hello,
i'm trying to experiment nodes with NRF52832.
I use this sketch :
// Enable debug prints
#define MY_DEBUG
// Enable and select radio type attached
//#define MY_RADIO_RF24
//#define MY_RADIO_RFM69
//#define MY_RS485
#define MY_RADIO_NRF5_ESB
#include <SPI.h>
#include <MySensors.h>
#include <DHT.h>
// Set this to the pin you connected the DHT's data pin to
#define DHT_DATA_PIN 08
// Set this offset if the sensor has a permanent small offset to the real temperatures.
// In Celsius degrees (as measured by the device)
#define SENSOR_TEMP_OFFSET 0
// Sleep time between sensor updates (in milliseconds)
// Must be >1000ms for DHT22 and >2000ms for DHT11
static const uint64_t UPDATE_INTERVAL = 6000;
// Force sending an update of the temperature after n sensor reads, so a controller showing the
// timestamp of the last update doesn't show something like 3 hours in the unlikely case, that
// the value didn't change since;
// i.e. the sensor would force sending an update every UPDATE_INTERVAL*FORCE_UPDATE_N_READS [ms]
static const uint8_t FORCE_UPDATE_N_READS = 10;
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
float lastTemp;
float lastHum;
uint8_t nNoUpdatesTemp;
uint8_t nNoUpdatesHum;
bool metric = true;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
DHT dht;
void presentation()
{
// Send the sketch version information to the gateway
sendSketchInfo("TemperatureHumiditeNRF", "1.0");
// Register all sensors to gw (they will be created as child devices)
present(CHILD_ID_HUM, S_HUM);
present(CHILD_ID_TEMP, S_TEMP);
metric = getControllerConfig().isMetric;
}
void setup()
{
dht.setup(DHT_DATA_PIN); // set data pin of DHT sensor
if (UPDATE_INTERVAL <= dht.getMinimumSamplingPeriod()) {
Serial.println("Warning: UPDATE_INTERVAL is smaller than supported by the sensor!");
}
// Sleep for the time of the minimum sampling period to give the sensor time to power up
// (otherwise, timeout errors might occure for the first reading)
sleep(dht.getMinimumSamplingPeriod());
}
void loop()
{
// Force reading sensor, so it works also after sleep()
dht.readSensor(true);
// Get temperature from DHT library
float temperature = dht.getTemperature();
if (isnan(temperature)) {
Serial.println("Failed reading temperature from DHT!");
} else if (temperature != lastTemp || nNoUpdatesTemp == FORCE_UPDATE_N_READS) {
// Only send temperature if it changed since the last measurement or if we didn't send an update for n times
lastTemp = temperature;
// apply the offset before converting to something different than Celsius degrees
temperature += SENSOR_TEMP_OFFSET;
if (!metric) {
temperature = dht.toFahrenheit(temperature);
}
// Reset no updates counter
nNoUpdatesTemp = 0;
send(msgTemp.set(temperature, 1));
#ifdef MY_DEBUG
Serial.print("T: ");
Serial.println(temperature);
#endif
} else {
// Increase no update counter if the temperature stayed the same
nNoUpdatesTemp++;
}
// Get humidity from DHT library
float humidity = dht.getHumidity();
if (isnan(humidity)) {
Serial.println("Failed reading humidity from DHT");
} else if (humidity != lastHum || nNoUpdatesHum == FORCE_UPDATE_N_READS) {
// Only send humidity if it changed since the last measurement or if we didn't send an update for n times
lastHum = humidity;
// Reset no updates counter
nNoUpdatesHum = 0;
send(msgHum.set(humidity, 1));
#ifdef MY_DEBUG
Serial.print("H: ");
Serial.println(humidity);
#endif
} else {
// Increase no update counter if the humidity stayed the same
nNoUpdatesHum++;
}
// Sleep for a while to save energy
sleep(UPDATE_INTERVAL);
}
But problem...
My controlleur found my node, but no read of temperature or humidity.
I try to change pin of data from dht22, same problem.
Can you help me make this node running ?
Hello,
Some news !
i buy a Jlink, and success in erase my nrf52832 with nrf prog, using method of berkseo.
Next i try to upload a basic sketch (blink) :
#define MY_RADIO_NRF5_ESB
#include <nrf.h>
#include <MySensors.h>
void setup() {
Serial.begin(9600);
hwPinMode(LED_BUILTIN,OUTPUT_H0H1);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
I have this :
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
0
adapter speed: 10000 kHz
cortex_m reset_config sysresetreq
Info : No device selected, using first device.
Info : J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Info : Hardware version: 7.00
Info : VTarget = 3.300 V
Info : clock speed 10000 kHz
Info : SWD IDCODE 0x2ba01477
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
nrf52.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0000051c msp: 0x20010000
** Programming Started **
auto erase enabled
Warn : Unknown device (HWID 0x00000139)
Warn : not enough working area available(requested 32)
Warn : no working area available, falling back to slow memory writes
wrote 12288 bytes from file C:\Users\Sancho\AppData\Local\Temp\arduino_build_76789/NRF5_blink_led8.ino.hex in 4.155332s (2.888 KiB/s)
** Programming Finished **
** Verify Started **
Warn : not enough working area available(requested 52)
verified 10812 bytes in 0.165932s (63.632 KiB/s)
** Verified OK **
** Resetting Target **
shutdown command invoked
I think its good, but when i put a led with a resistance on P0.08, nothing
could you help me more ?
@ncollins
@monte
thx for these advices.
I think i will try with BMP clone (STM32F103C8T6), cheaper than J-link (i must only wait 1 month to have it, buying it in china...)
is it possible to erase E73 with BMP in win10 ?
Hello
it's a E73 2G4M04S1B from EBYTE
When i switch SWDIO and SWCLK, i can see the led of STLink V2 changing from red to blue, but when i try to uplod empty sketch (MyBoardNRF5), i have this error :
C:\Users\Sancho\AppData\Local\Arduino15\packages\sandeepmistry\tools\openocd\0.10.0-dev.nrf5/bin/openocd.exe -d2 -f interface/stlink-v2.cfg -c transport select hla_swd; set WORKAREASIZE 0x4000; -f target/nrf52.cfg -c program {{C:\Users\Sancho\AppData\Local\Temp\arduino_build_432557/MyBoardNRF5.ino.hex}} verify reset; shutdown;
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
0x4000
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.283200
Info : nrf52.cpu: hardware has 0 breakpoints, 2 watchpoints
Error: timed out while waiting for target halted
TARGET: nrf52.cpu - Not halted
in procedure 'program'
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'
embedded:startup.tcl:454: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 479
at file "embedded:startup.tcl", line 454
le port série sélectionné at file "embedded:startup.tcl", line 454
n'existe pas ou votre Arduino n'est pas connectée
Hi,
I'm trying to begin with nrf52832.
I have follow advice, with soldering 4 wires. I use STlink v2, downloading soft before use it.
When i try to erase the nrf52832, with sketch "mass_erase" in exemple, i have the following error :
Arduino : 1.8.7 (Windows 10), Carte : "MyBoardNRF5 nRF52832, None, Crystal Oscillator, Don't enable"
C:\Users\Sancho\AppData\Local\Arduino15\packages\sandeepmistry\tools\openocd\0.10.0-dev.nrf5/bin/openocd.exe -d2 -f interface/stlink-v2.cfg -c transport select hla_swd; set WORKAREASIZE 0x4000; -f target/nrf52.cfg -c init; halt; nrf51 mass_erase; program {{{build.core.path}/SDK/components/softdevice/none/hex/none_nrf52_{softdeviceversion}_softdevice.hex}} verify reset; shutdown;
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
0x4000
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.280426
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'
Erreur lors de la gravure de la séquence d'initialisation.
I try to upload an empty sketch (MyBoardNRF5), and have this message :
Arduino : 1.8.7 (Windows 10), Carte : "MyBoardNRF5 nRF52832, None, Crystal Oscillator, Don't enable"
Le croquis utilise 10508 octets (2%) de l'espace de stockage de programmes. Le maximum est de 524288 octets.
C:\Users\Sancho\AppData\Local\Arduino15\packages\sandeepmistry\tools\openocd\0.10.0-dev.nrf5/bin/openocd.exe -d2 -f interface/stlink-v2.cfg -c transport select hla_swd; set WORKAREASIZE 0x4000; -f target/nrf52.cfg -c program {{C:\Users\Sancho\AppData\Local\Temp\arduino_build_74329/MyBoardNRF5.ino.hex}} verify reset; shutdown;
Open On-Chip Debugger 0.10.0-dev-00254-g696fc0a (2016-04-10-10:13)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
0x4000
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 10000 kHz
Une erreur est survenue lors du transfert du croquis
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : Unable to match requested speed 10000 kHz, using 4000 kHz
Info : clock speed 4000 kHz
Info : STLINK v2 JTAG v29 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.280426
Error: init mode failed (unable to connect to the target)
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'
** OpenOCD init failed **
shutdown command invoked
Can you help me please ?
I already looked for hardware with nrf52832, but i dont find lot of documentation, and it seems to be harder.
Dont find nrf52832 module with pa/lna version for good range.
But it seems very interesting, because no need to use module for comuunication and mcu, like nrf24+atmega328, only nrf52 module is necessary.
Can we have a gateway with nrf24, and sensors with nrf52 ?
Does my project seem good ? No errors ?
Like this ?
https://www.mouser.fr/new/nordicsemiconductor/nordic-nrf52840-usb-dongle/
You think we could use it like a gateway ?